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. |
where
is a unit normal vector of the plane (linear part) and
is the distance (offset) to the origin. Public Types | |
| enum | { AmbientDimAtCompileTime } |
|
typedef Matrix< Scalar, AmbientDimAtCompileTime==Dynamic?Dynamic:AmbientDimAtCompileTime+1, 1 > | Coefficients |
|
typedef Block< Coefficients, AmbientDimAtCompileTime, 1 > | NormalReturnType |
| typedef NumTraits< Scalar >::Real | RealScalar |
| typedef _Scalar | Scalar |
|
typedef Matrix< Scalar, AmbientDimAtCompileTime, 1 > | VectorType |
Public Member Functions | |
| Scalar | absDistance (const VectorType &p) const |
| template<typename NewScalarType> | |
| ei_cast_return_type < Hyperplane, Hyperplane < NewScalarType, AmbientDimAtCompileTime > >::type | cast () const |
| Coefficients & | coeffs () |
| const Coefficients & | coeffs () const |
| int | dim () const |
| template<typename OtherScalarType> | |
| Hyperplane (const Hyperplane< OtherScalarType, AmbientDimAtCompileTime > &other) | |
| Hyperplane (const ParametrizedLine< Scalar, AmbientDimAtCompileTime > ¶metrized) | |
| Hyperplane (const VectorType &n, Scalar d) | |
| Hyperplane (const VectorType &n, const VectorType &e) | |
| Hyperplane (int _dim) | |
| Hyperplane () | |
| VectorType | intersection (const Hyperplane &other) |
| bool | isApprox (const Hyperplane &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const |
| NormalReturnType | normal () |
| const NormalReturnType | normal () const |
| void | normalize (void) |
| Scalar & | offset () |
| const Scalar & | offset () const |
| VectorType | projection (const VectorType &p) const |
| Scalar | signedDistance (const VectorType &p) const |
| Hyperplane & | transform (const Transform< Scalar, AmbientDimAtCompileTime > &t, TransformTraits traits=Affine) |
| template<typename XprType> | |
| Hyperplane & | transform (const MatrixBase< XprType > &mat, TransformTraits traits=Affine) |
Static Public Member Functions | |
| static Hyperplane | Through (const VectorType &p0, const VectorType &p1, const VectorType &p2) |
| static Hyperplane | Through (const VectorType &p0, const VectorType &p1) |
Protected Attributes | |
| Coefficients | m_coeffs |
| Hyperplane | ( | ) | [inline, explicit] |
Default constructor without initialization
| Hyperplane | ( | int | _dim | ) | [inline, explicit] |
Constructs a dynamic-size hyperplane with _dim the dimension of the ambient space
| Hyperplane | ( | const VectorType & | n, | |
| const VectorType & | e | |||
| ) | [inline] |
Construct a plane from its normal n and a point e onto the plane.
| Hyperplane | ( | const VectorType & | n, | |
| 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
.
| 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.
| Hyperplane | ( | const Hyperplane< OtherScalarType, AmbientDimAtCompileTime > & | other | ) | [inline, explicit] |
Copy constructor with scalar type conversion
| Scalar absDistance | ( | const VectorType & | p | ) | const [inline] |
| ei_cast_return_type<Hyperplane, Hyperplane<NewScalarType,AmbientDimAtCompileTime> >::type cast | ( | ) | const [inline] |
*this with scalar type casted to NewScalarType *this then this function smartly returns a const reference to *this.
| Coefficients& coeffs | ( | ) | [inline] |
| const Coefficients& coeffs | ( | ) | const [inline] |
| int dim | ( | ) | const [inline] |
| VectorType intersection | ( | const Hyperplane< _Scalar, _AmbientDim > & | other | ) | [inline] |
*this and other are lines.| bool isApprox | ( | const Hyperplane< _Scalar, _AmbientDim > & | other, | |
| typename NumTraits< Scalar >::Real | prec = precision<Scalar>() | |||
| ) | const [inline] |
true if *this is approximately equal to other, within the precision determined by prec.| NormalReturnType normal | ( | ) | [inline] |
| const NormalReturnType normal | ( | ) | const [inline] |
| void normalize | ( | void | ) | [inline] |
normalizes *this
| Scalar& offset | ( | ) | [inline] |
| const Scalar& offset | ( | ) | const [inline] |
| VectorType projection | ( | const VectorType & | p | ) | const [inline] |
*this. | Scalar signedDistance | ( | const VectorType & | p | ) | const [inline] |
| static Hyperplane 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.
| static Hyperplane 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.
| Hyperplane& transform | ( | const Transform< Scalar, AmbientDimAtCompileTime > & | 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. |
| Hyperplane& 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. |
1.5.5