vcg::Line2< LineScalarType, NORM > Class Template Reference
[Space]

#include <line2.h>

List of all members.

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 PointTypeDirection () const
PointTypeOrigin ()
const PointTypeOrigin () 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

"Line3dN r0 = r1" is equivalent to "Line3dN r0 = r1.Normalize()" if r1 is a Line3d

 Line2 (const Line2< ScalarType,!NORM > &r)
 copy constructor that takes opposite beaviour
LineTypeoperator= (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.

Detailed Description

template<class LineScalarType, bool NORM = false>
class vcg::Line2< LineScalarType, NORM >

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).

Parameters:
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.


Member Typedef Documentation

template<class LineScalarType, bool NORM = false>
typedef Line2<LineScalarType,NORM> vcg::Line2< LineScalarType, NORM >::LineType

The line type.

Definition at line 59 of file line2.h.

template<class LineScalarType, bool NORM = false>
typedef Point2<LineScalarType> vcg::Line2< LineScalarType, NORM >::PointType

The point type.

Definition at line 56 of file line2.h.

template<class LineScalarType, bool NORM = false>
typedef LineScalarType vcg::Line2< LineScalarType, NORM >::ScalarType

The scalar type.

Definition at line 53 of file line2.h.


Constructor & Destructor Documentation

template<class LineScalarType, bool NORM = false>
vcg::Line2< LineScalarType, NORM >::Line2 (  )  [inline]

The empty constructor.

Definition at line 95 of file line2.h.

template<class LineScalarType, bool NORM = false>
vcg::Line2< LineScalarType, NORM >::Line2 ( const PointType ori,
const PointType dir 
) [inline]

The (origin, direction) constructor.

Definition at line 97 of file line2.h.

template<class LineScalarType, bool NORM = false>
vcg::Line2< LineScalarType, NORM >::Line2 ( const Line2< ScalarType,!NORM > &  r  )  [inline]

copy constructor that takes opposite beaviour

Definition at line 167 of file line2.h.


Member Function Documentation

template<class LineScalarType, bool NORM = false>
PointType vcg::Line2< LineScalarType, NORM >::ClosestPoint ( const PointType p  )  const [inline]

Definition at line 134 of file line2.h.

template<class LineScalarType, bool NORM = false>
template<class Q , bool K>
static LineType vcg::Line2< LineScalarType, NORM >::Construct ( const Line2< Q, K > &  b  )  [inline, static]

constructs a new line importing it from an existing one

Definition at line 131 of file line2.h.

template<class LineScalarType, bool NORM = false>
const PointType& vcg::Line2< LineScalarType, NORM >::Direction (  )  const [inline]

Definition at line 79 of file line2.h.

template<class LineScalarType, bool NORM = false>
void vcg::Line2< LineScalarType, NORM >::Flip (  )  [inline]

flips the line

Definition at line 138 of file line2.h.

template<class LineScalarType, bool NORM = false>
template<class Q , bool K>
void vcg::Line2< LineScalarType, NORM >::Import ( const Line2< Q, K > &  b  )  [inline]

importer for different line types (with any scalar type or normalization beaviour)

Definition at line 124 of file line2.h.

template<class LineScalarType, bool NORM = false>
static bool vcg::Line2< LineScalarType, NORM >::IsNormalized (  )  [inline, static]

returns wheter this type is normalized or not

Definition at line 112 of file line2.h.

template<class LineScalarType, bool NORM = false>
static Line2<ScalarType,true>& vcg::Line2< LineScalarType, NORM >::Normalize ( LineType p  )  [inline, static]

normalizes direction field (returns a Normalized Line) - static version

Definition at line 120 of file line2.h.

template<class LineScalarType, bool NORM = false>
Line2<ScalarType,true>& vcg::Line2< LineScalarType, NORM >::Normalize ( void   )  [inline]

normalizes direction field (returns a Normalized Line)

Definition at line 117 of file line2.h.

template<class LineScalarType, bool NORM = false>
bool vcg::Line2< LineScalarType, NORM >::operator!= ( LineType const &  p  )  const [inline]

Operator to dispare two lines.

Definition at line 104 of file line2.h.

template<class LineScalarType, bool NORM = false>
Line2<ScalarType,false> vcg::Line2< LineScalarType, NORM >::operator* ( const ScalarType  s  )  const [inline]

Definition at line 154 of file line2.h.

template<class LineScalarType, bool NORM = false>
Line2<ScalarType,false> vcg::Line2< LineScalarType, NORM >::operator+ ( LineType const &  p  )  const [inline]

Definition at line 150 of file line2.h.

template<class LineScalarType, bool NORM = false>
Line2<ScalarType,false> vcg::Line2< LineScalarType, NORM >::operator- ( LineType const &  p  )  const [inline]

Definition at line 152 of file line2.h.

template<class LineScalarType, bool NORM = false>
Line2<ScalarType,false> vcg::Line2< LineScalarType, NORM >::operator/ ( const ScalarType  s  )  const [inline]

Definition at line 156 of file line2.h.

template<class LineScalarType, bool NORM = false>
LineType& vcg::Line2< LineScalarType, NORM >::operator= ( Line2< ScalarType,!NORM > const &  r  )  [inline]

assignment

Definition at line 170 of file line2.h.

template<class LineScalarType, bool NORM = false>
bool vcg::Line2< LineScalarType, NORM >::operator== ( LineType const &  p  )  const [inline]

Operator to compare two lines.

Definition at line 101 of file line2.h.

template<class LineScalarType, bool NORM = false>
PointType& vcg::Line2< LineScalarType, NORM >::Origin (  )  [inline]

Definition at line 78 of file line2.h.

template<class LineScalarType, bool NORM = false>
const PointType& vcg::Line2< LineScalarType, NORM >::Origin (  )  const [inline]

Definition at line 77 of file line2.h.

template<class LineScalarType, bool NORM = false>
PointType vcg::Line2< LineScalarType, NORM >::P ( const ScalarType  t  )  const [inline]

calculates the point of parameter t on the line.

Definition at line 114 of file line2.h.

template<class LineScalarType, bool NORM = false>
ScalarType vcg::Line2< LineScalarType, NORM >::Projection ( const PointType p  )  const [inline]

Projects a point on the line.

Definition at line 107 of file line2.h.

template<class LineScalarType, bool NORM = false>
void vcg::Line2< LineScalarType, NORM >::Set ( const PointType ori,
const PointType dir 
) [inline]

sets origin and direction.

Definition at line 87 of file line2.h.

template<class LineScalarType, bool NORM = false>
void vcg::Line2< LineScalarType, NORM >::SetDirection ( const PointType dir  )  [inline]

sets the direction

Definition at line 84 of file line2.h.

template<class LineScalarType, bool NORM = false>
void vcg::Line2< LineScalarType, NORM >::SetOrigin ( const PointType ori  )  [inline]

sets the origin

Definition at line 81 of file line2.h.


Member Data Documentation

template<class LineScalarType, bool NORM = false>
PointType vcg::Line2< LineScalarType, NORM >::_dir [private]

Direction (not necessarily normalized, unless so specified by NORM).

Definition at line 67 of file line2.h.

template<class LineScalarType, bool NORM = false>
PointType vcg::Line2< LineScalarType, NORM >::_ori [private]

Origin.

Definition at line 64 of file line2.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:23:01 2013