Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
vcg::Line3< LineScalarType, NORM > Class Template Reference

#include <line3.h>

List of all members.

Public Types

typedef Line3< LineScalarType,
NORM > 
LineType
 The line type.
typedef Point3< 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 Line3< Q, K > &b)
 importer for different line types (with any scalar type or normalization beaviour)
Line3< 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 PointTypeOrigin () const
PointTypeOrigin ()
const PointTypeDirection () const
void SetOrigin (const PointType &ori)
 sets the origin
void SetDirection (const PointType &dir)
 sets the direction
void Set (const PointType &ori, const PointType &dir)
 sets origin and direction.
Constructors
 Line3 ()
 The empty constructor.
 Line3 (const PointType &ori, const PointType &dir)
 The (origin, direction) constructor.
Linearity for 3d lines
Line3< ScalarType, false > operator+ (LineType const &p) const
Line3< ScalarType, false > operator- (LineType const &p) const
Line3< ScalarType, false > operator* (const ScalarType s) const
Line3< ScalarType, false > operator/ (const ScalarType s) const
Automatic normalized to non-normalized

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

 Line3 (const Line3< ScalarType,!NORM > &r)
 copy constructor that takes opposite beaviour
LineTypeoperator= (Line3< ScalarType,!NORM > const &r)
 assignment

Static Public Member Functions

template<class Q , bool K>
static LineType Construct (const Line3< 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 Line3< 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::Line3< LineScalarType, NORM >

Templated class for 3D lines. This is the class for infinite lines in 3D space. A Line is stored just as two Point3: 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 64 of file line3.h.


Member Typedef Documentation

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

The line type.

Definition at line 75 of file line3.h.

template<class LineScalarType, bool NORM = false>
typedef Point3<LineScalarType> vcg::Line3< LineScalarType, NORM >::PointType

The point type.

Definition at line 72 of file line3.h.

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

The scalar type.

Definition at line 69 of file line3.h.


Constructor & Destructor Documentation

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

The empty constructor.

Definition at line 111 of file line3.h.

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

The (origin, direction) constructor.

Definition at line 113 of file line3.h.

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

copy constructor that takes opposite beaviour

Definition at line 183 of file line3.h.


Member Function Documentation

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

Definition at line 150 of file line3.h.

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

constructs a new line importing it from an existing one

Definition at line 147 of file line3.h.

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

Definition at line 95 of file line3.h.

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

flips the line

Definition at line 154 of file line3.h.

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

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

Definition at line 140 of file line3.h.

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

returns wheter this type is normalized or not

Definition at line 128 of file line3.h.

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

normalizes direction field (returns a Normalized Line)

Definition at line 133 of file line3.h.

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

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

Definition at line 136 of file line3.h.

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

Operator to dispare two lines.

Definition at line 120 of file line3.h.

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

Definition at line 170 of file line3.h.

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

Definition at line 166 of file line3.h.

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

Definition at line 168 of file line3.h.

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

Definition at line 172 of file line3.h.

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

assignment

Definition at line 186 of file line3.h.

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

Operator to compare two lines.

Definition at line 117 of file line3.h.

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

Definition at line 93 of file line3.h.

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

Definition at line 94 of file line3.h.

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

calculates the point of parameter t on the line.

Definition at line 130 of file line3.h.

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

Projects a point on the line.

Definition at line 123 of file line3.h.

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

sets origin and direction.

Definition at line 103 of file line3.h.

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

sets the direction

Definition at line 100 of file line3.h.

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

sets the origin

Definition at line 97 of file line3.h.


Member Data Documentation

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

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

Definition at line 83 of file line3.h.

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

Origin.

Definition at line 80 of file line3.h.


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


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:41:18