Lysa  0.0
Lysa 3D Engine
JoltPhysicsScene Class Reference

Detailed Description

Jolt implementation of PhysicsScene. Owns the Jolt PhysicsSystem and provides update/debug helpers.

+ Inheritance diagram for JoltPhysicsScene:

Public Member Functions

 JoltPhysicsScene (const DebugConfig &debugConfig, JPH::TempAllocatorImpl &tempAllocator, JPH::JobSystemThreadPool &jobSystem, ContactListener &contactListener, const BPLayerInterfaceImpl &broadphaseLayerInterface, const ObjectVsBroadPhaseLayerFilterImpl &objectVsBroadphaseLayerFilter, const ObjectLayerPairFilterImpl &objectVsObjectLayerFilter)
 
void update (float deltaTime) override
 
void debug (DebugRenderer &debugRenderer) override
 
float3 getGravity () const override
 
auto & getBodyInterface ()
 
auto & getPhysicsSystem ()
 
auto & getTempAllocator () const
 
- Public Member Functions inherited from PhysicsScene
virtual ~PhysicsScene () = default
 

Constructor & Destructor Documentation

JoltPhysicsScene ( const DebugConfig debugConfig,
JPH::TempAllocatorImpl &  tempAllocator,
JPH::JobSystemThreadPool &  jobSystem,
ContactListener contactListener,
const BPLayerInterfaceImpl broadphaseLayerInterface,
const ObjectVsBroadPhaseLayerFilterImpl objectVsBroadphaseLayerFilter,
const ObjectLayerPairFilterImpl objectVsObjectLayerFilter 
)

Member Function Documentation

void debug ( DebugRenderer debugRenderer)
overridevirtual

Emits debug visualization primitives to the provided DebugRenderer. Used to display bodies, shapes, contacts, etc. when enabled.

Implements lysa::PhysicsScene::debug()

auto& getBodyInterface ( )
inline

Returns the body interface for creating/removing bodies.

float3 getGravity ( ) const
overridevirtual

Returns the current gravity vector applied to dynamic bodies.

Implements lysa::PhysicsScene::getGravity()

auto& getPhysicsSystem ( )
inline

Returns the underlying Jolt physics system.

auto& getTempAllocator ( ) const
inline

Returns the temporary allocator used by the scene.

void update ( float  deltaTime)
overridevirtual

Steps the physics simulation by the given delta time (seconds). Implementations may internally clamp or subdivide the step.

Implements lysa::PhysicsScene::update()