template<typename _Scalar, int _AmbientDim, int _Options>
ParametrizedLine class
A parametrized line.
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. |
_Options |
Contents
This is defined in the Geometry module. #include <Eigen/Geometry>
A parametrized line is defined by an origin point and a unit direction vector such that the line corresponds to the set , .
Public types
- enum (anonymous) { AmbientDimAtCompileTime = _AmbientDim, Options = _Options }
-
using Index = Eigen::
Index deprecated - using RealScalar = NumTraits<Scalar>::Real
- using Scalar = _Scalar
- using VectorType = Matrix<Scalar, AmbientDimAtCompileTime, 1, Options>
Public static functions
- static auto Through(const VectorType& p0, const VectorType& p1) -> ParametrizedLine
Constructors, destructors, conversion operators
- ParametrizedLine()
-
template<int OtherOptions>ParametrizedLine(const ParametrizedLine<Scalar, AmbientDimAtCompileTime, OtherOptions>& other)
- ParametrizedLine(Index _dim) explicit
- ParametrizedLine(const VectorType& origin, const VectorType& direction)
-
template<int OtherOptions>ParametrizedLine(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) explicit
-
template<typename OtherScalarType, int OtherOptions>ParametrizedLine(const ParametrizedLine<OtherScalarType, AmbientDimAtCompileTime, OtherOptions>& other) explicit
- ~ParametrizedLine()
Public functions
-
template<typename NewScalarType>auto cast() const -> internal::cast_return_type<ParametrizedLine, ParametrizedLine<NewScalarType, AmbientDimAtCompileTime, Options>>::type
- auto dim() const -> Index
- auto direction() const -> const VectorType&
- auto direction() -> VectorType&
- auto distance(const VectorType& p) const -> RealScalar
-
template<int OtherOptions>auto intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const -> Scalar
-
template<int OtherOptions>auto intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const -> _Scalar deprecated
-
template<int OtherOptions>auto intersectionParameter(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const -> Scalar
-
template<int OtherOptions>auto intersectionParameter(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const -> _Scalar
-
template<int OtherOptions>auto intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const -> VectorType
- auto isApprox(const ParametrizedLine& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const -> bool
- auto origin() const -> const VectorType&
- auto origin() -> VectorType&
- auto pointAt(const Scalar& t) const -> VectorType
- auto projection(const VectorType& p) const -> VectorType
- auto squaredDistance(const VectorType& p) const -> RealScalar
-
template<typename XprType>auto transform(const MatrixBase<XprType>& mat, TransformTraits traits = Affine) -> ParametrizedLine&
-
template<int TrOptions>auto transform(const Transform<Scalar, AmbientDimAtCompileTime, Affine, TrOptions>& t, TransformTraits traits = Affine) -> ParametrizedLine&
Protected variables
Enum documentation
template<typename _Scalar, int _AmbientDim, int _Options>
enum Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: (anonymous)
Enumerators | |
---|---|
AmbientDimAtCompileTime | |
Options |
Typedef documentation
template<typename _Scalar, int _AmbientDim, int _Options>
typedef Eigen:: Index Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: Index
template<typename _Scalar, int _AmbientDim, int _Options>
typedef NumTraits<Scalar>::Real Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: RealScalar
template<typename _Scalar, int _AmbientDim, int _Options>
typedef _Scalar Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: Scalar
template<typename _Scalar, int _AmbientDim, int _Options>
typedef Matrix<Scalar, AmbientDimAtCompileTime, 1, Options> Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: VectorType
Function documentation
template<typename _Scalar, int _AmbientDim, int _Options>
static ParametrizedLine Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: Through(const VectorType& p0,
const VectorType& p1)
Constructs a parametrized line going from p0 to p1.
template<typename _Scalar, int _AmbientDim, int _Options>
Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: ParametrizedLine()
Default constructor without initialization
template<typename _Scalar, int _AmbientDim, int _Options>
template<int OtherOptions>
Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: ParametrizedLine(const ParametrizedLine<Scalar, AmbientDimAtCompileTime, OtherOptions>& other)
template<typename _Scalar, int _AmbientDim, int _Options>
Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: ParametrizedLine(Index _dim) explicit
Constructs a dynamic-size line with _dim the dimension of the ambient space
template<typename _Scalar, int _AmbientDim, int _Options>
Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: ParametrizedLine(const VectorType& origin,
const VectorType& direction)
Initializes a parametrized line of direction direction and origin origin.
template<typename _Scalar, int _AmbientDim, int _Options>
template<int OtherOptions>
Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: ParametrizedLine(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) explicit
Constructs a parametrized line from a 2D hyperplane
template<typename _Scalar, int _AmbientDim, int _Options>
template<typename OtherScalarType, int OtherOptions>
Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: ParametrizedLine(const ParametrizedLine<OtherScalarType, AmbientDimAtCompileTime, OtherOptions>& other) explicit
Copy constructor with scalar type conversion
template<typename _Scalar, int _AmbientDim, int _Options>
Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: ~ParametrizedLine()
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
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>
const VectorType& Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: direction() const
template<typename _Scalar, int _AmbientDim, int _Options>
VectorType& Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: direction()
template<typename _Scalar, int _AmbientDim, int _Options>
RealScalar Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: distance(const VectorType& p) const
Returns | the distance of a point p to its projection onto the line *this . |
---|
template<typename _Scalar, int _AmbientDim, int _Options>
template<int OtherOptions>
Scalar Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const
template<typename _Scalar, int _AmbientDim, int _Options>
template<int OtherOptions>
_Scalar Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const
Returns | the parameter value of the intersection between *this and the given hyperplane |
---|
template<typename _Scalar, int _AmbientDim, int _Options>
template<int OtherOptions>
Scalar Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: intersectionParameter(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const
template<typename _Scalar, int _AmbientDim, int _Options>
template<int OtherOptions>
_Scalar Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: intersectionParameter(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const
Returns | the parameter value of the intersection between *this and the given hyperplane |
---|
template<typename _Scalar, int _AmbientDim, int _Options>
template<int OtherOptions>
VectorType Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const
Returns | the point of the intersection between *this and the given hyperplane |
---|
template<typename _Scalar, int _AmbientDim, int _Options>
bool Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: isApprox(const ParametrizedLine& other,
const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const
Returns | true if *this is approximately equal to other, within the precision determined by prec. |
---|
template<typename _Scalar, int _AmbientDim, int _Options>
const VectorType& Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: origin() const
template<typename _Scalar, int _AmbientDim, int _Options>
VectorType& Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: origin()
template<typename _Scalar, int _AmbientDim, int _Options>
VectorType Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: pointAt(const Scalar& t) const
Returns | the point at t along this line |
---|
template<typename _Scalar, int _AmbientDim, int _Options>
VectorType Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: projection(const VectorType& p) const
Returns | the projection of a point p onto the line *this . |
---|
template<typename _Scalar, int _AmbientDim, int _Options>
RealScalar Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: squaredDistance(const VectorType& p) const
Returns | the squared distance of a point p to its projection onto the line *this . |
---|
template<typename _Scalar, int _AmbientDim, int _Options>
template<typename XprType>
ParametrizedLine& Eigen:: ParametrizedLine<_Scalar, _AmbientDim, _Options>:: transform(const MatrixBase<XprType>& mat,
TransformTraits traits = Affine)
Parameters | |
---|---|
mat | the Dim x Dim transformation matrix |
traits | specifies whether the matrix mat represents an Isometry or a more generic Affine transformation. The default is Affine. |
Applies the transformation matrix mat to *this
and returns a reference to *this
.
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)
Parameters | |
---|---|
t | the transformation of dimension Dim |
traits | specifies whether the transformation t represents an Isometry or a more generic Affine transformation. The default is Affine. Other kind of transformations are not supported. |
Applies the transformation t to *this
and returns a reference to *this
.