Medial Code Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options > Class Template Reference

\geometry_module More...

#include <ParametrizedLine.h>

Public Types

enum  { AmbientDimAtCompileTime = _AmbientDim , Options = _Options }
 
typedef _Scalar Scalar
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef Eigen::Index 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.
 
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
 
VectorType pointAt (const Scalar &t) const
 
template<int OtherOptions>
Scalar intersectionParameter (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane) const
 
template<int OtherOptions>
Scalar intersection (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane) const
 
template<int OtherOptions>
VectorType intersectionPoint (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
 
template<int OtherOptions>
_Scalar intersectionParameter (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane) const
 
template<int OtherOptions>
_Scalar intersection (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane) 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
 

Detailed Description

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

\geometry_module

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.

Member Typedef Documentation

◆ Index

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

Constructor & Destructor Documentation

◆ ParametrizedLine() [1/2]

template<typename _Scalar , int _AmbientDim, int _Options>
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.

◆ ParametrizedLine() [2/2]

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

Member Function Documentation

◆ cast()

template<typename _Scalar , int _AmbientDim, int _Options>
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.

◆ dim()

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

◆ distance()

template<typename _Scalar , int _AmbientDim, int _Options>
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()

◆ intersection()

template<typename _Scalar , int _AmbientDim, int _Options>
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

◆ intersectionParameter()

template<typename _Scalar , int _AmbientDim, int _Options>
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

◆ intersectionPoint()

template<typename _Scalar , int _AmbientDim, int _Options>
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

◆ isApprox()

template<typename _Scalar , int _AmbientDim, int _Options>
bool Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::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()

◆ pointAt()

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

◆ projection()

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

◆ squaredDistance()

template<typename _Scalar , int _AmbientDim, int _Options>
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()

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