![]() |
Eigen
3.3.3
|
A hyperplane.
This is defined in the Geometry module.
#include <Eigen/Geometry>
A hyperplane is an affine subspace of dimension n-1 in a space of dimension n. For example, a hyperplane in a plane is a line; a hyperplane in 3-space is a plane.
_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. Notice that the dimension of the hyperplane is _AmbientDim-1. |
This class represents an hyperplane as the zero set of the implicit equation where
is a unit normal vector of the plane (linear part) and
is the distance (offset) to the origin.
Public Types | |
typedef Eigen::Index | Index |
Public Member Functions | |
Scalar | absDistance (const VectorType &p) const |
template<typename NewScalarType > | |
internal::cast_return_type < Hyperplane, Hyperplane < NewScalarType, AmbientDimAtCompileTime, Options > >::type | cast () const |
const Coefficients & | coeffs () const |
Coefficients & | coeffs () |
Index | dim () const |
Hyperplane () | |
Hyperplane (Index _dim) | |
Hyperplane (const VectorType &n, const VectorType &e) | |
Hyperplane (const VectorType &n, const Scalar &d) | |
Hyperplane (const ParametrizedLine< Scalar, AmbientDimAtCompileTime > ¶metrized) | |
template<typename OtherScalarType , int OtherOptions> | |
Hyperplane (const Hyperplane< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &other) | |
VectorType | intersection (const Hyperplane &other) const |
template<int OtherOptions> | |
bool | isApprox (const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const |
ConstNormalReturnType | normal () const |
NormalReturnType | normal () |
void | normalize (void) |
const Scalar & | offset () const |
Scalar & | offset () |
VectorType | projection (const VectorType &p) const |
Scalar | signedDistance (const VectorType &p) const |
template<typename XprType > | |
Hyperplane & | transform (const MatrixBase< XprType > &mat, TransformTraits traits=Affine) |
template<int TrOptions> | |
Hyperplane & | transform (const Transform< Scalar, AmbientDimAtCompileTime, Affine, TrOptions > &t, TransformTraits traits=Affine) |
Static Public Member Functions | |
static Hyperplane | Through (const VectorType &p0, const VectorType &p1) |
static Hyperplane | Through (const VectorType &p0, const VectorType &p1, const VectorType &p2) |
typedef Eigen::Index Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::Index |
Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::Hyperplane | ( | ) | [inline] |
Default constructor without initialization
Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::Hyperplane | ( | Index | _dim | ) | [inline, explicit] |
Constructs a dynamic-size hyperplane with _dim the dimension of the ambient space
Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::Hyperplane | ( | const VectorType & | n, |
const VectorType & | e | ||
) | [inline] |
Construct a plane from its normal n and a point e onto the plane.
Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::Hyperplane | ( | const VectorType & | n, |
const Scalar & | d | ||
) | [inline] |
Constructs a plane from its normal n and distance to the origin d such that the algebraic equation of the plane is .
Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::Hyperplane | ( | const ParametrizedLine< Scalar, AmbientDimAtCompileTime > & | parametrized | ) | [inline, explicit] |
Constructs a hyperplane passing through the parametrized line parametrized. If the dimension of the ambient space is greater than 2, then there isn't uniqueness, so an arbitrary choice is made.
Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::Hyperplane | ( | const Hyperplane< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > & | other | ) | [inline, explicit] |
Copy constructor with scalar type conversion
Scalar Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::absDistance | ( | const VectorType & | p | ) | const [inline] |
*this
and a point p. internal::cast_return_type<Hyperplane, Hyperplane<NewScalarType,AmbientDimAtCompileTime,Options> >::type Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::cast | ( | ) | const [inline] |
*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
.
const Coefficients& Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::coeffs | ( | ) | const [inline] |
Coefficients& Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::coeffs | ( | ) | [inline] |
Index Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::dim | ( | ) | const [inline] |
VectorType Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::intersection | ( | const Hyperplane< _Scalar, _AmbientDim, _Options > & | other | ) | const [inline] |
*this
and other are lines.bool Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::isApprox | ( | const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > & | other, |
const typename NumTraits< Scalar >::Real & | prec = NumTraits<Scalar>::dummy_precision() |
||
) | const [inline] |
true
if *this
is approximately equal to other, within the precision determined by prec.ConstNormalReturnType Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::normal | ( | ) | const [inline] |
NormalReturnType Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::normal | ( | ) | [inline] |
void Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::normalize | ( | void | ) | [inline] |
normalizes *this
const Scalar& Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::offset | ( | ) | const [inline] |
Scalar& Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::offset | ( | ) | [inline] |
VectorType Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::projection | ( | const VectorType & | p | ) | const [inline] |
*this
. Scalar Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::signedDistance | ( | const VectorType & | p | ) | const [inline] |
*this
and a point p. static Hyperplane Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::Through | ( | const VectorType & | p0, |
const VectorType & | p1 | ||
) | [inline, static] |
Constructs a hyperplane passing through the two points. If the dimension of the ambient space is greater than 2, then there isn't uniqueness, so an arbitrary choice is made.
static Hyperplane Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >::Through | ( | const VectorType & | p0, |
const VectorType & | p1, | ||
const VectorType & | p2 | ||
) | [inline, static] |
Constructs a hyperplane passing through the three points. The dimension of the ambient space is required to be exactly 3.
Hyperplane& Eigen::Hyperplane< _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
.
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. |
Hyperplane& Eigen::Hyperplane< _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
.
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. |