RigidBodyController::ValidRigidBodyCollision
Defined in:
Returns a boolean value indicating whether a collision with another rigid body would be valid.
C4Physics.h
Prototype
virtual bool ValidRigidBodyCollision(const RigidBodyController *body) const;
Parameters
body |
A pointer to another rigid body with which a collision might occur. |
Description
The ValidRigidBodyCollision
function returns a boolean value indicating whether a collision between the rigid body for which it is called and the rigid body specified by the body
parameter should be considered valid. This function can be overridden in a subclass of RigidBodyController
to implement arbitrary collision masking. The default implementation in the base class checks whether the collision kind of the rigid body for which ValidRigidBodyCollision
is called is excluded by the collision exclusion mask for the rigid body specified by the body
parameter. The function returns true
if a collision between the two bodies is allowed, and it returns false
if such a collision should never occur.When a collision might occur between two rigid bodies, the
ValidRigidBodyCollision
function is called twice, one time for each rigid body with the other rigid body passed as the body
parameter.
See Also
RigidBodyController::ValidGeometryCollision
RigidBodyController::GetCollisionKind
RigidBodyController::SetCollisionKind