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

A parametrized line. More...

#include <ParametrizedLine.h>

List of all members.

Public Types

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

Public Member Functions

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

Static Public Member Functions

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

Protected Attributes

VectorType m_direction
VectorType m_origin

Detailed Description

template<typename _Scalar, int _AmbientDim, int _Options>
class Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >

A parametrized line.

This is defined in the Geometry module.

#include <Eigen/Geometry>

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.

Member Typedef Documentation

typedef DenseIndex Index
typedef NumTraits<Scalar>::Real RealScalar
typedef _Scalar Scalar

Member Enumeration Documentation

anonymous enum
Enumerator:
AmbientDimAtCompileTime 
Options 

Constructor & Destructor Documentation

ParametrizedLine ( )
inlineexplicit
ParametrizedLine ( const ParametrizedLine< Scalar, AmbientDimAtCompileTime, OtherOptions > &  other)
inline
ParametrizedLine ( Index  _dim)
inlineexplicit

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

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.
ParametrizedLine ( const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &  hyperplane)
inlineexplicit

Constructs a parametrized line from a 2D hyperplane

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

References EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE, Hyperplane< _Scalar, _AmbientDim, _Options >::normal(), and Hyperplane< _Scalar, _AmbientDim, _Options >::offset().

~ParametrizedLine ( )
inline
ParametrizedLine ( const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &  other)
inlineexplicit

Member Function Documentation

internal::cast_return_type<ParametrizedLine, ParametrizedLine<NewScalarType,AmbientDimAtCompileTime,Options> >::type 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.

References ParametrizedLine< _Scalar, _AmbientDim, _Options >::ParametrizedLine().

Index dim ( ) const
inline
Returns:
the dimension in which the line holds

References ParametrizedLine< _Scalar, _AmbientDim, _Options >::m_direction.

const VectorType& direction ( ) const
inline
VectorType& direction ( )
inline
RealScalar distance ( const VectorType p) const
inline
Returns:
the distance of a point p to its projection onto the line *this.
See also:
squaredDistance()

References sqrt(), and ParametrizedLine< _Scalar, _AmbientDim, _Options >::squaredDistance().

_Scalar intersection ( const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &  hyperplane) const
inline
Returns:
the parameter value of the intersection between *this and the given hyperplane
_Scalar intersectionParameter ( const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &  hyperplane) const
inline
Returns:
the parameter value of the intersection between *this and the given hyperplane

References Hyperplane< _Scalar, _AmbientDim, _Options >::normal(), and Hyperplane< _Scalar, _AmbientDim, _Options >::offset().

ParametrizedLine< _Scalar, _AmbientDim, _Options >::VectorType intersectionPoint ( const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &  hyperplane) const
inline
Returns:
the point of the intersection between *this and the given hyperplane
bool isApprox ( const ParametrizedLine< _Scalar, _AmbientDim, _Options > &  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()

References ParametrizedLine< _Scalar, _AmbientDim, _Options >::m_direction, and ParametrizedLine< _Scalar, _AmbientDim, _Options >::m_origin.

const VectorType& origin ( ) const
inline
VectorType& origin ( )
inline
ParametrizedLine< _Scalar, _AmbientDim, _Options >::VectorType pointAt ( Scalar  t) const
inline
Returns:
the point at t along this line
VectorType projection ( const VectorType p) const
inline
RealScalar squaredDistance ( const VectorType p) const
inline
static ParametrizedLine Through ( const VectorType p0,
const VectorType p1 
)
inlinestatic

Constructs a parametrized line going from p0 to p1.

References ParametrizedLine< _Scalar, _AmbientDim, _Options >::ParametrizedLine().


Member Data Documentation

VectorType m_direction
protected
VectorType m_origin
protected

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