VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
makVrv::DtLine2D< T > Class Template Reference

DtLine2D class DtLine2D is a templated class (typically for doing floats vs. More...

Inheritance diagram for makVrv::DtLine2D< T >:
Inheritance graph
[legend]

Public Member Functions

 DtLine2D (const DtVector2< T > &p1, const DtVector2< T > &p2)
 CTOR.
 DtLine2D (const DtLine2D< T > &orig)
 Copy CTOR.
DtLine2D< T > & operator= (const DtLine2D< T > &rhs)
virtual ~DtLine2D ()
 DTOR.
void getPoints (DtVector2< T > &p1, DtVector2< T > &p2) const
 Get / set the line as points.
void setPoints (const DtVector2< T > &p1, const DtVector2< T > &p2)
dX () const
 Get the difference between x2 and x1.
dY () const
 Get the different between y2 and y1.
length () const
 Get the length of the line.
lengthSquared () const
 Get the length of the line squared.
DtVector2< T > pointAt (T t)
 Get the point along the line at the parametric value supplied (between 0.
DtVector2< T > startPoint () const
 Get / set the starting point of the line.
void setStartPoint (const DtVector2< T > &point)
DtVector2< T > endPoint () const
 Get / set the ending point of the line.
void setEndPoint (const DtVector2< T > &point)
void getLine (T &x1, T &y1, T &x2, T &y2) const
void setLine (T x1, T y1, T x2, T y2)
angle () const
 Get the angle that the line makes with the horizontal, in radians.
angleTo (const DtLine2D< T > &line) const
 Get the angle that rotates this into into the same angle as the supplied line, in radians.

Protected Attributes

DtVector2< T > myStartPoint
DtVector2< T > myEndPoint

Private Member Functions

 DtLine2D ()
 Unimplemented CTOR.

Detailed Description

template<class T>
class makVrv::DtLine2D< T >

DtLine2D class DtLine2D is a templated class (typically for doing floats vs.

doubles) used to represent a 2D line segment (and some useful operations thereupon.

Constructor & Destructor Documentation

template<class T>
makVrv::DtLine2D< T >::DtLine2D ( const DtVector2< T > &  p1,
const DtVector2< T > &  p2 
)

CTOR.

template<class T>
makVrv::DtLine2D< T >::DtLine2D ( const DtLine2D< T > &  orig)

Copy CTOR.

template<class T >
makVrv::DtLine2D< T >::~DtLine2D ( )
virtual

DTOR.

template<class T>
makVrv::DtLine2D< T >::DtLine2D ( )
private

Unimplemented CTOR.

Member Function Documentation

template<class T>
DtLine2D< T > & makVrv::DtLine2D< T >::operator= ( const DtLine2D< T > &  rhs)
template<class T >
DtVector2< T > makVrv::DtLine2D< T >::startPoint ( ) const
inline

Get / set the starting point of the line.

template<class T>
void makVrv::DtLine2D< T >::setStartPoint ( const DtVector2< T > &  point)
inline
template<class T >
DtVector2< T > makVrv::DtLine2D< T >::endPoint ( ) const
inline

Get / set the ending point of the line.

template<class T>
void makVrv::DtLine2D< T >::setEndPoint ( const DtVector2< T > &  point)
inline
template<class T>
void makVrv::DtLine2D< T >::getLine ( T &  x1,
T &  y1,
T &  x2,
T &  y2 
) const
inline
template<class T>
void makVrv::DtLine2D< T >::setLine ( x1,
y1,
x2,
y2 
)
inline
template<class T>
void makVrv::DtLine2D< T >::getPoints ( DtVector2< T > &  p1,
DtVector2< T > &  p2 
) const
inline

Get / set the line as points.

template<class T>
void makVrv::DtLine2D< T >::setPoints ( const DtVector2< T > &  p1,
const DtVector2< T > &  p2 
)
inline
template<class T >
T makVrv::DtLine2D< T >::dX ( ) const
inline

Get the difference between x2 and x1.

template<class T >
T makVrv::DtLine2D< T >::dY ( ) const
inline

Get the different between y2 and y1.

template<class T >
T makVrv::DtLine2D< T >::length ( void  ) const
inline

Get the length of the line.

template<class T >
T makVrv::DtLine2D< T >::lengthSquared ( ) const
inline

Get the length of the line squared.

template<class T >
T makVrv::DtLine2D< T >::angle ( ) const
inline

Get the angle that the line makes with the horizontal, in radians.

Referenced by makVrv::DtLine2D< T >::angleTo().

template<class T>
T makVrv::DtLine2D< T >::angleTo ( const DtLine2D< T > &  line) const
inline

Get the angle that rotates this into into the same angle as the supplied line, in radians.

References makVrv::DtLine2D< T >::angle().

template<class T>
DtVector2< T > makVrv::DtLine2D< T >::pointAt ( t)
inline

Get the point along the line at the parametric value supplied (between 0.

and 1. inclusive)

Member Data Documentation

template<class T>
DtVector2<T> makVrv::DtLine2D< T >::myStartPoint
protected
template<class T>
DtVector2<T> makVrv::DtLine2D< T >::myEndPoint
protected

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)