Nebula
Loading...
Searching...
No Matches
physicsinterface.cc File Reference
#include "foundation/stdneb.h"
#include "PxConfig.h"
#include "PxPhysicsAPI.h"
#include "physicsinterface.h"
#include "physics/utils.h"
#include "physics/actorcontext.h"
#include "math/scalar.h"
#include "timing/time.h"
#include "physics/physxstate.h"
#include "physics/streamactorpool.h"
#include "resources/resourceserver.h"
#include "io/assignregistry.h"
#include "io/ioserver.h"
#include "nflatbuffer/flatbufferinterface.h"

Namespaces

namespace  Physics
 Diverse functions for manipulating physics actors.
 

Macros

#define PHYSX_MEMORY_ALLOCATION_DEBUG   false
 
#define PHYSX_THREADS   4
 

Functions

void Physics::LoadMaterialTable (const IO::URI &materialTable)
 
void Physics::Setup ()
 initialize the physics subsystem and create a default scene
 
void Physics::ShutDown ()
 close the physics subsystem
 
IndexT Physics::CreateScene ()
 
void Physics::DestroyScene (IndexT sceneId)
 
Physics::ScenePhysics::GetScene (IndexT idx)
 
void Physics::SetEventCallback (EventCallbackType callback, IndexT sceneId)
 
void Physics::SetActiveActorCallback (UpdateFunctionType callback, IndexT sceneId)
 
void Physics::RenderDebug ()
 render a debug visualization of the level
 
Physics::MaterialPhysics::GetMaterial (IndexT idx)
 
void Physics::SetOnSleepCallback (Util::Delegate< void(ActorId *id, SizeT num)> const &callback)
 
void Physics::SetOnWakeCallback (Util::Delegate< void(ActorId *id, SizeT num)> const &callback)
 
IndexT Physics::SetPhysicsMaterial (Util::StringAtom name, float staticFriction, float dynamicFriction, float restitution, float density)
 
IndexT Physics::LookupMaterial (Util::StringAtom name)
 
SizeT Physics::GetNrMaterials ()
 
void Physics::Update (Timing::Time delta)
 perform sync simulation step(s)
 
void Physics::BeginSimulating (Timing::Time delta, IndexT scene)
 explicit calls to simulate and fetch results. Do not mix with Update!
 
void Physics::EndSimulating (IndexT scene)
 
void Physics::FlushSimulation (IndexT scene)
 this will block until simulation has ended for cleanups e.g.
 
ActorId Physics::CreateActorInstance (Physics::ActorResourceId id, Math::transform const &trans, Physics::ActorType type, uint64_t userData, IndexT scene)
 
void Physics::DestroyActorInstance (Physics::ActorId id)
 

Macro Definition Documentation

◆ PHYSX_MEMORY_ALLOCATION_DEBUG

#define PHYSX_MEMORY_ALLOCATION_DEBUG   false

◆ PHYSX_THREADS

#define PHYSX_THREADS   4