Eigen  3.3.4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options > Class Template Reference

Detailed Description

template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
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} $.

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

Public Types

typedef Eigen::Index Index
 

Public Member Functions

template<typename NewScalarType >
internal::cast_return_type
< ParametrizedLine,
ParametrizedLine
< NewScalarType,
AmbientDimAtCompileTime,
Options > >::type 
cast () const
 
Index dim () const
 
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>
ParametrizedLine< _Scalar,
_AmbientDim, _Options >
::VectorType 
intersectionPoint (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane) const
 
bool isApprox (const ParametrizedLine &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const
 
 ParametrizedLine ()
 
 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 (const Scalar &t) const
 
VectorType projection (const VectorType &p) const
 
RealScalar squaredDistance (const VectorType &p) const
 

Static Public Member Functions

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

Member Typedef Documentation

template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
typedef Eigen::Index Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::Index
Deprecated:
since Eigen 3.3

Constructor & Destructor Documentation

template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::ParametrizedLine ( )
inline

Default constructor without initialization

template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::ParametrizedLine ( Index  _dim)
inlineexplicit

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

template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::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.
template<typename _Scalar , int _AmbientDim, int _Options>
template<int OtherOptions>
Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::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
template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
template<typename OtherScalarType , int OtherOptions>
Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::ParametrizedLine ( const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &  other)
inlineexplicit

Copy constructor with scalar type conversion

Member Function Documentation

template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
template<typename NewScalarType >
internal::cast_return_type<ParametrizedLine, ParametrizedLine<NewScalarType,AmbientDimAtCompileTime,Options> >::type Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::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.

template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
Index Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::dim ( ) const
inline
Returns
the dimension in which the line holds
template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
RealScalar Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::distance ( const VectorType p) const
inline
Returns
the distance of a point p to its projection onto the line *this.
See Also
squaredDistance()
template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
template<int OtherOptions>
_Scalar Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::intersection ( const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &  hyperplane) const
inline
Deprecated:
use intersectionParameter()
Returns
the parameter value of the intersection between *this and the given hyperplane
template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
template<int OtherOptions>
_Scalar Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::intersectionParameter ( const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &  hyperplane) const
inline
Returns
the parameter value of the intersection between *this and the given hyperplane
template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
template<int OtherOptions>
ParametrizedLine<_Scalar, _AmbientDim,_Options>::VectorType Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::intersectionPoint ( const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &  hyperplane) const
inline
Returns
the point of the intersection between *this and the given hyperplane
template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
bool Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::isApprox ( const ParametrizedLine< _Scalar, _AmbientDim, Options > &  other,
const 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()
template<typename _Scalar , int _AmbientDim, int _Options>
ParametrizedLine< _Scalar, _AmbientDim, _Options >::VectorType Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::pointAt ( const Scalar &  t) const
inline
Returns
the point at t along this line
template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
VectorType Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::projection ( const VectorType p) const
inline
Returns
the projection of a point p onto the line *this.
template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
RealScalar Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::squaredDistance ( const VectorType p) const
inline
Returns
the squared distance of a point p to its projection onto the line *this.
See Also
distance()
template<typename _Scalar, int _AmbientDim, int Options = AutoAlign>
static ParametrizedLine Eigen::ParametrizedLine< _Scalar, _AmbientDim, Options >::Through ( const VectorType p0,
const VectorType p1 
)
inlinestatic

Constructs a parametrized line going from p0 to p1.


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