47 return mBodyID != inBodyID;
67 mBodyIDs.reserve(inSize);
73 mBodyIDs.push_back(inBodyID);
79 return std::find(mBodyIDs.begin(), mBodyIDs.end(), inBodyID) == mBodyIDs.end();
100 return inBodyID != mBodyID && mFilter.ShouldCollide(inBodyID);
106 return mFilter.ShouldCollideLocked(inBody);
114#ifdef JPH_DEBUG_RENDERER
#define JPH_EXPORT
Definition Core.h:236
unsigned int uint
Definition Core.h:453
#define JPH_NAMESPACE_END
Definition Core.h:379
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
Class function to filter out bodies for debug rendering, returns true if body should be rendered.
Definition BodyFilter.h:117
virtual bool ShouldDraw(const Body &inBody) const
Filter function. Returns true if inBody should be rendered.
Definition BodyFilter.h:123
virtual ~BodyDrawFilter()=default
Destructor.
Class function to filter out bodies, returns true if test should collide with body.
Definition BodyFilter.h:16
virtual bool ShouldCollideLocked(const Body &inBody) const
Filter function. Returns true if we should collide with inBody (this is called after the body is lock...
Definition BodyFilter.h:28
virtual ~BodyFilter()=default
Destructor.
virtual bool ShouldCollide(const BodyID &inBodyID) const
Filter function. Returns true if we should collide with inBodyID.
Definition BodyFilter.h:22
ID of a body. This is a way of reasoning about bodies in a multithreaded simulation while avoiding ra...
Definition BodyID.h:13
A simple body filter implementation that ignores multiple, specified bodies.
Definition BodyFilter.h:56
virtual bool ShouldCollide(const BodyID &inBodyID) const override
Filter function. Returns true if we should collide with inBodyID.
Definition BodyFilter.h:77
void Reserve(uint inSize)
Reserve space for inSize body ID's.
Definition BodyFilter.h:65
void IgnoreBody(const BodyID &inBodyID)
Add a body to be ignored.
Definition BodyFilter.h:71
void Clear()
Remove all bodies from the filter.
Definition BodyFilter.h:59
Ignores a single body and chains the filter to another filter.
Definition BodyFilter.h:88
IgnoreSingleBodyFilterChained(const BodyID inBodyID, const BodyFilter &inFilter)
Constructor.
Definition BodyFilter.h:91
virtual bool ShouldCollide(const BodyID &inBodyID) const override
Filter function. Returns true if we should collide with inBodyID.
Definition BodyFilter.h:98
virtual bool ShouldCollideLocked(const Body &inBody) const override
Filter function. Returns true if we should collide with inBody (this is called after the body is lock...
Definition BodyFilter.h:104
A simple body filter implementation that ignores a single, specified body.
Definition BodyFilter.h:36
virtual bool ShouldCollide(const BodyID &inBodyID) const override
Filter function. Returns true if we should collide with inBodyID.
Definition BodyFilter.h:45
IgnoreSingleBodyFilter(const BodyID &inBodyID)
Constructor, pass the body you want to ignore.
Definition BodyFilter.h:39
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition NonCopyable.h:11