cCollisionSpheresLine Class Reference
[Collision Detection]

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

#include <CCollisionSpheresGeometry.h>

Inheritance diagram for cCollisionSpheresLine:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 cCollisionSpheresLine (cVector3d &a_segmentPointA, cVector3d &a_segmentPointB)
 Constructor of cCollisionSpheresLine.
virtual ~cCollisionSpheresLine ()
 Destructor of cCollisionSpheresLine.
const cVector3dgetCenter () 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.


Detailed Description

cCollisionSpheresLine defines a line primitive that may collide with other primitives. It is used for instance 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

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.

Parameters:
a_other The triangle primitive to check for intersection.
a_recorder Stores all collision events.
a_settings Contains collision settings information.
Returns:
Return whether the given triangle intersects this line.

Implements cCollisionSpheresGenericShape.


The documentation for this class was generated from the following files:


CHAI3D 2.0.0 documentation
Please address any questions to support@chai3d.org
(C) 2003-2009 - CHAI 3D
All Rights Reserved.