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

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.

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

Public Member Functions

 DtLine2D (const DtVector2< T > &p1, const DtVector2< T > &p2)
 
 DtLine2D (const DtLine2D< T > &orig)
 
DtLine2D< T > & operator= (const DtLine2D< T > &rhs)
 
virtual ~DtLine2D ()
 
void getPoints (DtVector2< T > &p1, DtVector2< T > &p2) const
 
void setPoints (const DtVector2< T > &p1, const DtVector2< T > &p2)
 
dX () const
 
dY () const
 
length () const
 
lengthSquared () const
 
DtVector2< T > pointAt (T t)
 
DtVector2< T > startPoint () const
 
void setStartPoint (const DtVector2< T > &point)
 
DtVector2< T > endPoint () const
 
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
 
angleTo (const DtLine2D< T > &line) const
 

Protected Attributes

DtVector2< T > myStartPoint
 
DtVector2< T > myEndPoint
 

Private Member Functions

 DtLine2D ()
 

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

Get / set the starting point of the line.

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

Get / set the ending point of the line.

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(), and SGP4Funcs::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 Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)