39 mGroupFilter = inFilter;
74 if (mGroupFilter !=
nullptr)
75 return mGroupFilter->
CanCollide(*
this, inOther);
76 else if (inOther.mGroupFilter !=
nullptr)
77 return inOther.mGroupFilter->
CanCollide(inOther, *
this);
uint32_t uint32
Definition Core.h:312
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.h:234
#define JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(class_name)
Definition SerializableObject.h:71
Definition CollisionGroup.h:20
GroupID GetGroupID() const
Definition CollisionGroup.h:54
SubGroupID GetSubGroupID() const
Definition CollisionGroup.h:65
void SetGroupFilter(const GroupFilter *inFilter)
Set the collision group filter.
Definition CollisionGroup.h:37
static const GroupID cInvalidGroup
Definition CollisionGroup.h:27
void SaveBinaryState(StreamOut &inStream) const
Saves the state of this object in binary form to inStream. Does not save group filter.
Definition CollisionGroup.cpp:21
static const SubGroupID cInvalidSubGroup
Definition CollisionGroup.h:28
void SetSubGroupID(SubGroupID inID)
Add this object to a sub group.
Definition CollisionGroup.h:60
bool CanCollide(const CollisionGroup &inOther) const
Check if this object collides with another object.
Definition CollisionGroup.h:71
uint32 GroupID
Definition CollisionGroup.h:24
void SetGroupID(GroupID inID)
Set the main group id for this object.
Definition CollisionGroup.h:49
const GroupFilter * GetGroupFilter() const
Get the collision group filter.
Definition CollisionGroup.h:43
void RestoreBinaryState(StreamIn &inStream)
Restore the state of this object from inStream. Does not save group filter.
Definition CollisionGroup.cpp:27
uint32 SubGroupID
Definition CollisionGroup.h:25
Abstract class that checks if two CollisionGroups collide.
Definition GroupFilter.h:18
virtual bool CanCollide(const CollisionGroup &inGroup1, const CollisionGroup &inGroup2) const =0
Check if two groups collide.
Definition Reference.h:154
Simple binary input stream.
Definition StreamIn.h:11
Simple binary output stream.
Definition StreamOut.h:11