"L. Spiro Engine"
Public Member Functions | Public Attributes

lsm::CLineSeg3Base< _tType, _tVec3Type > Class Template Reference

A 3D line segment stored as 2 points. More...

#include <LSMLineSeg3Base.h>

List of all members.

Public Member Functions

LSE_INLINE LSE_CALLCTOR CLineSeg3Base (const CLineSeg3Base< _tType, _tVec3Type > &_lsbLine)
LSE_INLINE LSE_CALLCTOR CLineSeg3Base (const _tVec3Type &_vStart, const _tVec3Type &_vEnd)
_tVec3Type LSE_FCALL ClosestPointOnLineSegToPoint (const _tVec3Type &_vPoint, _tType &_tT) const
_tType LSE_FCALL SqDistToPoint (const _tVec3Type &_vPoint) const
_tType LSE_FCALL ClosestPointOnLineSegToLineSeg (const CLineSeg3Base< _tType, _tVec3Type > &_lsbLine, _tType &_tS, _tType &_tT, _tType &_tRealS, _tType &_tRealT, _tVec3Type &_v0, _tVec3Type &_v1) const
_tType LSE_FCALL Len () const
_tType LSE_FCALL LenSq () const

Public Attributes

_tVec3Type p
_tVec3Type q

Detailed Description

template<typename _tType, typename _tVec3Type>
class lsm::CLineSeg3Base< _tType, _tVec3Type >

A 3D line segment stored as 2 points.

Class CLineSeg3Base Description: A 3D line segment stored as 2 points.


Member Function Documentation

template<typename _tType, typename _tVec3Type>
_tType LSE_FCALL lsm::CLineSeg3Base< _tType, _tVec3Type >::ClosestPointOnLineSegToLineSeg ( const CLineSeg3Base< _tType, _tVec3Type > &  _lsbLine,
_tType &  _tS,
_tType &  _tT,
_tType &  _tRealS,
_tType &  _tRealT,
_tVec3Type &  _v0,
_tVec3Type &  _v1 
) const [inline]

Get the squared distance between this segment and another segment. Also returns t for the position of that point along both segments.

Parameters:
_lsbLineLine segment to test against this line segment.
_tSHolds the returned time value of the point along this segment.
_tTHolds the returned time value of the point along the given segment.
_tRealSHolds the unclamped time of intersection on this line segment.
_tRealTHolds the unclamped time of intersection on the second line segment.
_v0Holds the closest point on this line segment to the given line segment.
_v1Holds the closest point on the given line segment to this line segment.
Returns:
Returns the squared distance between the line segments and the times t and s along each segment that represents the closest points between them.
template<typename _tType, typename _tVec3Type>
_tVec3Type LSE_FCALL lsm::CLineSeg3Base< _tType, _tVec3Type >::ClosestPointOnLineSegToPoint ( const _tVec3Type &  _vPoint,
_tType &  _tT 
) const [inline]

Get the closest point on the line segment to the given point. Also returns t for the position of that point along this line.

Parameters:
_vPointPoint to test against this line segment.
_tTHolds the returned time value of the returned point.
Returns:
Returns the closest point on the line segment to the given point and the time (t) for the position of the point along the line segment.
template<typename _tType, typename _tVec3Type>
_tType LSE_FCALL lsm::CLineSeg3Base< _tType, _tVec3Type >::Len ( ) const [inline]

Get the length of the line segment.

Returns:
Returns the length of this line segment.
template<typename _tType, typename _tVec3Type>
_tType LSE_FCALL lsm::CLineSeg3Base< _tType, _tVec3Type >::LenSq ( ) const [inline]

Get the squared length of the line segment.

Returns:
Returns the squared length of this line segment.
template<typename _tType, typename _tVec3Type>
_tType LSE_FCALL lsm::CLineSeg3Base< _tType, _tVec3Type >::SqDistToPoint ( const _tVec3Type &  _vPoint) const [inline]

Returns the squared distance between this segment and the given point.

Parameters:
_vPointThe point to which the squared distance from this segment is to be calculated.
Returns:
Returns the shortest squared distance from this line segment to the given point.

Member Data Documentation

template<typename _tType, typename _tVec3Type>
_tVec3Type lsm::CLineSeg3Base< _tType, _tVec3Type >::p

Starting point.

template<typename _tType, typename _tVec3Type>
_tVec3Type lsm::CLineSeg3Base< _tType, _tVec3Type >::q

Ending point.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator