Jolt Physics
A multi core friendly Game Physics Engine
|
#include <CollisionGroup.h>
Public Types | |
using | GroupID = uint32 |
using | SubGroupID = uint32 |
Public Member Functions | |
CollisionGroup ()=default | |
Default constructor. | |
CollisionGroup (const GroupFilter *inFilter, GroupID inGroupID, SubGroupID inSubGroupID) | |
Construct with all properties. | |
void | SetGroupFilter (const GroupFilter *inFilter) |
Set the collision group filter. | |
const GroupFilter * | GetGroupFilter () const |
Get the collision group filter. | |
void | SetGroupID (GroupID inID) |
Set the main group id for this object. | |
GroupID | GetGroupID () const |
void | SetSubGroupID (SubGroupID inID) |
Add this object to a sub group. | |
SubGroupID | GetSubGroupID () const |
bool | CanCollide (const CollisionGroup &inOther) const |
Check if this object collides with another object. | |
void | SaveBinaryState (StreamOut &inStream) const |
Saves the state of this object in binary form to inStream. Does not save group filter. | |
void | RestoreBinaryState (StreamIn &inStream) |
Restore the state of this object from inStream. Does not save group filter. | |
Static Public Attributes | |
static const GroupID | cInvalidGroup = ~GroupID(0) |
static const SubGroupID | cInvalidSubGroup = ~SubGroupID(0) |
Two objects collide with each other if:
using CollisionGroup::GroupID = uint32 |
using CollisionGroup::SubGroupID = uint32 |
|
default |
Default constructor.
|
inline |
Construct with all properties.
|
inline |
Check if this object collides with another object.
|
inline |
Get the collision group filter.
|
inline |
|
inline |
void CollisionGroup::RestoreBinaryState | ( | StreamIn & | inStream | ) |
Restore the state of this object from inStream. Does not save group filter.
void CollisionGroup::SaveBinaryState | ( | StreamOut & | inStream | ) | const |
Saves the state of this object in binary form to inStream. Does not save group filter.
|
inline |
Set the collision group filter.
|
inline |
Set the main group id for this object.
|
inline |
Add this object to a sub group.
|
static |