Provides a system for creating array friendly id numbers with reuse and generations.
Definition idgenerationpool.h:43
Definition actorcontext.h:35
static void DiscardActor(ActorId id)
destroy an actor and the shapes it owns
Definition actorcontext.cc:363
static void SetCollisionFeedback(ActorId id, CollisionFeedback feedback)
modify collision callback handling
Definition actorcontext.cc:714
static Shape & GetShape(ShapeId id)
Definition actorcontext.cc:931
static ActorId CreateActor(const BodyDescription &desc)
Create a body from plain data. Shapes are added separately with AddShape.
Definition actorcontext.cc:743
static ActorId CreateCapsule(float radius, float halfHeight, IndexT material, ActorType type, Math::mat4 const &transform, IndexT scene=0)
Definition actorcontext.cc:434
static void ApplyImpulseAtPos(ActorId id, const Math::vector &impulse, const Math::point &pos)
apply a global impulse vector at the next time step at a global position
Definition actorcontext.cc:627
static ActorId CreateBox(Math::vector const &extends, IndexT material, ActorType type, Math::mat4 const &transform, IndexT scene=0)
helper functions for creating shapes
Definition actorcontext.cc:392
static ShapeId AllocateShapeId(physx::PxShape *pxShape, ActorId actor, uint64_t geometryHash, uint64_t userData)
Definition actorcontext.cc:297
static ActorId CreatePlane(Math::plane const &plane, IndexT material, IndexT scene=0)
Definition actorcontext.cc:498
static void GetPositionOrientation(ActorId id, Math::vec3 &position, Math::quat &orientation)
Definition actorcontext.cc:575
static Math::vector GetLinearVelocity(ActorId id)
Definition actorcontext.cc:597
Util::StackArray< ShapeHandle, DefaultShapeAlloc > ShapeArrayType
Definition actorcontext.h:80
static Ids::IdGenerationPool actorPool
Definition actorcontext.h:119
static Util::Array< Shape > shapes
Definition actorcontext.h:120
static physx::PxRigidDynamic * GetPxDynamic(ActorId id)
shortcut for getting the pxactor object
Definition actorcontext.cc:648
static Util::Array< Actor > actors
Definition actorcontext.h:118
static ActorId AllocateActorId(physx::PxRigidActor *pxActor, ActorResourceId res)
static Actor & GetActor(ActorId id)
Definition actorcontext.cc:520
static bool UpdateShape(ShapeId shape, const ColliderDescription &desc)
apply a description onto an existing shape. The geometry is rebuilt if the shape parameters changed
Definition actorcontext.cc:834
static void SetPositionOrientation(ActorId id, Math::vec3 const &position, Math::quat const &orientation)
Definition actorcontext.cc:557
static void UpdateBody(ActorId id, const BodyDescription &desc)
apply the body properties of the description onto an existing actor
Definition actorcontext.cc:759
static ActorId CreateConvexHull(float *vertices, int numVertices, IndexT material, ActorType type, Math::mat4 const &transform, IndexT scene=0)
Create a convex hull/mesh from vertex buffer.
Definition actorcontext.cc:454
static void RemoveShape(ShapeId shape)
detach and release a shape from its actor
Definition actorcontext.cc:898
static void GetShapes(ActorId id, ShapeArrayType &shapes)
Definition actorcontext.cc:674
static Ids::IdGenerationPool shapePool
Definition actorcontext.h:121
static Math::mat4 GetTransform(ActorId id)
Definition actorcontext.cc:547
static void SetShapeTransform(const ShapeHandle &shape, const Math::transform &transform)
Definition actorcontext.cc:703
static ShapeId AddShape(ActorId actor, const ColliderDescription &desc)
add a shape to an actor
Definition actorcontext.cc:809
static ActorId AllocateActorId(physx::PxRigidActor *pxActor)
static bool IsValid(ActorId id)
Definition actorcontext.h:150
static bool IsValidShape(ShapeId id)
Definition actorcontext.h:159
static Math::transform GetShapeTransform(const ShapeHandle &shape)
Definition actorcontext.cc:694
static void SetTransform(ActorId id, Math::mat4 const &transform)
Definition actorcontext.cc:529
static void SetAngularVelocity(ActorId id, Math::vector speed)
Definition actorcontext.cc:607
@ DefaultShapeAlloc
Definition actorcontext.h:79
friend class PhysxState
Definition actorcontext.h:115
static ActorId CreateSphere(float radius, IndexT material, ActorType type, Math::mat4 const &transform, IndexT scene=0)
Definition actorcontext.cc:413
static void SetLinearVelocity(ActorId id, Math::vector speed)
Definition actorcontext.cc:587
static Math::vector GetAngularVelocity(ActorId id)
Definition actorcontext.cc:617
static SizeT GetShapeCount(ActorId id)
Definition actorcontext.cc:658
static physx::PxRigidActor * GetPxActor(ActorId id)
shortcut for getting the pxactor object
Definition actorcontext.cc:638
friend class StreamActorPool
Definition actorcontext.h:116
Definition actorcontext.h:131
static AggregateId AllocateAggregateId(AggregateResourceId res)
Definition actorcontext.cc:940
static Ids::IdGenerationPool aggPool
Definition actorcontext.h:139
static Aggregate & GetAggregate(AggregateId id)
Definition actorcontext.cc:961
static void DiscardAggregate(AggregateId id)
Definition actorcontext.cc:972
static Util::Array< Aggregate > aggregates
Definition actorcontext.h:138
friend class PhysxState
Definition actorcontext.h:135
friend class StreamActorPool
Definition actorcontext.h:136
Definition physxstate.h:22
Definition streamactorpool.h:66
Nebula's dynamic array class.
Definition array.h:61
Diverse functions for manipulating physics actors.
Definition actorcontext.cc:22
ActorType
Definition physicsinterface.h:38
Array< TYPE, STACK_SIZE > StackArray
Definition array.h:2051
A 4x4 single point precision float matrix.
Definition mat4.h:55
A mathematical plane represented by a normal and a distance from origin.
Definition plane.h:23
Represents a 3D point in space.
Definition point.h:22
A quaternion is usually used to represent an orientation in 3D space.
Definition quat.h:30
A 3D vector.
Definition vec3.h:37
A vector is a 3D direction in space.
Definition vector.h:22
Definition physicsinterface.h:99
Definition physicsinterface.h:63
Definition physicsinterface.h:32
Definition physicsinterface.h:150
Definition physicsinterface.h:84
Definition physicsinterface.h:33
A physics body description.
Definition physicsinterface.h:264
A collider description / create info.
Definition physicsinterface.h:234
Definition actorcontext.h:23
ShapeHandle(physx::PxShape *inShape)
Definition actorcontext.h:25
bool IsValid() const
Definition actorcontext.h:26
ShapeHandle()
Definition actorcontext.h:24
bool operator==(const ShapeHandle &other)
Definition actorcontext.h:27
physx::PxShape * shape
Definition actorcontext.h:28
Definition physicsinterface.h:116
Definition physicsinterface.h:91
int SizeT
Definition types.h:50
int IndexT
Definition types.h:49