cCollisionSpheresLine Class Reference

cCollisionSpheresLine defines a line primitive that may collide with other primitives. It is used by the proxy algorithm. More...

#include <CCollisionSpheresGeometry.h>

Inheritance diagram for cCollisionSpheresLine:

cCollisionSpheresGenericShape List of all members.

Public Member Functions

 cCollisionSpheresLine (cVector3d &a_segmentPointA, cVector3d &a_segmentPointB)
 Constructor of cCollisionSpheresLine.
const cVector3dgetCenter () const
double getRadius () const
 Return the radius of the line.
bool computeCollision (cCollisionSpheresGenericShape *a_other, cGenericObject *&a_colObject, cTriangle *&a_colTriangle, cVector3d &a_colPoint, double &a_colSquareDistance)
 Return whether this line intersects the given triangle.
cVector3d getSegmentPointA ()
 Get first endpoint of the line.
cVector3d getDir ()
 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_dir
 The direction vector of the line.

Detailed Description

cCollisionSpheresLine defines a line primitive that may collide with other primitives. It is used by the proxy algorithm.


Constructor & Destructor Documentation

cCollisionSpheresLine::cCollisionSpheresLine ( cVector3d a_segmentPointA,
cVector3d a_segmentPointB 
)

Constructor of cCollisionSpheresLine.

Constructor of cCollisionSpheresLine.

Parameters:
a_segmentPointA First endpoint of the line segment.
a_segmentPointB Second endpoint of the line segment.


Member Function Documentation

const cVector3d& cCollisionSpheresLine::getCenter (  )  const [inline, virtual]

METHODS: Return the center of the line.

Implements cCollisionSpheresGenericShape.

bool cCollisionSpheresLine::computeCollision ( cCollisionSpheresGenericShape a_other,
cGenericObject *&  a_colObject,
cTriangle *&  a_colTriangle,
cVector3d a_colPoint,
double &  a_colSquareDistance 
) [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.

Parameters:
a_other The triangle primitive to check for intersection.
a_colObject Returns pointer to nearest collided object.
a_colTriangle Returns pointer to nearest collided triangle.
a_colPoint Returns position of nearest collision.
a_colSquareDistance Returns distance between ray origin and collision point.
Returns:
Return whether the given triangle intersects this line.

Implements cCollisionSpheresGenericShape.


The documentation for this class was generated from the following files:
Generated on Mon Jun 11 09:41:46 2007 for CHAI 3D by  doxygen 1.5.2