Nebula
Loading...
Searching...
No Matches
Physics::ActorContext Class Reference

#include <actorcontext.h>

Public Types

enum  { DefaultShapeAlloc = 16 }
 
using ShapeArrayType = Util::StackArray<ShapeHandle, DefaultShapeAlloc>
 

Static Public Member Functions

static ActorId CreateBox (Math::vector const &extends, IndexT material, ActorType type, Math::mat4 const &transform, IndexT scene=0)
 helper functions for creating shapes
 
static ActorId CreateSphere (float radius, IndexT material, ActorType type, Math::mat4 const &transform, IndexT scene=0)
 
static ActorId CreatePlane (Math::plane const &plane, IndexT material, IndexT scene=0)
 
static ActorId CreateCapsule (float radius, float halfHeight, IndexT material, ActorType type, Math::mat4 const &transform, IndexT scene=0)
 
static ActorGetActor (ActorId id)
 
static void SetTransform (ActorId id, Math::mat4 const &transform)
 
static Math::mat4 GetTransform (ActorId id)
 
static void SetPositionOrientation (ActorId id, Math::vec3 const &position, Math::quat const &orientation)
 
static void GetPositionOrientation (ActorId id, Math::vec3 &position, Math::quat &orientation)
 
static void SetLinearVelocity (ActorId id, Math::vector speed)
 
static Math::vector GetLinearVelocity (ActorId id)
 
static void SetAngularVelocity (ActorId id, Math::vector speed)
 
static Math::vector GetAngularVelocity (ActorId id)
 
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
 
static void SetCollisionFeedback (ActorId id, CollisionFeedback feedback)
 modify collision callback handling
 
static SizeT GetShapeCount (ActorId id)
 
static void GetShapes (ActorId id, ShapeArrayType &shapes)
 
static Math::transform GetShapeTransform (const ShapeHandle &shape)
 
static void SetShapeTransform (const ShapeHandle &shape, const Math::transform &transform)
 
static physx::PxRigidActor * GetPxActor (ActorId id)
 shortcut for getting the pxactor object
 
static physx::PxRigidDynamic * GetPxDynamic (ActorId id)
 shortcut for getting the pxactor object
 
static bool IsValid (ActorId id)
 

Static Private Member Functions

static ActorId AllocateActorId (physx::PxRigidActor *pxActor)
 
static ActorId AllocateActorId (physx::PxRigidActor *pxActor, ActorResourceId res)
 
static void DiscardActor (ActorId id)
 

Static Private Attributes

static Util::Array< Actoractors
 
static Ids::IdGenerationPool actorPool
 

Friends

class PhysxState
 
class StreamActorPool
 

Member Typedef Documentation

◆ ShapeArrayType

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DefaultShapeAlloc 

Member Function Documentation

◆ AllocateActorId() [1/2]

static ActorId Physics::ActorContext::AllocateActorId ( physx::PxRigidActor * pxActor)
staticprivate

◆ AllocateActorId() [2/2]

static ActorId Physics::ActorContext::AllocateActorId ( physx::PxRigidActor * pxActor,
ActorResourceId res )
staticprivate

◆ ApplyImpulseAtPos()

void Physics::ActorContext::ApplyImpulseAtPos ( ActorId id,
const Math::vector & impulse,
const Math::point & pos )
static

apply a global impulse vector at the next time step at a global position

◆ CreateBox()

ActorId Physics::ActorContext::CreateBox ( Math::vector const & extends,
IndexT material,
ActorType type,
Math::mat4 const & transform,
IndexT scene = 0 )
static

helper functions for creating shapes

◆ CreateCapsule()

ActorId Physics::ActorContext::CreateCapsule ( float radius,
float halfHeight,
IndexT material,
ActorType type,
Math::mat4 const & transform,
IndexT scene = 0 )
static

◆ CreatePlane()

ActorId Physics::ActorContext::CreatePlane ( Math::plane const & plane,
IndexT material,
IndexT scene = 0 )
static

◆ CreateSphere()

ActorId Physics::ActorContext::CreateSphere ( float radius,
IndexT material,
ActorType type,
Math::mat4 const & transform,
IndexT scene = 0 )
static

◆ DiscardActor()

void Physics::ActorContext::DiscardActor ( ActorId id)
staticprivate

◆ GetActor()

Actor & Physics::ActorContext::GetActor ( ActorId id)
static

◆ GetAngularVelocity()

Math::vector Physics::ActorContext::GetAngularVelocity ( ActorId id)
static

◆ GetLinearVelocity()

Math::vector Physics::ActorContext::GetLinearVelocity ( ActorId id)
static

◆ GetPositionOrientation()

void Physics::ActorContext::GetPositionOrientation ( ActorId id,
Math::vec3 & position,
Math::quat & orientation )
static

◆ GetPxActor()

physx::PxRigidActor * Physics::ActorContext::GetPxActor ( ActorId id)
static

shortcut for getting the pxactor object

◆ GetPxDynamic()

physx::PxRigidDynamic * Physics::ActorContext::GetPxDynamic ( ActorId id)
static

shortcut for getting the pxactor object

◆ GetShapeCount()

SizeT Physics::ActorContext::GetShapeCount ( ActorId id)
static

◆ GetShapes()

void Physics::ActorContext::GetShapes ( ActorId id,
ShapeArrayType & shapes )
static

◆ GetShapeTransform()

Math::transform Physics::ActorContext::GetShapeTransform ( const ShapeHandle & shape)
static

◆ GetTransform()

Math::mat4 Physics::ActorContext::GetTransform ( ActorId id)
static

◆ IsValid()

bool Physics::ActorContext::IsValid ( ActorId id)
inlinestatic

◆ SetAngularVelocity()

void Physics::ActorContext::SetAngularVelocity ( ActorId id,
Math::vector speed )
static

◆ SetCollisionFeedback()

void Physics::ActorContext::SetCollisionFeedback ( ActorId id,
CollisionFeedback feedback )
static

modify collision callback handling

◆ SetLinearVelocity()

void Physics::ActorContext::SetLinearVelocity ( ActorId id,
Math::vector speed )
static

◆ SetPositionOrientation()

void Physics::ActorContext::SetPositionOrientation ( ActorId id,
Math::vec3 const & position,
Math::quat const & orientation )
static

◆ SetShapeTransform()

void Physics::ActorContext::SetShapeTransform ( const ShapeHandle & shape,
const Math::transform & transform )
static

◆ SetTransform()

void Physics::ActorContext::SetTransform ( ActorId id,
Math::mat4 const & transform )
static

Friends And Related Symbol Documentation

◆ PhysxState

friend class PhysxState
friend

◆ StreamActorPool

friend class StreamActorPool
friend

Member Data Documentation

◆ actorPool

Ids::IdGenerationPool Physics::ActorContext::actorPool
staticprivate

◆ actors

Util::Array< Actor > Physics::ActorContext::actors
staticprivate

The documentation for this class was generated from the following files: