Public Member Functions | Public Attributes

CL_LineSegment3x< Type > Class Template Reference
[clanCore Math]

3D line segment More...

#include <line_segment.h>

Inheritance diagram for CL_LineSegment3x< Type >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CL_LineSegment3x ()
 CL_LineSegment3x (const CL_Vec3< Type > &point_p, const CL_Vec3< Type > &point_q)
 CL_LineSegment3x (const CL_LineSegment3x< Type > &copy)
Attributes

CL_Vec3< Type > get_midpoint () const
 Get the midpoint of this line.
Type point_distance (const CL_Vec3< Type > &point, CL_Vec3< Type > &dest_intercept) const
 Calculate the distance from a line segment to a point.
Operators

CL_LineSegment3x< Type > & operator= (const CL_LineSegment3x< Type > &copy)
 = operator.
bool operator== (const CL_LineSegment3x< Type > &line) const
 == operator.
bool operator!= (const CL_LineSegment3x< Type > &line) const
 != operator.

Public Attributes

CL_Vec3< Type > p
 Start point on the line.
CL_Vec3< Type > q

Detailed Description

template<typename Type>
class CL_LineSegment3x< Type >

3D line segment

A line segment has a start point and an end point
These line templates are defined for: int (CL_LineSegment3), float (CL_LineSegment3f), double (CL_LineSegment3d)


Constructor & Destructor Documentation

template<typename Type>
CL_LineSegment3x< Type >::CL_LineSegment3x (  )  [inline]
template<typename Type>
CL_LineSegment3x< Type >::CL_LineSegment3x ( const CL_LineSegment3x< Type > &  copy  )  [inline]
template<typename Type>
CL_LineSegment3x< Type >::CL_LineSegment3x ( const CL_Vec3< Type > &  point_p,
const CL_Vec3< Type > &  point_q 
) [inline]

Member Function Documentation

template<typename Type>
CL_Vec3<Type> CL_LineSegment3x< Type >::get_midpoint (  )  const [inline]

Get the midpoint of this line.

Returns:
The midpoint
template<typename Type>
bool CL_LineSegment3x< Type >::operator!= ( const CL_LineSegment3x< Type > &  line  )  const [inline]

!= operator.

template<typename Type>
CL_LineSegment3x<Type>& CL_LineSegment3x< Type >::operator= ( const CL_LineSegment3x< Type > &  copy  )  [inline]

= operator.

template<typename Type>
bool CL_LineSegment3x< Type >::operator== ( const CL_LineSegment3x< Type > &  line  )  const [inline]

== operator.

template<typename Type>
Type CL_LineSegment3x< Type >::point_distance ( const CL_Vec3< Type > &  point,
CL_Vec3< Type > &  dest_intercept 
) const

Calculate the distance from a line segment to a point.

Parameters:
point = The point
dest_intercept = On Return: The point on the line closest to the point
Returns:
The Distance

Member Data Documentation

template<typename Type>
CL_Vec3<Type> CL_LineSegment3x< Type >::p
template<typename Type>
CL_Vec3<Type> CL_LineSegment3x< Type >::q

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