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);
83 void SaveBinaryState(
StreamOut &inStream)
const;
86 void RestoreBinaryState(
StreamIn &inStream);
90 GroupID mGroupID = cInvalidGroup;
91 SubGroupID mSubGroupID = cInvalidSubGroup;
#define JPH_EXPORT
Definition: Core.h:227
#define JPH_NAMESPACE_END
Definition: Core.h:367
std::uint32_t uint32
Definition: Core.h:442
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:361
#define JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(linkage, 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
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
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:151
Simple binary input stream.
Definition: StreamIn.h:13
Simple binary output stream.
Definition: StreamOut.h:13