#include <CCollisionSpheresGeometry.h>
Public Member Functions | |
cCollisionSpheresLine (cVector3d &a_segmentPointA, cVector3d &a_segmentPointB) | |
Constructor of cCollisionSpheresLine. | |
virtual | ~cCollisionSpheresLine () |
Destructor of cCollisionSpheresLine. | |
const cVector3d & | getCenter () const |
Return the center of the line. | |
double | getRadius () const |
Return the radius of the line. | |
bool | computeCollision (cCollisionSpheresGenericShape *a_other, cCollisionRecorder &a_recorder, cCollisionSettings &a_settings) |
Return whether this line intersects the given triangle. | |
cVector3d | getSegmentPointA () |
Get first endpoint of the line. | |
cVector3d | getSegmentPointB () |
Get direction vector of the line. | |
Protected Attributes | |
cVector3d | m_center |
The center of the line. | |
double | m_radius |
The radius of the line. | |
cVector3d | m_segmentPointA |
The first endpoint of the line. | |
cVector3d | m_segmentPointB |
The first endpoint of the line. |
cCollisionSpheresLine::cCollisionSpheresLine | ( | cVector3d & | a_segmentPointA, | |
cVector3d & | a_segmentPointB | |||
) |
Constructor of cCollisionSpheresLine.
Constructor of cCollisionSpheresLine.
a_segmentPointA | First endpoint of the line segment. | |
a_segmentPointB | Second endpoint of the line segment. |
bool cCollisionSpheresLine::computeCollision | ( | cCollisionSpheresGenericShape * | a_other, | |
cCollisionRecorder & | a_recorder, | |||
cCollisionSettings & | a_settings | |||
) | [virtual] |
Return whether this line intersects the given triangle.
Determine whether there is any intersection between the primitives (this line and the given triangle) by calling the collision detection method of the triangle primitive.
a_other | The triangle primitive to check for intersection. | |
a_recorder | Stores all collision events. | |
a_settings | Contains collision settings information. |
Implements cCollisionSpheresGenericShape.