A hyperplane. More...
#include <Hyperplane.h>
Public Types | |
| enum | { AmbientDimAtCompileTime = _AmbientDim } |
| enum | { AmbientDimAtCompileTime = _AmbientDim, Options = _Options } |
| typedef _Scalar | Scalar |
| typedef NumTraits< Scalar >::Real | RealScalar |
| typedef Matrix< Scalar, AmbientDimAtCompileTime, 1 > | VectorType |
| typedef Matrix< Scalar, int(AmbientDimAtCompileTime)==Dynamic?Dynamic:int(AmbientDimAtCompileTime)+1, 1 > | Coefficients |
| typedef Block< Coefficients, AmbientDimAtCompileTime, 1 > | NormalReturnType |
| typedef _Scalar | Scalar |
| typedef NumTraits< Scalar >::Real | RealScalar |
| typedef DenseIndex | Index |
| typedef Matrix< Scalar, AmbientDimAtCompileTime, 1 > | VectorType |
| typedef Matrix< Scalar, Index(AmbientDimAtCompileTime)==Dynamic?Dynamic:Index(AmbientDimAtCompileTime)+1, 1, Options > | Coefficients |
| typedef Block< Coefficients, AmbientDimAtCompileTime, 1 > | NormalReturnType |
| typedef const Block< const Coefficients, AmbientDimAtCompileTime, 1 > | ConstNormalReturnType |
Public Member Functions | |
| Hyperplane () | |
| Hyperplane (int _dim) | |
| Hyperplane (const VectorType &n, const VectorType &e) | |
| Hyperplane (const VectorType &n, Scalar d) | |
| Hyperplane (const ParametrizedLine< Scalar, AmbientDimAtCompileTime > ¶metrized) | |
| ~Hyperplane () | |
| int | dim () const |
| void | normalize (void) |
| Scalar | signedDistance (const VectorType &p) const |
| Scalar | absDistance (const VectorType &p) const |
| VectorType | projection (const VectorType &p) const |
| const NormalReturnType | normal () const |
| NormalReturnType | normal () |
| const Scalar & | offset () const |
| Scalar & | offset () |
| const Coefficients & | coeffs () const |
| Coefficients & | coeffs () |
| VectorType | intersection (const Hyperplane &other) |
| template<typename XprType > | |
| Hyperplane & | transform (const MatrixBase< XprType > &mat, TransformTraits traits=Affine) |
| Hyperplane & | transform (const Transform< Scalar, AmbientDimAtCompileTime > &t, TransformTraits traits=Affine) |
| template<typename NewScalarType > | |
| internal::cast_return_type < Hyperplane, Hyperplane < NewScalarType, AmbientDimAtCompileTime > >::type | cast () const |
| template<typename OtherScalarType > | |
| Hyperplane (const Hyperplane< OtherScalarType, AmbientDimAtCompileTime > &other) | |
| bool | isApprox (const Hyperplane &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const |
| Hyperplane () | |
| template<int OtherOptions> | |
| Hyperplane (const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > &other) | |
| Hyperplane (Index _dim) | |
| Hyperplane (const VectorType &n, const VectorType &e) | |
| Hyperplane (const VectorType &n, Scalar d) | |
| Hyperplane (const ParametrizedLine< Scalar, AmbientDimAtCompileTime > ¶metrized) | |
| ~Hyperplane () | |
| Index | dim () const |
| void | normalize (void) |
| Scalar | signedDistance (const VectorType &p) const |
| Scalar | absDistance (const VectorType &p) const |
| VectorType | projection (const VectorType &p) const |
| ConstNormalReturnType | normal () const |
| NormalReturnType | normal () |
| const Scalar & | offset () const |
| Scalar & | offset () |
| const Coefficients & | coeffs () const |
| Coefficients & | coeffs () |
| VectorType | intersection (const Hyperplane &other) |
| 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) |
| template<typename NewScalarType > | |
| internal::cast_return_type < Hyperplane, Hyperplane < NewScalarType, AmbientDimAtCompileTime, Options > >::type | cast () const |
| template<typename OtherScalarType , int OtherOptions> | |
| Hyperplane (const Hyperplane< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &other) | |
| template<int OtherOptions> | |
| bool | isApprox (const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > &other, typename NumTraits< Scalar >::Real prec=NumTraits< Scalar >::dummy_precision()) const |
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) |
| static Hyperplane | Through (const VectorType &p0, const VectorType &p1) |
| static Hyperplane | Through (const VectorType &p0, const VectorType &p1, const VectorType &p2) |
Protected Attributes | |
| Coefficients | m_coeffs |
A hyperplane.
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.
| typedef Matrix<Scalar,int(AmbientDimAtCompileTime)==Dynamic ? Dynamic : int(AmbientDimAtCompileTime)+1,1> Hyperplane< _Scalar, _AmbientDim >::Coefficients |
| typedef Matrix<Scalar,Index(AmbientDimAtCompileTime)==Dynamic ? Dynamic : Index(AmbientDimAtCompileTime)+1,1,Options> Hyperplane< _Scalar, _AmbientDim >::Coefficients |
| typedef const Block<const Coefficients,AmbientDimAtCompileTime,1> Hyperplane< _Scalar, _AmbientDim >::ConstNormalReturnType |
| typedef DenseIndex Hyperplane< _Scalar, _AmbientDim >::Index |
| typedef Block<Coefficients,AmbientDimAtCompileTime,1> Hyperplane< _Scalar, _AmbientDim >::NormalReturnType |
| typedef Block<Coefficients,AmbientDimAtCompileTime,1> Hyperplane< _Scalar, _AmbientDim >::NormalReturnType |
| typedef NumTraits<Scalar>::Real Hyperplane< _Scalar, _AmbientDim >::RealScalar |
| typedef NumTraits<Scalar>::Real Hyperplane< _Scalar, _AmbientDim >::RealScalar |
| typedef _Scalar Hyperplane< _Scalar, _AmbientDim >::Scalar |
| typedef _Scalar Hyperplane< _Scalar, _AmbientDim >::Scalar |
| typedef Matrix<Scalar,AmbientDimAtCompileTime,1> Hyperplane< _Scalar, _AmbientDim >::VectorType |
| typedef Matrix<Scalar,AmbientDimAtCompileTime,1> Hyperplane< _Scalar, _AmbientDim >::VectorType |
| anonymous enum |
| Hyperplane< _Scalar, _AmbientDim >::Hyperplane | ( | ) | [inline, explicit] |
Default constructor without initialization
| Hyperplane< _Scalar, _AmbientDim >::Hyperplane | ( | int | _dim | ) | [inline, explicit] |
Constructs a dynamic-size hyperplane with _dim the dimension of the ambient space
| Hyperplane< _Scalar, _AmbientDim >::Hyperplane | ( | const VectorType & | n, | |
| const VectorType & | e | |||
| ) | [inline] |
Construct a plane from its normal n and a point e onto the plane.
| Hyperplane< _Scalar, _AmbientDim >::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< _Scalar, _AmbientDim >::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< _Scalar, _AmbientDim >::~Hyperplane | ( | ) | [inline] |
| Hyperplane< _Scalar, _AmbientDim >::Hyperplane | ( | const Hyperplane< OtherScalarType, AmbientDimAtCompileTime > & | other | ) | [inline, explicit] |
Copy constructor with scalar type conversion
| Hyperplane< _Scalar, _AmbientDim >::Hyperplane | ( | ) | [inline, explicit] |
Default constructor without initialization
| Hyperplane< _Scalar, _AmbientDim >::Hyperplane | ( | const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > & | other | ) | [inline] |
| Hyperplane< _Scalar, _AmbientDim >::Hyperplane | ( | Index | _dim | ) | [inline, explicit] |
Constructs a dynamic-size hyperplane with _dim the dimension of the ambient space
| Hyperplane< _Scalar, _AmbientDim >::Hyperplane | ( | const VectorType & | n, | |
| const VectorType & | e | |||
| ) | [inline] |
Construct a plane from its normal n and a point e onto the plane.
| Hyperplane< _Scalar, _AmbientDim >::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< _Scalar, _AmbientDim >::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< _Scalar, _AmbientDim >::~Hyperplane | ( | ) | [inline] |
| Hyperplane< _Scalar, _AmbientDim >::Hyperplane | ( | const Hyperplane< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > & | other | ) | [inline, explicit] |
Copy constructor with scalar type conversion
| Scalar Hyperplane< _Scalar, _AmbientDim >::absDistance | ( | const VectorType & | p | ) | const [inline] |
*this and a point p. | Scalar Hyperplane< _Scalar, _AmbientDim >::absDistance | ( | const VectorType & | p | ) | const [inline] |
*this and a point p. | internal::cast_return_type<Hyperplane, Hyperplane<NewScalarType,AmbientDimAtCompileTime> >::type Hyperplane< _Scalar, _AmbientDim >::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.
| internal::cast_return_type<Hyperplane, Hyperplane<NewScalarType,AmbientDimAtCompileTime,Options> >::type Hyperplane< _Scalar, _AmbientDim >::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& Hyperplane< _Scalar, _AmbientDim >::coeffs | ( | ) | const [inline] |
| Coefficients& Hyperplane< _Scalar, _AmbientDim >::coeffs | ( | ) | [inline] |
| const Coefficients& Hyperplane< _Scalar, _AmbientDim >::coeffs | ( | ) | const [inline] |
| Coefficients& Hyperplane< _Scalar, _AmbientDim >::coeffs | ( | ) | [inline] |
| Index Hyperplane< _Scalar, _AmbientDim >::dim | ( | ) | const [inline] |
| int Hyperplane< _Scalar, _AmbientDim >::dim | ( | ) | const [inline] |
| VectorType Hyperplane< _Scalar, _AmbientDim >::intersection | ( | const Hyperplane< _Scalar, _AmbientDim > & | other | ) | [inline] |
*this and other are lines.| VectorType Hyperplane< _Scalar, _AmbientDim >::intersection | ( | const Hyperplane< _Scalar, _AmbientDim > & | other | ) | [inline] |
*this and other are lines.| bool Hyperplane< _Scalar, _AmbientDim >::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.| bool Hyperplane< _Scalar, _AmbientDim >::isApprox | ( | const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > & | other, | |
| 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.| NormalReturnType Hyperplane< _Scalar, _AmbientDim >::normal | ( | ) | [inline] |
| const NormalReturnType Hyperplane< _Scalar, _AmbientDim >::normal | ( | ) | const [inline] |
| ConstNormalReturnType Hyperplane< _Scalar, _AmbientDim >::normal | ( | ) | const [inline] |
| NormalReturnType Hyperplane< _Scalar, _AmbientDim >::normal | ( | ) | [inline] |
| void Hyperplane< _Scalar, _AmbientDim >::normalize | ( | void | ) | [inline] |
normalizes *this
| void Hyperplane< _Scalar, _AmbientDim >::normalize | ( | void | ) | [inline] |
normalizes *this
| Scalar& Hyperplane< _Scalar, _AmbientDim >::offset | ( | ) | [inline] |
| const Scalar& Hyperplane< _Scalar, _AmbientDim >::offset | ( | ) | const [inline] |
| Scalar& Hyperplane< _Scalar, _AmbientDim >::offset | ( | ) | [inline] |
| const Scalar& Hyperplane< _Scalar, _AmbientDim >::offset | ( | ) | const [inline] |
| VectorType Hyperplane< _Scalar, _AmbientDim >::projection | ( | const VectorType & | p | ) | const [inline] |
*this. | VectorType Hyperplane< _Scalar, _AmbientDim >::projection | ( | const VectorType & | p | ) | const [inline] |
*this. | Scalar Hyperplane< _Scalar, _AmbientDim >::signedDistance | ( | const VectorType & | p | ) | const [inline] |
*this and a point p. | Scalar Hyperplane< _Scalar, _AmbientDim >::signedDistance | ( | const VectorType & | p | ) | const [inline] |
*this and a point p. | static Hyperplane Hyperplane< _Scalar, _AmbientDim >::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 Hyperplane< _Scalar, _AmbientDim >::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 Hyperplane< _Scalar, _AmbientDim >::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 Hyperplane< _Scalar, _AmbientDim >::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& Hyperplane< _Scalar, _AmbientDim >::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& Hyperplane< _Scalar, _AmbientDim >::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& Hyperplane< _Scalar, _AmbientDim >::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. |
| Hyperplane& Hyperplane< _Scalar, _AmbientDim >::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. |
Coefficients Hyperplane< _Scalar, _AmbientDim >::m_coeffs [protected] |
1.7.1