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 Update (Timing::Time delta)
 convenience function to do a sync full simulation step. Do not mix Update and Begin/EndFrame!
 
void BeginSimulating (Timing::Time delta, IndexT scene)
 explicit call to simulate, will process async in the background
 
void EndSimulating (IndexT scene)
 explicit call to fetch the results of the simulation
 
void FlushSimulation (IndexT scene)
 will block until a potential simulation step is done
 
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::Id32awakeActors
 
Util::Dictionary< Util::StringAtom, IndexTmaterialNameTable
 
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

◆ BeginSimulating()

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

explicit call to simulate, will process async in the background

◆ 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

◆ EndSimulating()

void Physics::PhysxState::EndSimulating ( IndexT scene)

explicit call to fetch the results of the simulation

◆ FlushSimulation()

void Physics::PhysxState::FlushSimulation ( IndexT scene)

will block until a potential simulation step is done

◆ 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 ( )

◆ Update()

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

convenience function to do a sync full simulation step. Do not mix Update and Begin/EndFrame!

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: