cSegment3d Struct Reference
[Math]

cSegment3d represents a line segment with a start and an end. More...

#include <CVector3d.h>

List of all members.

Public Member Functions

 cSegment3d (const cVector3d &a_start, const cVector3d &a_end)
 Constructor of cSegment3d.
double distanceSquaredToPoint (const cVector3d &a_point, double &a_t, cVector3d *a_closestPoint=0)
 Returns the squared distance from this segment to a_point.

Public Attributes

cVector3d m_start
 Start point of segment.
cVector3d m_end
 End point of segment.


Detailed Description

cSegment3d represents a line segment with a start and an end.

Member Function Documentation

double cSegment3d::distanceSquaredToPoint ( const cVector3d a_point,
double &  a_t,
cVector3d a_closestPoint = 0 
)

Returns the squared distance from this segment to a_point.

Returns the squared distance from this segment to a_point and the position along the segment (from 0.0 to 1.0) of the closest point.

Parameters:
a_point Point to test.
a_t return value for the position along the segment.
a_closestPoint The closest point on this segment to the supplied point.
Returns:
The distance from a_point to this segment.


The documentation for this struct 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.