$treeview $search $mathjax
Eigen  3.2.5
$projectbrief
$projectbrief
$searchbox

Hyperplane< _Scalar, _AmbientDim, _Options > Class Template Reference
[Geometry module]

A hyperplane. More...

List of all members.

Public Member Functions

Scalar absDistance (const VectorType &p) const
template<typename NewScalarType >
internal::cast_return_type
< Hyperplane, Hyperplane
< NewScalarType,
AmbientDimAtCompileTime,
Options > >::type 
cast () const
Coefficientscoeffs ()
const Coefficientscoeffs () const
Index dim () const
template<typename OtherScalarType , int OtherOptions>
 Hyperplane (const Hyperplane< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &other)
 Hyperplane (const ParametrizedLine< Scalar, AmbientDimAtCompileTime > &parametrized)
 Hyperplane (const VectorType &n, const Scalar &d)
 Hyperplane (const VectorType &n, const VectorType &e)
 Hyperplane (Index _dim)
 Hyperplane ()
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
NormalReturnType normal ()
ConstNormalReturnType normal () const
void normalize (void)
Scalar & offset ()
const Scalar & offset () const
VectorType projection (const VectorType &p) const
Scalar signedDistance (const VectorType &p) const
template<int TrOptions>
Hyperplanetransform (const Transform< Scalar, AmbientDimAtCompileTime, Affine, TrOptions > &t, TransformTraits traits=Affine)
template<typename XprType >
Hyperplanetransform (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)

Detailed Description

template<typename _Scalar, int _AmbientDim, int _Options>
class Eigen::Hyperplane< _Scalar, _AmbientDim, _Options >

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.

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. Notice that the dimension of the hyperplane is _AmbientDim-1.

This class represents an hyperplane as the zero set of the implicit equation $ n \cdot x + d = 0 $ where $ n $ is a unit normal vector of the plane (linear part) and $ d $ is the distance (offset) to the origin.


Constructor & Destructor Documentation

Hyperplane (  )  [inline]

Default constructor without initialization

Hyperplane ( Index  _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.

Warning:
the vector normal is assumed to be normalized.

References Hyperplane< _Scalar, _AmbientDim, _Options >::normal(), and Hyperplane< _Scalar, _AmbientDim, _Options >::offset().

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 $ n \cdot x + d = 0 $.

Warning:
the vector normal is assumed to be normalized.

References Hyperplane< _Scalar, _AmbientDim, _Options >::normal(), and Hyperplane< _Scalar, _AmbientDim, _Options >::offset().

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.

References Hyperplane< _Scalar, _AmbientDim, _Options >::normal(), and Hyperplane< _Scalar, _AmbientDim, _Options >::offset().

Hyperplane ( const Hyperplane< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &  other  )  [inline, explicit]

Copy constructor with scalar type conversion

References Hyperplane< _Scalar, _AmbientDim, _Options >::coeffs().


Member Function Documentation

Scalar absDistance ( const VectorType p  )  const [inline]
Returns:
the absolute distance between the plane *this and a point p.
See also:
signedDistance()

References Hyperplane< _Scalar, _AmbientDim, _Options >::signedDistance().

internal::cast_return_type<Hyperplane, Hyperplane<NewScalarType,AmbientDimAtCompileTime,Options> >::type cast (  )  const [inline]
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.

Coefficients& coeffs (  )  [inline]
Returns:
a non-constant reference to the coefficients c_i of the plane equation: $ c_0*x_0 + ... + c_{d-1}*x_{d-1} + c_d = 0 $
const Coefficients& coeffs (  )  const [inline]
Returns:
a constant reference to the coefficients c_i of the plane equation: $ c_0*x_0 + ... + c_{d-1}*x_{d-1} + c_d = 0 $

Referenced by Hyperplane< _Scalar, _AmbientDim, _Options >::Hyperplane(), and Hyperplane< _Scalar, _AmbientDim, _Options >::intersection().

Index dim (  )  const [inline]
VectorType intersection ( const Hyperplane< _Scalar, _AmbientDim, _Options > &  other  )  const [inline]
Returns:
the intersection of *this with other.
Warning:
The ambient space must be a plane, i.e. have dimension 2, so that *this and other are lines.
Note:
If other is approximately parallel to *this, this method will return any point on *this.

References Hyperplane< _Scalar, _AmbientDim, _Options >::coeffs().

bool isApprox ( const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > &  other,
const typename NumTraits< Scalar >::Real &  prec = NumTraits<Scalar>::dummy_precision() 
) const [inline]
Returns:
true if *this is approximately equal to other, within the precision determined by prec.
See also:
MatrixBase::isApprox()
NormalReturnType normal (  )  [inline]
Returns:
a non-constant reference to the unit normal vector of the plane, which corresponds to the linear part of the implicit equation.

References Hyperplane< _Scalar, _AmbientDim, _Options >::dim().

void normalize ( void   )  [inline]
Scalar& offset (  )  [inline]
Returns:
a non-constant reference to the distance to the origin, which is also the constant part of the implicit equation

References Hyperplane< _Scalar, _AmbientDim, _Options >::dim().

VectorType projection ( const VectorType p  )  const [inline]
Returns:
the projection of a point p onto the plane *this.

References Hyperplane< _Scalar, _AmbientDim, _Options >::normal(), and Hyperplane< _Scalar, _AmbientDim, _Options >::signedDistance().

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.

References Eigen::ComputeFullV, JacobiSVD< _MatrixType, QRPreconditioner >::matrixV(), and DenseBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::transpose().

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.

References Hyperplane< _Scalar, _AmbientDim, _Options >::normal().

Hyperplane& transform ( const Transform< Scalar, AmbientDimAtCompileTime, Affine, TrOptions > &  t,
TransformTraits  traits = Affine 
) [inline]

Applies the transformation t to *this and returns a reference to *this.

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.

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().

Hyperplane& transform ( const MatrixBase< XprType > &  mat,
TransformTraits  traits = Affine 
) [inline]

Applies the transformation matrix mat to *this and returns a reference to *this.

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.

References Eigen::Affine, MatrixBase< Derived >::inverse(), Eigen::Isometry, and Hyperplane< _Scalar, _AmbientDim, _Options >::normal().

Referenced by Hyperplane< _Scalar, _AmbientDim, _Options >::transform().


The documentation for this class was generated from the following file: