Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
Eigen::ParametrizedLine Class Reference

Detailed Description

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} $, $ 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.

List of all members.

Public Types

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

Public Member Functions

 ParametrizedLine ()
 Default constructor without initialization.
template<int OtherOptions>
 ParametrizedLine (const ParametrizedLine< Scalar, AmbientDimAtCompileTime, OtherOptions > &other)
 ParametrizedLine (Index _dim)
 Constructs a dynamic-size line with _dim the dimension of the ambient space.
 ParametrizedLine (const VectorType &origin, const VectorType &direction)
 Initializes a parametrized line of direction direction and origin origin.
template<int OtherOptions>
 ParametrizedLine (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane)
 Constructs a parametrized line from a 2D hyperplane.
 ~ParametrizedLine ()
Index dim () const
const VectorTypeorigin () const
VectorTypeorigin ()
const VectorTypedirection () const
VectorTypedirection ()
RealScalar squaredDistance (const VectorType &p) const
RealScalar distance (const VectorType &p) const
VectorType projection (const VectorType &p) const
template<int OtherOptions>
Scalar intersection (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane) const
template<typename NewScalarType >
internal::cast_return_type
< ParametrizedLine,
ParametrizedLine
< NewScalarType,
AmbientDimAtCompileTime,
Options > >::type 
cast () const
template<typename OtherScalarType , int OtherOptions>
 ParametrizedLine (const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &other)
 Copy constructor with scalar type conversion.
bool isApprox (const ParametrizedLine &other, typename NumTraits< Scalar >::Real prec=NumTraits< Scalar >::dummy_precision()) const

Static Public Member Functions

static ParametrizedLine Through (const VectorType &p0, const VectorType &p1)
 Constructs a parametrized line going from p0 to p1.

Protected Attributes

VectorType m_origin
VectorType m_direction

Member Typedef Documentation

Definition at line 54 of file Geometry.

Definition at line 53 of file Geometry.

Definition at line 52 of file Geometry.

typedef Matrix<Scalar,AmbientDimAtCompileTime,1,Options> Eigen::ParametrizedLine::VectorType

Definition at line 55 of file Geometry.


Member Enumeration Documentation

anonymous enum
Enumerator:
AmbientDimAtCompileTime 
Options 

Definition at line 48 of file Geometry.


Constructor & Destructor Documentation

Eigen::ParametrizedLine::ParametrizedLine ( ) [inline, explicit]

Default constructor without initialization.

Definition at line 58 of file Geometry.

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

Definition at line 61 of file Geometry.

Eigen::ParametrizedLine::ParametrizedLine ( Index  _dim) [inline, explicit]

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

Definition at line 67 of file Geometry.

Eigen::ParametrizedLine::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 72 of file Geometry.

template<int OtherOptions>
Eigen::ParametrizedLine::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 152 of file Geometry.

Eigen::ParametrizedLine::~ParametrizedLine ( ) [inline]

Definition at line 82 of file Geometry.

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

Copy constructor with scalar type conversion.

Definition at line 128 of file Geometry.


Member Function Documentation

template<typename NewScalarType >
internal::cast_return_type<ParametrizedLine, ParametrizedLine<NewScalarType,AmbientDimAtCompileTime,Options> >::type Eigen::ParametrizedLine::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 120 of file Geometry.

Index Eigen::ParametrizedLine::dim ( ) const [inline]
Returns:
the dimension in which the line holds

Definition at line 85 of file Geometry.

const VectorType& Eigen::ParametrizedLine::direction ( ) const [inline]

Definition at line 90 of file Geometry.

VectorType& Eigen::ParametrizedLine::direction ( ) [inline]

Definition at line 91 of file Geometry.

RealScalar Eigen::ParametrizedLine::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 104 of file Geometry.

template<int OtherOptions>
_Scalar Eigen::ParametrizedLine::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 163 of file Geometry.

bool Eigen::ParametrizedLine::isApprox ( const ParametrizedLine 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 138 of file Geometry.

const VectorType& Eigen::ParametrizedLine::origin ( ) const [inline]

Definition at line 87 of file Geometry.

VectorType& Eigen::ParametrizedLine::origin ( ) [inline]

Definition at line 88 of file Geometry.

VectorType Eigen::ParametrizedLine::projection ( const VectorType p) const [inline]
Returns:
the projection of a point p onto the line *this.

Definition at line 107 of file Geometry.

RealScalar Eigen::ParametrizedLine::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 96 of file Geometry.

static ParametrizedLine Eigen::ParametrizedLine::Through ( const VectorType p0,
const VectorType p1 
) [inline, static]

Constructs a parametrized line going from p0 to p1.

Definition at line 79 of file Geometry.


Member Data Documentation

Definition at line 143 of file Geometry.

Definition at line 143 of file Geometry.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011