#include <CCollisionSpheresGeometry.h>
Public Member Functions | |
cCollisionSpheresTri (cVector3d a, cVector3d b, cVector3d c, double a_extendedRadius) | |
Constructor of cCollisionSpheresTri. | |
virtual | ~cCollisionSpheresTri () |
Destructor of cCollisionSpheresTri. | |
bool | computeCollision (cCollisionSpheresGenericShape *a_other, cCollisionRecorder &a_recorder, cCollisionSettings &a_settings) |
Return whether triangle collides with given line. | |
const cVector3d & | getCenter () const |
Return the center of the triangle. | |
double | getRadius () const |
Return the radius of the triangle. | |
cTriangle * | getOriginal () |
Returns the cTriangle object in the mesh associated with this triangle. | |
void | setOriginal (cTriangle *a_original) |
Sets the cTriangle object in the mesh associated with this triangle. | |
Protected Attributes | |
cCollisionSpheresPoint | m_corner [3] |
The vertices of the triangle. | |
cCollisionSpheresEdge | m_side [3] |
The edges of the triangle. | |
cVector3d | m_center |
The center of the triangle. | |
double | m_radius |
The radius of the triangle. | |
cTriangle * | m_original |
The cTriangle object in the mesh associated with this triangle. |
cCollisionSpheresTri::cCollisionSpheresTri | ( | cVector3d | a, | |
cVector3d | b, | |||
cVector3d | c, | |||
double | a_extendedRadius | |||
) |
Constructor of cCollisionSpheresTri.
Constructor of cCollisionSpheresTri, to enclose a single triangle in a sphere.
a | First vertex of the triangle. | |
b | Second vertex of the triangle. | |
c | Third vertex of the triangle. | |
a_extendedRadius | Additional radius to add to sphere. |
bool cCollisionSpheresTri::computeCollision | ( | cCollisionSpheresGenericShape * | a_other, | |
cCollisionRecorder & | a_recorder, | |||
cCollisionSettings & | a_settings | |||
) | [virtual] |
Return whether triangle collides with given line.
Determine whether there is any intersection between the primitives (this triangle and the given line) by calling the collision detection method of the cTriangle object associated with this triangle primitive.
a_other | The line primitive to check for intersection. | |
a_recorder | Stores all collision events. | |
a_settings | Contains collision settings information. |
Implements cCollisionSpheresGenericShape.