Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
ParametrizedLine< _Scalar, _AmbientDim > Class Template Reference

A parametrized line. More...

#include <ParametrizedLine.h>

List of all members.

Public Types

enum  { AmbientDimAtCompileTime = _AmbientDim }
enum  { AmbientDimAtCompileTime = _AmbientDim, Options = _Options }
typedef DenseIndex Index
typedef NumTraits< Scalar >::Real RealScalar
typedef NumTraits< Scalar >::Real RealScalar
typedef _Scalar Scalar
typedef _Scalar Scalar
typedef Matrix< Scalar,
AmbientDimAtCompileTime, 1 > 
VectorType
typedef Matrix< Scalar,
AmbientDimAtCompileTime,
1, Options
VectorType

Public Member Functions

template<typename NewScalarType >
internal::cast_return_type
< ParametrizedLine,
ParametrizedLine
< NewScalarType,
AmbientDimAtCompileTime >
>::type 
cast () const
template<typename NewScalarType >
internal::cast_return_type
< ParametrizedLine,
ParametrizedLine
< NewScalarType,
AmbientDimAtCompileTime,
Options > >::type 
cast () const
int dim () const
Index dim () const
const VectorTypedirection () const
VectorTypedirection ()
const VectorTypedirection () const
VectorTypedirection ()
RealScalar distance (const VectorType &p) const
RealScalar distance (const VectorType &p) const
Scalar intersection (const Hyperplane< _Scalar, _AmbientDim > &hyperplane)
template<int OtherOptions>
Scalar intersection (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane) const
bool isApprox (const ParametrizedLine &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const
bool isApprox (const ParametrizedLine &other, typename NumTraits< Scalar >::Real prec=NumTraits< Scalar >::dummy_precision()) const
const VectorTypeorigin () const
VectorTypeorigin ()
const VectorTypeorigin () const
VectorTypeorigin ()
 ParametrizedLine ()
 ParametrizedLine (int _dim)
 ParametrizedLine ()
template<int OtherOptions>
 ParametrizedLine (const ParametrizedLine< Scalar, AmbientDimAtCompileTime, OtherOptions > &other)
 ParametrizedLine (const VectorType &origin, const VectorType &direction)
 ParametrizedLine (const Hyperplane< _Scalar, _AmbientDim > &hyperplane)
 ParametrizedLine (Index _dim)
 ParametrizedLine (const VectorType &origin, const VectorType &direction)
template<int OtherOptions>
 ParametrizedLine (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane)
template<typename OtherScalarType >
 ParametrizedLine (const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime > &other)
template<typename OtherScalarType , int OtherOptions>
 ParametrizedLine (const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &other)
VectorType projection (const VectorType &p) const
VectorType projection (const VectorType &p) const
RealScalar squaredDistance (const VectorType &p) const
RealScalar squaredDistance (const VectorType &p) const
 ~ParametrizedLine ()
 ~ParametrizedLine ()

Static Public Member Functions

static ParametrizedLine Through (const VectorType &p0, const VectorType &p1)
static ParametrizedLine Through (const VectorType &p0, const VectorType &p1)

Protected Attributes

VectorType m_direction
VectorType m_origin

Detailed Description

template<typename _Scalar, int _AmbientDim>
class ParametrizedLine< _Scalar, _AmbientDim >

A parametrized line.

A parametrized line is defined by an origin point $ \mathbf{o} $ and a unit direction vector $ \mathbf{d} $ such that the line corresponds to the set $ l(t) = \mathbf{o} + t \mathbf{d} $, $ l \in \mathbf{R} $.

Parameters:
_Scalarthe scalar type, i.e., the type of the coefficients
_AmbientDimthe dimension of the ambient space, can be a compile time value or Dynamic.

A parametrized line is defined by an origin point $ \mathbf{o} $ and a unit direction vector $ \mathbf{d} $ such that the line corresponds to the set $ l(t) = \mathbf{o} + t \mathbf{d} $, $ t \in \mathbf{R} $.

Parameters:
_Scalarthe scalar type, i.e., the type of the coefficients
_AmbientDimthe dimension of the ambient space, can be a compile time value or Dynamic.

Definition at line 43 of file Eigen2Support/Geometry/ParametrizedLine.h.


Member Typedef Documentation

template<typename _Scalar, int _AmbientDim>
typedef DenseIndex ParametrizedLine< _Scalar, _AmbientDim >::Index

Definition at line 53 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
typedef NumTraits<Scalar>::Real ParametrizedLine< _Scalar, _AmbientDim >::RealScalar

Definition at line 49 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
typedef NumTraits<Scalar>::Real ParametrizedLine< _Scalar, _AmbientDim >::RealScalar

Definition at line 52 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
typedef _Scalar ParametrizedLine< _Scalar, _AmbientDim >::Scalar

Definition at line 48 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
typedef _Scalar ParametrizedLine< _Scalar, _AmbientDim >::Scalar

Definition at line 51 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
typedef Matrix<Scalar,AmbientDimAtCompileTime,1> ParametrizedLine< _Scalar, _AmbientDim >::VectorType

Definition at line 50 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
typedef Matrix<Scalar,AmbientDimAtCompileTime,1,Options> ParametrizedLine< _Scalar, _AmbientDim >::VectorType

Definition at line 54 of file Geometry/ParametrizedLine.h.


Member Enumeration Documentation

template<typename _Scalar, int _AmbientDim>
anonymous enum
Enumerator:
AmbientDimAtCompileTime 

Definition at line 47 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
anonymous enum
Enumerator:
AmbientDimAtCompileTime 
Options 

Definition at line 47 of file Geometry/ParametrizedLine.h.


Constructor & Destructor Documentation

template<typename _Scalar, int _AmbientDim>
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine ( ) [inline, explicit]

Default constructor without initialization

Definition at line 53 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine ( int  _dim) [inline, explicit]

Constructs a dynamic-size line with _dim the dimension of the ambient space

Definition at line 57 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine ( const VectorType origin,
const VectorType direction 
) [inline]

Initializes a parametrized line of direction direction and origin origin.

Warning:
the vector direction is assumed to be normalized.

Definition at line 62 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar , int _AmbientDim>
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine ( const Hyperplane< _Scalar, _AmbientDim > &  hyperplane) [inline, explicit]

Constructs a parametrized line from a 2D hyperplane

Warning:
the ambient space must have dimension 2 such that the hyperplane actually describes a line

Definition at line 139 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
ParametrizedLine< _Scalar, _AmbientDim >::~ParametrizedLine ( ) [inline]

Definition at line 71 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
template<typename OtherScalarType >
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine ( const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime > &  other) [inline, explicit]

Copy constructor with scalar type conversion

Definition at line 116 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine ( ) [inline, explicit]

Default constructor without initialization

Definition at line 57 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
template<int OtherOptions>
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine ( const ParametrizedLine< Scalar, AmbientDimAtCompileTime, OtherOptions > &  other) [inline]

Definition at line 60 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine ( Index  _dim) [inline, explicit]

Constructs a dynamic-size line with _dim the dimension of the ambient space

Definition at line 66 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine ( const VectorType origin,
const VectorType direction 
) [inline]

Initializes a parametrized line of direction direction and origin origin.

Warning:
the vector direction is assumed to be normalized.

Definition at line 71 of file Geometry/ParametrizedLine.h.

template<typename _Scalar , int _AmbientDim, int _Options>
template<int OtherOptions>
ParametrizedLine< _Scalar, _AmbientDim, _Options >::ParametrizedLine ( const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &  hyperplane) [inline, explicit]

Constructs a parametrized line from a 2D hyperplane

Warning:
the ambient space must have dimension 2 such that the hyperplane actually describes a line

Definition at line 151 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
ParametrizedLine< _Scalar, _AmbientDim >::~ParametrizedLine ( ) [inline]

Definition at line 81 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
template<typename OtherScalarType , int OtherOptions>
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine ( const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &  other) [inline, explicit]

Copy constructor with scalar type conversion

Definition at line 127 of file Geometry/ParametrizedLine.h.


Member Function Documentation

template<typename _Scalar, int _AmbientDim>
template<typename NewScalarType >
internal::cast_return_type<ParametrizedLine, ParametrizedLine<NewScalarType,AmbientDimAtCompileTime> >::type ParametrizedLine< _Scalar, _AmbientDim >::cast ( ) const [inline]
Returns:
*this with scalar type casted to NewScalarType

Note that if NewScalarType is equal to the current scalar type of *this then this function smartly returns a const reference to *this.

Definition at line 108 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
template<typename NewScalarType >
internal::cast_return_type<ParametrizedLine, ParametrizedLine<NewScalarType,AmbientDimAtCompileTime,Options> >::type ParametrizedLine< _Scalar, _AmbientDim >::cast ( ) const [inline]
Returns:
*this with scalar type casted to NewScalarType

Note that if NewScalarType is equal to the current scalar type of *this then this function smartly returns a const reference to *this.

Definition at line 119 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
int ParametrizedLine< _Scalar, _AmbientDim >::dim ( ) const [inline]
Returns:
the dimension in which the line holds

Definition at line 74 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
Index ParametrizedLine< _Scalar, _AmbientDim >::dim ( ) const [inline]
Returns:
the dimension in which the line holds

Definition at line 84 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
const VectorType& ParametrizedLine< _Scalar, _AmbientDim >::direction ( void  ) const [inline]

Definition at line 79 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
VectorType& ParametrizedLine< _Scalar, _AmbientDim >::direction ( void  ) [inline]

Definition at line 80 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
const VectorType& ParametrizedLine< _Scalar, _AmbientDim >::direction ( void  ) const [inline]

Definition at line 89 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
VectorType& ParametrizedLine< _Scalar, _AmbientDim >::direction ( void  ) [inline]

Definition at line 90 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
RealScalar ParametrizedLine< _Scalar, _AmbientDim >::distance ( const VectorType p) const [inline]
Returns:
the distance of a point p to its projection onto the line *this.
See also:
squaredDistance()

Definition at line 93 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
RealScalar ParametrizedLine< _Scalar, _AmbientDim >::distance ( const VectorType p) const [inline]
Returns:
the distance of a point p to its projection onto the line *this.
See also:
squaredDistance()

Definition at line 103 of file Geometry/ParametrizedLine.h.

template<typename _Scalar , int _AmbientDim>
_Scalar ParametrizedLine< _Scalar, _AmbientDim >::intersection ( const Hyperplane< _Scalar, _AmbientDim > &  hyperplane) [inline]
Returns:
the parameter value of the intersection between *this and the given hyperplane

Definition at line 149 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar , int _AmbientDim, int _Options>
template<int OtherOptions>
_Scalar ParametrizedLine< _Scalar, _AmbientDim, _Options >::intersection ( const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &  hyperplane) const [inline]
Returns:
the parameter value of the intersection between *this and the given hyperplane

Definition at line 162 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
bool ParametrizedLine< _Scalar, _AmbientDim >::isApprox ( const ParametrizedLine< _Scalar, _AmbientDim > &  other,
typename NumTraits< Scalar >::Real  prec = precision<Scalar>() 
) const [inline]
Returns:
true if *this is approximately equal to other, within the precision determined by prec.
See also:
MatrixBase::isApprox()

Definition at line 126 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
bool ParametrizedLine< _Scalar, _AmbientDim >::isApprox ( const ParametrizedLine< _Scalar, _AmbientDim > &  other,
typename NumTraits< Scalar >::Real  prec = NumTraits<Scalar>::dummy_precision() 
) const [inline]
Returns:
true if *this is approximately equal to other, within the precision determined by prec.
See also:
MatrixBase::isApprox()

Definition at line 137 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
const VectorType& ParametrizedLine< _Scalar, _AmbientDim >::origin ( ) const [inline]

Definition at line 76 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
VectorType& ParametrizedLine< _Scalar, _AmbientDim >::origin ( ) [inline]

Definition at line 77 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
const VectorType& ParametrizedLine< _Scalar, _AmbientDim >::origin ( ) const [inline]

Definition at line 86 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
VectorType& ParametrizedLine< _Scalar, _AmbientDim >::origin ( ) [inline]

Definition at line 87 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
VectorType ParametrizedLine< _Scalar, _AmbientDim >::projection ( const VectorType p) const [inline]
Returns:
the projection of a point p onto the line *this.

Definition at line 96 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
VectorType ParametrizedLine< _Scalar, _AmbientDim >::projection ( const VectorType p) const [inline]
Returns:
the projection of a point p onto the line *this.

Definition at line 106 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
RealScalar ParametrizedLine< _Scalar, _AmbientDim >::squaredDistance ( const VectorType p) const [inline]
Returns:
the squared distance of a point p to its projection onto the line *this.
See also:
distance()

Definition at line 85 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
RealScalar ParametrizedLine< _Scalar, _AmbientDim >::squaredDistance ( const VectorType p) const [inline]
Returns:
the squared distance of a point p to its projection onto the line *this.
See also:
distance()

Definition at line 95 of file Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
static ParametrizedLine ParametrizedLine< _Scalar, _AmbientDim >::Through ( const VectorType p0,
const VectorType p1 
) [inline, static]

Constructs a parametrized line going from p0 to p1.

Definition at line 68 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
static ParametrizedLine ParametrizedLine< _Scalar, _AmbientDim >::Through ( const VectorType p0,
const VectorType p1 
) [inline, static]

Constructs a parametrized line going from p0 to p1.

Definition at line 78 of file Geometry/ParametrizedLine.h.


Member Data Documentation

template<typename _Scalar, int _AmbientDim>
VectorType ParametrizedLine< _Scalar, _AmbientDim >::m_direction [protected]

Definition at line 131 of file Eigen2Support/Geometry/ParametrizedLine.h.

template<typename _Scalar, int _AmbientDim>
VectorType ParametrizedLine< _Scalar, _AmbientDim >::m_origin [protected]

Definition at line 131 of file Eigen2Support/Geometry/ParametrizedLine.h.


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


libicr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:34:23