Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
BodyLockBase< Write, BodyType > Class Template Reference

Base class for locking bodies for the duration of the scope of this class (do not use directly) More...

#include <BodyLock.h>

Inheritance diagram for BodyLockBase< Write, BodyType >:
NonCopyable

Public Member Functions

 BodyLockBase (const BodyLockInterface &inBodyLockInterface, const BodyID &inBodyID)
 Constructor will lock the body.
 
void ReleaseLock ()
 Explicitly release the lock (normally this is done in the destructor)
 
 ~BodyLockBase ()
 Destructor will unlock the body.
 
bool Succeeded () const
 Test if the lock was successful (if the body ID was valid)
 
bool SucceededAndIsInBroadPhase () const
 Test if the lock was successful (if the body ID was valid) and the body is still in the broad phase.
 
BodyType & GetBody () const
 Access the body.
 
- Public Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 

Detailed Description

template<bool Write, class BodyType>
class BodyLockBase< Write, BodyType >

Base class for locking bodies for the duration of the scope of this class (do not use directly)

Constructor & Destructor Documentation

◆ BodyLockBase()

template<bool Write, class BodyType >
BodyLockBase< Write, BodyType >::BodyLockBase ( const BodyLockInterface inBodyLockInterface,
const BodyID inBodyID 
)
inline

Constructor will lock the body.

◆ ~BodyLockBase()

template<bool Write, class BodyType >
BodyLockBase< Write, BodyType >::~BodyLockBase ( )
inline

Destructor will unlock the body.

Member Function Documentation

◆ GetBody()

template<bool Write, class BodyType >
BodyType & BodyLockBase< Write, BodyType >::GetBody ( ) const
inline

Access the body.

◆ ReleaseLock()

template<bool Write, class BodyType >
void BodyLockBase< Write, BodyType >::ReleaseLock ( )
inline

Explicitly release the lock (normally this is done in the destructor)

◆ Succeeded()

template<bool Write, class BodyType >
bool BodyLockBase< Write, BodyType >::Succeeded ( ) const
inline

Test if the lock was successful (if the body ID was valid)

◆ SucceededAndIsInBroadPhase()

template<bool Write, class BodyType >
bool BodyLockBase< Write, BodyType >::SucceededAndIsInBroadPhase ( ) const
inline

Test if the lock was successful (if the body ID was valid) and the body is still in the broad phase.


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