![]() |
Eigen
3.2.7
|
A hyperplane.
This is defined in the Geometry module.
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 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) |
|
inline |
Default constructor without initialization
Referenced by Hyperplane< _Scalar, _AmbientDim, Options >::cast().
|
inlineexplicit |
Constructs a dynamic-size hyperplane with _dim the dimension of the ambient space
|
inline |
Construct a plane from its normal n and a point e onto the plane.
References Hyperplane< _Scalar, _AmbientDim, Options >::normal(), and Hyperplane< _Scalar, _AmbientDim, Options >::offset().
|
inline |
Constructs a plane from its normal n and distance to the origin d such that the algebraic equation of the plane is .
References Hyperplane< _Scalar, _AmbientDim, Options >::normal(), and Hyperplane< _Scalar, _AmbientDim, Options >::offset().
|
inlineexplicit |
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.
References Hyperplane< _Scalar, _AmbientDim, Options >::normal(), and Hyperplane< _Scalar, _AmbientDim, Options >::offset().
|
inlineexplicit |
Copy constructor with scalar type conversion
|
inline |
*this
and a point p. References Hyperplane< _Scalar, _AmbientDim, Options >::signedDistance().
|
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
.
References Hyperplane< _Scalar, _AmbientDim, Options >::Hyperplane().
|
inline |
Referenced by Hyperplane< _Scalar, _AmbientDim, Options >::intersection().
|
inline |
|
inline |
References Eigen::Dynamic.
Referenced by Hyperplane< _Scalar, _AmbientDim, Options >::normal(), and Hyperplane< _Scalar, _AmbientDim, Options >::offset().
|
inline |
*this
and other are lines.References Hyperplane< _Scalar, _AmbientDim, Options >::coeffs().
|
inline |
true
if *this
is approximately equal to other, within the precision determined by prec.
|
inline |
References Hyperplane< _Scalar, _AmbientDim, Options >::dim().
Referenced by Hyperplane< _Scalar, _AmbientDim, Options >::Hyperplane(), ParametrizedLine< _Scalar, _AmbientDim, Options >::intersectionParameter(), Hyperplane< _Scalar, _AmbientDim, Options >::normalize(), ParametrizedLine< _Scalar, _AmbientDim, Options >::ParametrizedLine(), Hyperplane< _Scalar, _AmbientDim, Options >::projection(), Hyperplane< _Scalar, _AmbientDim, Options >::signedDistance(), Hyperplane< _Scalar, _AmbientDim, Options >::Through(), and Hyperplane< _Scalar, _AmbientDim, Options >::transform().
|
inline |
References Hyperplane< _Scalar, _AmbientDim, Options >::dim().
|
inline |
normalizes *this
References Hyperplane< _Scalar, _AmbientDim, Options >::normal().
|
inline |
References Hyperplane< _Scalar, _AmbientDim, Options >::dim().
Referenced by Hyperplane< _Scalar, _AmbientDim, Options >::Hyperplane(), ParametrizedLine< _Scalar, _AmbientDim, Options >::intersectionParameter(), ParametrizedLine< _Scalar, _AmbientDim, Options >::ParametrizedLine(), Hyperplane< _Scalar, _AmbientDim, Options >::signedDistance(), and Hyperplane< _Scalar, _AmbientDim, Options >::transform().
|
inline |
References Hyperplane< _Scalar, _AmbientDim, Options >::dim().
|
inline |
*this
. References Hyperplane< _Scalar, _AmbientDim, Options >::normal(), and Hyperplane< _Scalar, _AmbientDim, Options >::signedDistance().
|
inline |
*this
and a point p. References Hyperplane< _Scalar, _AmbientDim, Options >::normal(), and Hyperplane< _Scalar, _AmbientDim, Options >::offset().
Referenced by Hyperplane< _Scalar, _AmbientDim, Options >::absDistance(), and Hyperplane< _Scalar, _AmbientDim, Options >::projection().
|
inlinestatic |
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.
References Hyperplane< _Scalar, _AmbientDim, Options >::normal().
|
inlinestatic |
Constructs a hyperplane passing through the three points. The dimension of the ambient space is required to be exactly 3.
References Eigen::ComputeFullV, JacobiSVD< MatrixType, QRPreconditioner >::matrixV(), and DenseBase< Derived >::transpose().
|
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. |
References Eigen::Affine, MatrixBase< Derived >::inverse(), Eigen::Isometry, and Hyperplane< _Scalar, _AmbientDim, Options >::normal().
Referenced by Hyperplane< _Scalar, _AmbientDim, Options >::transform().
|
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. |
References Transform< Scalar, Dim, Mode, _Options >::linear(), Hyperplane< _Scalar, _AmbientDim, Options >::normal(), Hyperplane< _Scalar, _AmbientDim, Options >::offset(), Hyperplane< _Scalar, _AmbientDim, Options >::transform(), and Transform< Scalar, Dim, Mode, _Options >::translation().