Foundation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
Foundation::Examples::JoltPhysicsWorld Class Reference

#include <JoltPhysicsWorld.hpp>

Classes

struct  Impl
 

Public Member Functions

 JoltPhysicsWorld (Core::JobSystem *jobs, PhysicsWorldDesc const &desc={})
 
 ~JoltPhysicsWorld ()
 
 JoltPhysicsWorld (JoltPhysicsWorld const &)=delete
 
JoltPhysicsWorldoperator= (JoltPhysicsWorld const &)=delete
 
 JoltPhysicsWorld (JoltPhysicsWorld &&)=delete
 
JoltPhysicsWorldoperator= (JoltPhysicsWorld &&)=delete
 
PhysicsStatus CreateShape (PhysicsShapeDesc const &desc, PhysicsShapeHandle &outHandle)
 
PhysicsStatus DestroyShape (PhysicsShapeHandle handle)
 
PhysicsStatus CreateBody (PhysicsBodyDesc const &desc, PhysicsBodyHandle &outHandle)
 
PhysicsStatus DestroyBody (PhysicsBodyHandle handle)
 
bool IsBodyValid (PhysicsBodyHandle handle) const
 
PhysicsStatus SetBodyPose (PhysicsBodyHandle handle, PhysicsBodyPose const &pose, PhysicsActivation activation=PhysicsActivation::Activate)
 
PhysicsStatus GetBodyPose (PhysicsBodyHandle handle, PhysicsBodyPose &outPose) const
 
PhysicsStatus SetLinearVelocity (PhysicsBodyHandle handle, float3 const &velocity)
 
PhysicsStatus GetLinearVelocity (PhysicsBodyHandle handle, float3 &outVelocity) const
 
PhysicsStatus AddForce (PhysicsBodyHandle handle, float3 const &force)
 
PhysicsStatus AddImpulse (PhysicsBodyHandle handle, float3 const &impulse)
 
PhysicsStatus RayCast (PhysicsRayDesc const &ray, PhysicsRayHit &outHit) const
 
PhysicsStatus Step (float deltaSeconds, int collisionSteps=1)
 
void OptimizeBroadPhase ()
 
uint32_t GetBodyCount () const
 
uint32_t GetMaxBodies () const
 

Private Attributes

ImplmImpl {}
 
PhysicsWorldDesc mDesc {}
 
uint32_t mBodyCount {0}
 

Constructor & Destructor Documentation

◆ JoltPhysicsWorld() [1/3]

Foundation::Examples::JoltPhysicsWorld::JoltPhysicsWorld ( Core::JobSystem jobs,
PhysicsWorldDesc const &  desc = {} 
)
explicit

◆ ~JoltPhysicsWorld()

Foundation::Examples::JoltPhysicsWorld::~JoltPhysicsWorld ( )

◆ JoltPhysicsWorld() [2/3]

Foundation::Examples::JoltPhysicsWorld::JoltPhysicsWorld ( JoltPhysicsWorld const &  )
delete

◆ JoltPhysicsWorld() [3/3]

Foundation::Examples::JoltPhysicsWorld::JoltPhysicsWorld ( JoltPhysicsWorld &&  )
delete

Member Function Documentation

◆ AddForce()

PhysicsStatus Foundation::Examples::JoltPhysicsWorld::AddForce ( PhysicsBodyHandle  handle,
float3 const &  force 
)

◆ AddImpulse()

PhysicsStatus Foundation::Examples::JoltPhysicsWorld::AddImpulse ( PhysicsBodyHandle  handle,
float3 const &  impulse 
)

◆ CreateBody()

PhysicsStatus Foundation::Examples::JoltPhysicsWorld::CreateBody ( PhysicsBodyDesc const &  desc,
PhysicsBodyHandle outHandle 
)

◆ CreateShape()

PhysicsStatus Foundation::Examples::JoltPhysicsWorld::CreateShape ( PhysicsShapeDesc const &  desc,
PhysicsShapeHandle outHandle 
)

◆ DestroyBody()

PhysicsStatus Foundation::Examples::JoltPhysicsWorld::DestroyBody ( PhysicsBodyHandle  handle)

◆ DestroyShape()

PhysicsStatus Foundation::Examples::JoltPhysicsWorld::DestroyShape ( PhysicsShapeHandle  handle)

◆ GetBodyCount()

uint32_t Foundation::Examples::JoltPhysicsWorld::GetBodyCount ( ) const
inline

◆ GetBodyPose()

PhysicsStatus Foundation::Examples::JoltPhysicsWorld::GetBodyPose ( PhysicsBodyHandle  handle,
PhysicsBodyPose outPose 
) const

◆ GetLinearVelocity()

PhysicsStatus Foundation::Examples::JoltPhysicsWorld::GetLinearVelocity ( PhysicsBodyHandle  handle,
float3 &  outVelocity 
) const

◆ GetMaxBodies()

uint32_t Foundation::Examples::JoltPhysicsWorld::GetMaxBodies ( ) const
inline

◆ IsBodyValid()

bool Foundation::Examples::JoltPhysicsWorld::IsBodyValid ( PhysicsBodyHandle  handle) const

◆ operator=() [1/2]

JoltPhysicsWorld & Foundation::Examples::JoltPhysicsWorld::operator= ( JoltPhysicsWorld &&  )
delete

◆ operator=() [2/2]

JoltPhysicsWorld & Foundation::Examples::JoltPhysicsWorld::operator= ( JoltPhysicsWorld const &  )
delete

◆ OptimizeBroadPhase()

void Foundation::Examples::JoltPhysicsWorld::OptimizeBroadPhase ( )

◆ RayCast()

PhysicsStatus Foundation::Examples::JoltPhysicsWorld::RayCast ( PhysicsRayDesc const &  ray,
PhysicsRayHit outHit 
) const

◆ SetBodyPose()

PhysicsStatus Foundation::Examples::JoltPhysicsWorld::SetBodyPose ( PhysicsBodyHandle  handle,
PhysicsBodyPose const &  pose,
PhysicsActivation  activation = PhysicsActivation::Activate 
)

◆ SetLinearVelocity()

PhysicsStatus Foundation::Examples::JoltPhysicsWorld::SetLinearVelocity ( PhysicsBodyHandle  handle,
float3 const &  velocity 
)

◆ Step()

PhysicsStatus Foundation::Examples::JoltPhysicsWorld::Step ( float  deltaSeconds,
int  collisionSteps = 1 
)

Member Data Documentation

◆ mBodyCount

uint32_t Foundation::Examples::JoltPhysicsWorld::mBodyCount {0}
private

◆ mDesc

PhysicsWorldDesc Foundation::Examples::JoltPhysicsWorld::mDesc {}
private

◆ mImpl

Impl* Foundation::Examples::JoltPhysicsWorld::mImpl {}
private

The documentation for this class was generated from the following files: