#include <line2.h>
Public Types | |
typedef Line2< LineScalarType, NORM > | LineType |
The line type. | |
typedef Point2< LineScalarType > | PointType |
The point type. | |
typedef LineScalarType | ScalarType |
The scalar type. | |
Public Member Functions | |
PointType | ClosestPoint (const PointType &p) const |
void | Flip () |
flips the line | |
template<class Q , bool K> | |
void | Import (const Line2< Q, K > &b) |
importer for different line types (with any scalar type or normalization beaviour) | |
Line2< ScalarType, true > & | Normalize () |
normalizes direction field (returns a Normalized Line) | |
bool | operator!= (LineType const &p) const |
Operator to dispare two lines. | |
bool | operator== (LineType const &p) const |
Operator to compare two lines. | |
PointType | P (const ScalarType t) const |
calculates the point of parameter t on the line. | |
ScalarType | Projection (const PointType &p) const |
Projects a point on the line. | |
Members to access the origin or direction | |
Direction() cannot be assigned directly. Use SetDirection() or Set() instead. | |
const PointType & | Direction () const |
PointType & | Origin () |
const PointType & | Origin () const |
void | Set (const PointType &ori, const PointType &dir) |
sets origin and direction. | |
void | SetDirection (const PointType &dir) |
sets the direction | |
void | SetOrigin (const PointType &ori) |
sets the origin | |
Automatic normalized to non-normalized | |
Line2 (const Line2< ScalarType,!NORM > &r) | |
copy constructor that takes opposite beaviour | |
LineType & | operator= (Line2< ScalarType,!NORM > const &r) |
assignment | |
Constructors | |
Line2 (const PointType &ori, const PointType &dir) | |
The (origin, direction) constructor. | |
Line2 () | |
The empty constructor. | |
Linearity for 3d lines | |
Line2< ScalarType, false > | operator* (const ScalarType s) const |
Line2< ScalarType, false > | operator+ (LineType const &p) const |
Line2< ScalarType, false > | operator- (LineType const &p) const |
Line2< ScalarType, false > | operator/ (const ScalarType s) const |
Static Public Member Functions | |
template<class Q , bool K> | |
static LineType | Construct (const Line2< Q, K > &b) |
constructs a new line importing it from an existing one | |
static bool | IsNormalized () |
returns wheter this type is normalized or not | |
static Line2< ScalarType, true > & | Normalize (LineType &p) |
normalizes direction field (returns a Normalized Line) - static version | |
Private Attributes | |
PointType | _dir |
Direction (not necessarily normalized, unless so specified by NORM). | |
PointType | _ori |
Origin. |
Templated class for 2D lines. This is the class for infinite lines in 3D space. A Line is stored just as two Point2: an origin and a direction (not necessarily normalized).
LineScalarType | (template parameter) Specifies the type of scalar used to represent coords. | |
NORM,: | if on, the direction is always Normalized |
Definition at line 48 of file line2.h.
typedef Line2<LineScalarType,NORM> vcg::Line2< LineScalarType, NORM >::LineType |
typedef Point2<LineScalarType> vcg::Line2< LineScalarType, NORM >::PointType |
typedef LineScalarType vcg::Line2< LineScalarType, NORM >::ScalarType |
vcg::Line2< LineScalarType, NORM >::Line2 | ( | ) | [inline] |
vcg::Line2< LineScalarType, NORM >::Line2 | ( | const PointType & | ori, | |
const PointType & | dir | |||
) | [inline] |
vcg::Line2< LineScalarType, NORM >::Line2 | ( | const Line2< ScalarType,!NORM > & | r | ) | [inline] |
PointType vcg::Line2< LineScalarType, NORM >::ClosestPoint | ( | const PointType & | p | ) | const [inline] |
static LineType vcg::Line2< LineScalarType, NORM >::Construct | ( | const Line2< Q, K > & | b | ) | [inline, static] |
const PointType& vcg::Line2< LineScalarType, NORM >::Direction | ( | ) | const [inline] |
void vcg::Line2< LineScalarType, NORM >::Flip | ( | ) | [inline] |
void vcg::Line2< LineScalarType, NORM >::Import | ( | const Line2< Q, K > & | b | ) | [inline] |
static bool vcg::Line2< LineScalarType, NORM >::IsNormalized | ( | ) | [inline, static] |
static Line2<ScalarType,true>& vcg::Line2< LineScalarType, NORM >::Normalize | ( | LineType & | p | ) | [inline, static] |
Line2<ScalarType,true>& vcg::Line2< LineScalarType, NORM >::Normalize | ( | void | ) | [inline] |
bool vcg::Line2< LineScalarType, NORM >::operator!= | ( | LineType const & | p | ) | const [inline] |
Line2<ScalarType,false> vcg::Line2< LineScalarType, NORM >::operator* | ( | const ScalarType | s | ) | const [inline] |
Line2<ScalarType,false> vcg::Line2< LineScalarType, NORM >::operator+ | ( | LineType const & | p | ) | const [inline] |
Line2<ScalarType,false> vcg::Line2< LineScalarType, NORM >::operator- | ( | LineType const & | p | ) | const [inline] |
Line2<ScalarType,false> vcg::Line2< LineScalarType, NORM >::operator/ | ( | const ScalarType | s | ) | const [inline] |
LineType& vcg::Line2< LineScalarType, NORM >::operator= | ( | Line2< ScalarType,!NORM > const & | r | ) | [inline] |
bool vcg::Line2< LineScalarType, NORM >::operator== | ( | LineType const & | p | ) | const [inline] |
PointType& vcg::Line2< LineScalarType, NORM >::Origin | ( | ) | [inline] |
const PointType& vcg::Line2< LineScalarType, NORM >::Origin | ( | ) | const [inline] |
PointType vcg::Line2< LineScalarType, NORM >::P | ( | const ScalarType | t | ) | const [inline] |
ScalarType vcg::Line2< LineScalarType, NORM >::Projection | ( | const PointType & | p | ) | const [inline] |
void vcg::Line2< LineScalarType, NORM >::Set | ( | const PointType & | ori, | |
const PointType & | dir | |||
) | [inline] |
void vcg::Line2< LineScalarType, NORM >::SetDirection | ( | const PointType & | dir | ) | [inline] |
void vcg::Line2< LineScalarType, NORM >::SetOrigin | ( | const PointType & | ori | ) | [inline] |
PointType vcg::Line2< LineScalarType, NORM >::_dir [private] |
PointType vcg::Line2< LineScalarType, NORM >::_ori [private] |