Nebula
Loading...
Searching...
No Matches
physicsinterface.h File Reference
#include "ids/id.h"
#include "timing/time.h"
#include "util/delegate.h"
#include "util/set.h"
#include "util/arraystack.h"
#include "util/stringatom.h"
#include "math/mat4.h"
#include "math/transform.h"
#include "resources/resourceid.h"
#include "flat/physics/material.h"
#include <functional>
#include "PxPhysicsAPI.h"

Go to the source code of this file.

Classes

struct  Physics::ActorResourceId
 
struct  Physics::AggregateResourceId
 
struct  Physics::PhysicsResourceId
 
struct  Physics::ConstraintResourceId
 
struct  Physics::Material
 
struct  Physics::ActorId
 
struct  Physics::ConstraintId
 
struct  Physics::AggregateId
 
struct  Physics::Actor
 
struct  Physics::Constraint
 
struct  Physics::Aggregate
 
struct  Physics::ContactEvent
 
struct  Physics::Scene
 physx scene classes, foundation and physics are duplicated here for convenience instead of static getters, might be removed later on More...
 

Namespaces

namespace  Physics
 Diverse functions for manipulating physics actors.
 

Typedefs

using Physics::UpdateFunctionType = void (*) (const Actor&)
 
using Physics::EventCallbackType = void (*) (const Util::Array<ContactEvent>&)
 

Enumerations

enum  Physics::ActorType { Physics::Static = 1 , Physics::Kinematic = 3 , Physics::Dynamic }
 

Functions

void Physics::Setup ()
 initialize the physics subsystem and create a default scene
 
void Physics::ShutDown ()
 close the physics subsystem
 
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.
 
IndexT Physics::CreateScene ()
 
void Physics::DestroyScene (IndexT sceneId)
 
Physics::ScenePhysics::GetScene (IndexT idx)
 
void Physics::SetActiveActorCallback (UpdateFunctionType callback, IndexT sceneId)
 
void Physics::SetEventCallback (EventCallbackType callback, IndexT sceneId)
 
void Physics::RenderDebug ()
 render a debug visualization of the level
 
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)
 
Physics::MaterialPhysics::GetMaterial (IndexT idx)
 
IndexT Physics::LookupMaterial (Util::StringAtom name)
 
SizeT Physics::GetNrMaterials ()
 
ActorId Physics::CreateActorInstance (Physics::ActorResourceId id, Math::transform const &trans, Physics::ActorType type, uint64_t userData, IndexT scene)
 
void Physics::DestroyActorInstance (Physics::ActorId id)