C4 Engine Terathon Software C4 Engine API Documentation

• World Manager

API Links
Developer Links

struct CollisionData

Defined in:  C4Node.h
The CollisionData structure contains extended information about a collision.
Definition

struct CollisionData : CollisionPoint

Data Members
Geometry                *geometry; The geometry node with which the collision occurred. This is valid when the World::DetectCollision function returns true or the World::QueryCollision function returns kCollisionStateGeometry.
RigidBodyController     *rigidBody; The rigid body with which the collision occurred. This is valid only if the World::QueryCollision function was called and it returned kCollisionStateRigidBody.
unsigned_int32          triangleIndex; The index of the mesh triangle where the collision occurred. This is valid when the World::DetectCollision function returns true or the World::QueryCollision function returns kCollisionStateGeometry.
const Shape             *shape; The shape with which the collision occurred. This is valid only if the World::QueryCollision function was called and it returned kCollisionStateRigidBody.
Zone                        *zone; The zone in which the collision occurred. This is only valid if the collision occurred with a geometry, not a rigid body.
Description
The CollisionData structure is used to return information about a collision when using the World::DetectCollision and World::QueryCollision functions.
Base Classes
CollisionPoint The CollisionData structure extends the CollisionPoint structure.
See Also

World::DetectCollision

World::QueryCollision