Test if an object can move to a new position.More...
Detailed Description
This is the Collide plug-in.
This plugin is a factory for creating iCollider entities. A collider represents an entity in the collision detection world. It uses the geometry data as given by iPolygonMesh.
This is only supported for iCollider objects created by this plugin. Returns false if no collision or else true. The collisions will be added to the collision pair array that you can query with GetCollisionPairs and reset/clear with ResetCollisionPairs. Every call to Collide will add to that array.
The new position vector will be modified to reflect the maximum new position that the object could move to without colliding with something. This function will return:
-1 if the object could not move at all (i.e. stuck at start position).
0 if the object could not move fully to the desired position.
1 if the object can move unhindered to the end position.
This function will reset the collision pair array. If there was a collision along the way the array will contain the information for the first collision preventing movement.
The given transform should be the transform of the object corresponding with the old position. 'colliders' and 'transforms' should be arrays with 'num_colliders' elements for all the objects that we should test against.
This array will grow with every call to Collide until you clear it using 'ResetCollisionPairs'.
bool iCollideSystem::GetOneHitOnly (
) [pure virtual]
Return true if this CD system will only return the first hit that is found.
For CD systems that support multiple hits this will return the value set by the SetOneHitOnly() function. For CD systems that support one hit only this will always return true.
void iCollideSystem::SetOneHitOnly (
bool o ) [pure virtual]
Indicate if we are interested only in the first hit that is found.
This is only valid for CD algorithms that actually allow the detection of multiple CD hit points.
The documentation for this struct was generated from the following file: