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

#include <physxstate.h>

Inherits physx::PxSimulationEventCallback.

Public Member Functions

 PhysxState ()
void Setup ()
 Setup Px subsystems.
void Shutdown ()
void Step (Timing::Time delta)
 convenience function to do a sync simulation step on every scene
void Step (Timing::Time delta, IndexT scene)
 one sync simulation step of a single scene. Actor reads and writes have to happen outside of this
physx::PxRigidActor * CreateActor (ActorType type, Math::mat4 const &transform)
 create new empty actor
physx::PxRigidActor * CreateActor (ActorType type, Math::vec3 const &location, Math::quat const &orientation)
 create new empty actor
void DiscardActor (ActorId id)
 deregister an actor
void ConnectPVD ()
 connect to an instance of pvd
void DisconnectPVD ()
 disconnect from pvd again
void onConstraintBreak (physx::PxConstraintInfo *constraints, physx::PxU32 count)
 these are implementations of PxSimulationEventCallback
void onWake (physx::PxActor **actors, physx::PxU32 count)
void onSleep (physx::PxActor **actors, physx::PxU32 count)
void onContact (const physx::PxContactPairHeader &pairHeader, const physx::PxContactPair *pairs, physx::PxU32 nbPairs)
void onTrigger (physx::PxTriggerPair *pairs, physx::PxU32 count)
void onAdvance (const physx::PxRigidBody *const *bodyBuffer, const physx::PxTransform *poseBuffer, const physx::PxU32 count)

Public Attributes

physx::PxFoundation * foundation
physx::PxPhysics * physics
physx::PxPvd * pvd
physx::PxPvdTransport * transport
Util::Delegate< void(ActorId *, SizeT)> onSleepCallback
Util::Delegate< void(ActorId *, SizeT)> onWakeCallback
Physics::Allocator allocator
Physics::ErrorCallback errorCallback
Physics::Material FallbackMaterial
Util::Set< Ids::Id32 > awakeActors
Util::Dictionary< Util::StringAtom, IndexT > materialNameTable
Util::StackArray< Physics::Scene, 8 > activeScenes
Util::StackArray< Physics::Material, 16 > materials
Util::StackArray< IndexT, 8 > activeSceneIds
Util::StackArray< IndexT, 8 > deadSceneIds
physx::PxOverlapHit overlapBuffer [MAX_SHAPE_OVERLAPS]

Constructor & Destructor Documentation

◆ PhysxState()

Physics::PhysxState::PhysxState ( )

Member Function Documentation

◆ ConnectPVD()

void Physics::PhysxState::ConnectPVD ( )

connect to an instance of pvd

◆ CreateActor() [1/2]

physx::PxRigidActor * Physics::PhysxState::CreateActor ( ActorType type,
Math::mat4 const & transform )

create new empty actor

◆ CreateActor() [2/2]

physx::PxRigidActor * Physics::PhysxState::CreateActor ( ActorType type,
Math::vec3 const & location,
Math::quat const & orientation )

create new empty actor

◆ DiscardActor()

void Physics::PhysxState::DiscardActor ( ActorId id)

deregister an actor

◆ DisconnectPVD()

void Physics::PhysxState::DisconnectPVD ( )

disconnect from pvd again

◆ onAdvance()

void Physics::PhysxState::onAdvance ( const physx::PxRigidBody *const * bodyBuffer,
const physx::PxTransform * poseBuffer,
const physx::PxU32 count )
inline

◆ onConstraintBreak()

void Physics::PhysxState::onConstraintBreak ( physx::PxConstraintInfo * constraints,
physx::PxU32 count )
inline

these are implementations of PxSimulationEventCallback

◆ onContact()

void Physics::PhysxState::onContact ( const physx::PxContactPairHeader & pairHeader,
const physx::PxContactPair * pairs,
physx::PxU32 nbPairs )

◆ onSleep()

void Physics::PhysxState::onSleep ( physx::PxActor ** actors,
physx::PxU32 count )

◆ onTrigger()

void Physics::PhysxState::onTrigger ( physx::PxTriggerPair * pairs,
physx::PxU32 count )
inline

◆ onWake()

void Physics::PhysxState::onWake ( physx::PxActor ** actors,
physx::PxU32 count )

◆ Setup()

void Physics::PhysxState::Setup ( )

Setup Px subsystems.

◆ Shutdown()

void Physics::PhysxState::Shutdown ( )

◆ Step() [1/2]

void Physics::PhysxState::Step ( Timing::Time delta)

convenience function to do a sync simulation step on every scene

◆ Step() [2/2]

void Physics::PhysxState::Step ( Timing::Time delta,
IndexT scene )

one sync simulation step of a single scene. Actor reads and writes have to happen outside of this

Member Data Documentation

◆ activeSceneIds

Util::StackArray<IndexT, 8> Physics::PhysxState::activeSceneIds

◆ activeScenes

Util::StackArray<Physics::Scene, 8> Physics::PhysxState::activeScenes

◆ allocator

Physics::Allocator Physics::PhysxState::allocator

◆ awakeActors

Util::Set<Ids::Id32> Physics::PhysxState::awakeActors

◆ deadSceneIds

Util::StackArray<IndexT, 8> Physics::PhysxState::deadSceneIds

◆ errorCallback

Physics::ErrorCallback Physics::PhysxState::errorCallback

◆ FallbackMaterial

Physics::Material Physics::PhysxState::FallbackMaterial

◆ foundation

physx::PxFoundation* Physics::PhysxState::foundation

◆ materialNameTable

Util::Dictionary<Util::StringAtom, IndexT> Physics::PhysxState::materialNameTable

◆ materials

Util::StackArray<Physics::Material, 16> Physics::PhysxState::materials

◆ onSleepCallback

Util::Delegate<void(ActorId*, SizeT)> Physics::PhysxState::onSleepCallback

◆ onWakeCallback

Util::Delegate<void(ActorId*, SizeT)> Physics::PhysxState::onWakeCallback

◆ overlapBuffer

physx::PxOverlapHit Physics::PhysxState::overlapBuffer[MAX_SHAPE_OVERLAPS]

◆ physics

physx::PxPhysics* Physics::PhysxState::physics

◆ pvd

physx::PxPvd* Physics::PhysxState::pvd

◆ transport

physx::PxPvdTransport* Physics::PhysxState::transport

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