Eigen  5.0.1
 
Loading...
Searching...
No Matches
Eigen::ParametrizedLine< Scalar_, AmbientDim_, Options_ > Class Template Reference

#include <Eigen/src/Geometry/ParametrizedLine.h>

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} \). The origin is part of the parametrization: two ParametrizedLine objects may describe the same geometric line while using different origins.

Template Parameters
Scalar_the scalar type, i.e., the type of the coefficients
AmbientDim_the dimension of the ambient space, can be a compile time value or Dynamic.

Public Types

using 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>
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 ()
 
template<int OtherOptions>
 ParametrizedLine (const Hyperplane< Scalar_, AmbientDim_, OtherOptions > &hyperplane)
 
template<typename OtherScalarType, int OtherOptions>
 ParametrizedLine (const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &other)
 
 ParametrizedLine (const VectorType &origin, const VectorType &direction)
 
 ParametrizedLine (Index _dim)
 
VectorType pointAt (const Scalar &t) const
 
VectorType projection (const VectorType &p) const
 
RealScalar squaredDistance (const VectorType &p) const
 
template<typename XprType>
ParametrizedLine & transform (const MatrixBase< XprType > &mat, TransformTraits traits=Affine)
 
template<int TrOptions>
ParametrizedLine & transform (const Transform< Scalar, AmbientDimAtCompileTime, Affine, TrOptions > &t, TransformTraits traits=Affine)
 

Static Public Member Functions

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

Member Typedef Documentation

◆ Index

template<typename Scalar_, int AmbientDim_, int Options_>
using Eigen::ParametrizedLine< Scalar_, AmbientDim_, Options_ >::Index

Constructor & Destructor Documentation

◆ ParametrizedLine() [1/5]

template<typename Scalar_, int AmbientDim_, int Options_>
Eigen::ParametrizedLine< Scalar_, AmbientDim_, Options_ >::ParametrizedLine ( )
inline

Default constructor without initialization

◆ ParametrizedLine() [2/5]

template<typename Scalar_, int AmbientDim_, int Options_>
Eigen::ParametrizedLine< Scalar_, AmbientDim_, Options_ >::ParametrizedLine ( Index _dim)
inlineexplicit

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

◆ ParametrizedLine() [3/5]

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 origin is part of the parametrization and is not canonicalized.
the vector direction is assumed to be normalized.

◆ ParametrizedLine() [4/5]

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

◆ ParametrizedLine() [5/5]

template<typename Scalar_, int AmbientDim_, int Options_>
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

◆ 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
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,
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.
Note
This compares both origins and directions. Lines that represent the same set of points but use different origins are not considered approximately equal by this method.
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()

◆ Through()

template<typename Scalar_, int AmbientDim_, int Options_>
static ParametrizedLine Eigen::ParametrizedLine< Scalar_, AmbientDim_, Options_ >::Through ( const VectorType & p0,
const VectorType & p1 )
inlinestatic

Constructs a parametrized line going from p0 to p1.

◆ transform() [1/2]

template<typename Scalar_, int AmbientDim_, int Options_>
template<typename XprType>
ParametrizedLine & Eigen::ParametrizedLine< Scalar_, AmbientDim_, Options_ >::transform ( const MatrixBase< XprType > & mat,
TransformTraits traits = Affine )
inline

Applies the transformation matrix mat to *this and returns a reference to *this.

Parameters
matthe Dim x Dim transformation matrix
traitsspecifies whether the matrix mat represents an Isometry or a more generic Affine transformation. The default is Affine.

◆ transform() [2/2]

template<typename Scalar_, int AmbientDim_, int Options_>
template<int TrOptions>
ParametrizedLine & Eigen::ParametrizedLine< Scalar_, AmbientDim_, Options_ >::transform ( const Transform< Scalar, AmbientDimAtCompileTime, Affine, TrOptions > & t,
TransformTraits traits = Affine )
inline

Applies the transformation t to *this and returns a reference to *this.

Parameters
tthe transformation of dimension Dim
traitsspecifies whether the transformation t represents an Isometry or a more generic Affine transformation. The default is Affine. Other kind of transformations are not supported.

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