19#include "flat/physics/material.h"
22#include "PxPhysicsAPI.h"
Nebula's dynamic array class.
Definition array.h:60
Nebula delegate class, allows to store a function, method or lambda call into a C++ object for later ...
Definition delegate.h:39
A collection of unique values with quick lookup.
Definition set.h:34
A StringAtom.
Definition stringatom.h:22
This simple Id pool implements a set of free and used consecutive integers.
Definition id.h:135
uint32_t Id32
Definition id.h:138
Diverse functions for manipulating physics actors.
Definition actorcontext.cc:18
Physics::Scene & GetScene(IndexT idx)
Definition physicsinterface.cc:173
void FlushSimulation(IndexT scene)
this will block until simulation has ended for cleanups e.g.
Definition physicsinterface.cc:350
ActorType
Definition physicsinterface.h:35
@ Dynamic
Definition physicsinterface.h:38
@ Kinematic
Definition shapes.h:18
@ Static
Definition shapes.h:17
void RenderDebug()
render a debug visualization of the level
Definition physicsinterface.cc:200
SizeT GetNrMaterials()
Definition physicsinterface.cc:300
void ShutDown()
close the physics subsystem
Definition physicsinterface.cc:86
void SetEventCallback(EventCallbackType callback, IndexT sceneId)
Definition physicsinterface.cc:182
Physics::Material & GetMaterial(IndexT idx)
Definition physicsinterface.cc:228
ActorId CreateActorInstance(Physics::ActorResourceId id, Math::transform const &trans, Physics::ActorType type, uint64_t userData, IndexT scene)
Definition physicsinterface.cc:359
void Setup()
initialize the physics subsystem and create a default scene
Definition physicsinterface.cc:62
void SetOnSleepCallback(Util::Delegate< void(ActorId *id, SizeT num)> const &callback)
Definition physicsinterface.cc:241
void EndSimulating(IndexT scene)
Definition physicsinterface.cc:341
void DestroyActorInstance(Physics::ActorId id)
Definition physicsinterface.cc:368
void DestroyScene(IndexT sceneId)
Definition physicsinterface.cc:140
void SetActiveActorCallback(UpdateFunctionType callback, IndexT sceneId)
Definition physicsinterface.cc:191
void(*)(const Actor &) UpdateFunctionType
Definition physicsinterface.h:97
void SetOnWakeCallback(Util::Delegate< void(ActorId *id, SizeT num)> const &callback)
Definition physicsinterface.cc:250
void BeginSimulating(Timing::Time delta, IndexT scene)
explicit calls to simulate and fetch results. Do not mix with Update!
Definition physicsinterface.cc:328
void Update(Timing::Time delta)
perform sync simulation step(s)
Definition physicsinterface.cc:315
IndexT SetPhysicsMaterial(Util::StringAtom name, float staticFriction, float dynamicFriction, float restitution, float density)
Definition physicsinterface.cc:259
IndexT CreateScene()
Definition physicsinterface.cc:95
IndexT LookupMaterial(Util::StringAtom name)
Definition physicsinterface.cc:291
void(*)(const Util::Array< ContactEvent > &) EventCallbackType
Definition physicsinterface.h:110
double Time
the time datatype
Definition time.h:18
#define RESOURCE_ID_TYPE(type)
Definition resourceid.h:41
Represents a 3D point in space.
Definition point.h:22
A vector is a 3D direction in space.
Definition vector.h:22
Definition physicsinterface.h:71
physx::PxActor * actor
Definition physicsinterface.h:72
ActorResourceId res
Definition physicsinterface.h:74
uint64_t userData
Definition physicsinterface.h:75
ActorId id
Definition physicsinterface.h:73
Definition physicsinterface.h:50
ActorId()
Definition physicsinterface.h:52
ActorId(uint32_t i)
Definition physicsinterface.h:53
Ids::Id32 id
Definition physicsinterface.h:51
Definition physicsinterface.h:29
Definition physicsinterface.h:90
AggregateResourceId res
Definition physicsinterface.h:92
AggregateId id
Definition physicsinterface.h:91
Util::Array< ActorId > actors
Definition physicsinterface.h:93
Util::Array< ConstraintId > constraints
Definition physicsinterface.h:94
Definition physicsinterface.h:64
AggregateId()
Definition physicsinterface.h:66
AggregateId(uint32_t i)
Definition physicsinterface.h:67
Ids::Id32 id
Definition physicsinterface.h:65
Definition physicsinterface.h:30
Definition physicsinterface.h:82
ConstraintId id
Definition physicsinterface.h:83
Ids::Id32 res
Definition physicsinterface.h:84
uint64_t userData
Definition physicsinterface.h:86
physx::PxJoint * joint
Definition physicsinterface.h:85
Definition physicsinterface.h:57
Ids::Id32 id
Definition physicsinterface.h:58
ConstraintId(uint32_t i)
Definition physicsinterface.h:60
ConstraintId()
Definition physicsinterface.h:59
Definition physicsinterface.h:32
Definition physicsinterface.h:42
Util::StringAtom name
Definition physicsinterface.h:44
physx::PxMaterial * material
Definition physicsinterface.h:43
uint64_t serialId
Definition physicsinterface.h:45
float density
Definition physicsinterface.h:46
Definition physicsinterface.h:31
physx scene classes, foundation and physics are duplicated here for convenience instead of static get...
Definition physicsinterface.h:115
Util::Set< Ids::Id32 > modifiedActors
Definition physicsinterface.h:126
Timing::Time time
Definition physicsinterface.h:123
physx::PxFoundation * foundation
Definition physicsinterface.h:116
UpdateFunctionType updateFunction
Definition physicsinterface.h:121
physx::PxPhysics * physics
Definition physicsinterface.h:117
EventCallbackType eventCallback
Definition physicsinterface.h:122
bool isSimulating
Definition physicsinterface.h:124
physx::PxDefaultCpuDispatcher * dispatcher
Definition physicsinterface.h:120
Util::Array< Physics::ContactEvent > eventBuffer
Definition physicsinterface.h:125
physx::PxScene * scene
Definition physicsinterface.h:118
physx::PxControllerManager * controllerManager
Definition physicsinterface.h:119
Nebula's universal string class.
Definition string.h:50
Typedefs for the Timing subsystem.
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48