uicore::LineSegment3x< Type > Class Template Reference

3D line segment More...

#include <line_segment.h>

Public Member Functions

 LineSegment3x ()
 
 LineSegment3x (const LineSegment3x< Type > &copy)
 
 LineSegment3x (const Vec3< Type > &point_p, const Vec3< Type > &point_q)
 
Vec3< Type > midpoint () const
 Get the midpoint of this line. More...
 
bool operator!= (const LineSegment3x< Type > &line) const
 != operator. More...
 
LineSegment3x< Type > & operator= (const LineSegment3x< Type > &copy)
 = operator. More...
 
bool operator== (const LineSegment3x< Type > &line) const
 == operator. More...
 
Type point_distance (const Vec3< Type > &point, Vec3< Type > &dest_intercept) const
 Calculate the distance from a line segment to a point. More...
 

Public Attributes

Vec3< Type > p
 Start point on the line. More...
 
Vec3< Type > q
 

Detailed Description

template<typename Type>
class uicore::LineSegment3x< Type >

3D line segment

A line segment has a start point and an end point
These line templates are defined for: int (LineSegment3), float (LineSegment3f), double (LineSegment3d)

Constructor & Destructor Documentation

template<typename Type>
uicore::LineSegment3x< Type >::LineSegment3x ( )
inline
template<typename Type>
uicore::LineSegment3x< Type >::LineSegment3x ( const LineSegment3x< Type > &  copy)
inline
template<typename Type>
uicore::LineSegment3x< Type >::LineSegment3x ( const Vec3< Type > &  point_p,
const Vec3< Type > &  point_q 
)
inline

Member Function Documentation

template<typename Type>
Vec3<Type> uicore::LineSegment3x< Type >::midpoint ( ) const
inline

Get the midpoint of this line.

Returns
The midpoint
template<typename Type>
bool uicore::LineSegment3x< Type >::operator!= ( const LineSegment3x< Type > &  line) const
inline

!= operator.

template<typename Type>
LineSegment3x<Type>& uicore::LineSegment3x< Type >::operator= ( const LineSegment3x< Type > &  copy)
inline

= operator.

template<typename Type>
bool uicore::LineSegment3x< Type >::operator== ( const LineSegment3x< Type > &  line) const
inline

== operator.

template<typename Type>
Type uicore::LineSegment3x< Type >::point_distance ( const Vec3< Type > &  point,
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


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