iCollideSystem Struct Reference
This is the Collide plug-in. More...
#include <ivaria/collider.h>
Inheritance diagram for iCollideSystem:

Public Member Functions | |
virtual bool | Collide (iCollider *collider1, const csReversibleTransform *trans1, iCollider *collider2, const csReversibleTransform *trans2)=0 |
Test collision between two colliders. | |
virtual bool | CollideRay (iCollider *collider, const csReversibleTransform *trans, const csVector3 &start, const csVector3 &end)=0 |
Collide a collider with a world space ray. | |
virtual bool | CollideSegment (iCollider *collider, const csReversibleTransform *trans, const csVector3 &start, const csVector3 &end)=0 |
Collide a collider with a world space segment. | |
virtual csPtr< iCollider > | CreateCollider (iPolygonMesh *mesh)=0 |
Create a iCollider for the given mesh geometry. | |
virtual size_t | GetCollisionPairCount ()=0 |
Get number of collision pairs in array. | |
virtual csCollisionPair * | GetCollisionPairs ()=0 |
Get pointer to current array of collision pairs. | |
virtual const csArray< csIntersectingTriangle > & | GetIntersectingTriangles () const =0 |
Get the array of intersection points as returned by CollideRay(). | |
virtual bool | GetOneHitOnly ()=0 |
Return true if this CD system will only return the first hit that is found. | |
virtual void | ResetCollisionPairs ()=0 |
Reset the array with collision pairs. | |
virtual void | SetOneHitOnly (bool o)=0 |
Indicate if we are interested only in the first hit that is found. |
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.
Main creators of instances implementing this interface:
- OPCODE plugin (crystalspace.collisiondetection.opcode)
Definition at line 93 of file collider.h.
Member Function Documentation
|
Test collision between two colliders. 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 (very important! Do not forget this). Every call to Collide will add to that array.
|
|
Collide a collider with a world space ray.
|
|
Collide a collider with a world space segment. This will not return collisions with triangles behind the end of the segment.
|
|
Create a iCollider for the given mesh geometry.
|
|
Get number of collision pairs in array.
|
|
Get pointer to current array of collision pairs. This array will grow with every call to Collide until you clear it using 'ResetCollisionPairs'. Note that the triangles are in object space and not world space!
|
|
Get the array of intersection points as returned by CollideRay(). Note that the coordinates in the array of triangles is in object space of the collider object and not world space! |
|
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.
|
|
Reset the array with collision pairs. It is very important to call this before collision detection. Otherwise the internal table of collision pairs will grow forever. |
|
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:
- ivaria/collider.h
Generated for Crystal Space by doxygen 1.4.4