Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
Eigen::Hyperplane Class Reference

A hyperplane. More...

#include <ForwardDeclarations.h>

Public Types

enum  { AmbientDimAtCompileTime = _AmbientDim, Options = _Options }
 
typedef Matrix< Scalar, Index(AmbientDimAtCompileTime)==Dynamic ? Dynamic :Index(AmbientDimAtCompileTime)+1, 1, OptionsCoefficients
 
typedef Eigen::Index Index
 
typedef Block< Coefficients, AmbientDimAtCompileTime, 1 > NormalReturnType
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef _Scalar Scalar
 
typedef Matrix< Scalar, AmbientDimAtCompileTime, 1 > VectorType
 

Public Member Functions

EIGEN_DEVICE_FUNC Scalar absDistance (const VectorType &p) const
 
template<typename NewScalarType >
EIGEN_DEVICE_FUNC internal::cast_return_type< Hyperplane, Hyperplane< NewScalarType, AmbientDimAtCompileTime, Options > >::type cast () const
 
EIGEN_DEVICE_FUNC Coefficientscoeffs ()
 
const EIGEN_DEVICE_FUNC Coefficientscoeffs () const
 
EIGEN_DEVICE_FUNC Index dim () const
 
EIGEN_DEVICE_FUNC Hyperplane ()
 
template<typename OtherScalarType , int OtherOptions>
EIGEN_DEVICE_FUNC Hyperplane (const Hyperplane< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &other)
 
template<int OtherOptions>
EIGEN_DEVICE_FUNC Hyperplane (const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > &other)
 
EIGEN_DEVICE_FUNC Hyperplane (const ParametrizedLine< Scalar, AmbientDimAtCompileTime > &parametrized)
 
EIGEN_DEVICE_FUNC Hyperplane (const VectorType &n, const Scalar &d)
 
EIGEN_DEVICE_FUNC Hyperplane (const VectorType &n, const VectorType &e)
 
EIGEN_DEVICE_FUNC Hyperplane (Index _dim)
 
EIGEN_DEVICE_FUNC VectorType intersection (const Hyperplane &other) const
 
template<int OtherOptions>
EIGEN_DEVICE_FUNC bool isApprox (const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const
 
EIGEN_DEVICE_FUNC NormalReturnType normal ()
 
EIGEN_DEVICE_FUNC ConstNormalReturnType normal () const
 
EIGEN_DEVICE_FUNC void normalize (void)
 
EIGEN_DEVICE_FUNC Scalaroffset ()
 
const EIGEN_DEVICE_FUNC Scalaroffset () const
 
EIGEN_DEVICE_FUNC VectorType projection (const VectorType &p) const
 
EIGEN_DEVICE_FUNC Scalar signedDistance (const VectorType &p) const
 
template<typename XprType >
EIGEN_DEVICE_FUNC Hyperplanetransform (const MatrixBase< XprType > &mat, TransformTraits traits=Affine)
 
template<int TrOptions>
EIGEN_DEVICE_FUNC Hyperplanetransform (const Transform< Scalar, AmbientDimAtCompileTime, Affine, TrOptions > &t, TransformTraits traits=Affine)
 
EIGEN_DEVICE_FUNC ~Hyperplane ()
 

Static Public Member Functions

static EIGEN_DEVICE_FUNC Hyperplane Through (const VectorType &p0, const VectorType &p1)
 
static EIGEN_DEVICE_FUNC Hyperplane Through (const VectorType &p0, const VectorType &p1, const VectorType &p2)
 

Public Attributes

const typedef Block< const Coefficients, AmbientDimAtCompileTime, 1 > ConstNormalReturnType
 

Protected Attributes

Coefficients m_coeffs
 

Detailed Description

A hyperplane.

\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.

Template Parameters
_Scalarthe scalar type, i.e., the type of the coefficients
_AmbientDimthe 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.

Definition at line 296 of file ForwardDeclarations.h.

Member Typedef Documentation

◆ Coefficients

Definition at line 48 of file Hyperplane.h.

◆ Index

Deprecated:
since Eigen 3.3

Definition at line 44 of file Hyperplane.h.

◆ NormalReturnType

Definition at line 49 of file Hyperplane.h.

◆ RealScalar

Definition at line 43 of file Hyperplane.h.

◆ Scalar

typedef _Scalar Eigen::Hyperplane::Scalar

Definition at line 42 of file Hyperplane.h.

◆ VectorType

Definition at line 45 of file Hyperplane.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
AmbientDimAtCompileTime 
Options 

Definition at line 38 of file Hyperplane.h.

Constructor & Destructor Documentation

◆ Hyperplane() [1/7]

EIGEN_DEVICE_FUNC Eigen::Hyperplane::Hyperplane ( )
inline

Default constructor without initialization

Definition at line 53 of file Hyperplane.h.

◆ Hyperplane() [2/7]

template<int OtherOptions>
EIGEN_DEVICE_FUNC Eigen::Hyperplane::Hyperplane ( const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > &  other)
inline

Definition at line 56 of file Hyperplane.h.

◆ Hyperplane() [3/7]

EIGEN_DEVICE_FUNC Eigen::Hyperplane::Hyperplane ( Index  _dim)
inlineexplicit

Constructs a dynamic-size hyperplane with _dim the dimension of the ambient space

Definition at line 62 of file Hyperplane.h.

◆ Hyperplane() [4/7]

EIGEN_DEVICE_FUNC Eigen::Hyperplane::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.

Definition at line 67 of file Hyperplane.h.

◆ Hyperplane() [5/7]

EIGEN_DEVICE_FUNC Eigen::Hyperplane::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.

Definition at line 78 of file Hyperplane.h.

◆ Hyperplane() [6/7]

EIGEN_DEVICE_FUNC Eigen::Hyperplane::Hyperplane ( const ParametrizedLine< Scalar, AmbientDimAtCompileTime > &  parametrized)
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.

Definition at line 123 of file Hyperplane.h.

◆ ~Hyperplane()

EIGEN_DEVICE_FUNC Eigen::Hyperplane::~Hyperplane ( )
inline

Definition at line 129 of file Hyperplane.h.

◆ Hyperplane() [7/7]

template<typename OtherScalarType , int OtherOptions>
EIGEN_DEVICE_FUNC Eigen::Hyperplane::Hyperplane ( const Hyperplane< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &  other)
inlineexplicit

Copy constructor with scalar type conversion

Definition at line 264 of file Hyperplane.h.

Member Function Documentation

◆ absDistance()

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

Definition at line 148 of file Hyperplane.h.

◆ cast()

template<typename NewScalarType >
EIGEN_DEVICE_FUNC internal::cast_return_type<Hyperplane, Hyperplane<NewScalarType,AmbientDimAtCompileTime,Options> >::type Eigen::Hyperplane::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.

Definition at line 256 of file Hyperplane.h.

◆ coeffs() [1/2]

EIGEN_DEVICE_FUNC Coefficients& Eigen::Hyperplane::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 $

Definition at line 181 of file Hyperplane.h.

◆ coeffs() [2/2]

const EIGEN_DEVICE_FUNC Coefficients& Eigen::Hyperplane::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 $

Definition at line 176 of file Hyperplane.h.

◆ dim()

EIGEN_DEVICE_FUNC Index Eigen::Hyperplane::dim ( ) const
inline
Returns
the dimension in which the plane holds

Definition at line 132 of file Hyperplane.h.

◆ intersection()

EIGEN_DEVICE_FUNC VectorType Eigen::Hyperplane::intersection ( const Hyperplane 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.

Definition at line 189 of file Hyperplane.h.

◆ isApprox()

template<int OtherOptions>
EIGEN_DEVICE_FUNC bool Eigen::Hyperplane::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()

Definition at line 272 of file Hyperplane.h.

◆ normal() [1/2]

EIGEN_DEVICE_FUNC NormalReturnType Eigen::Hyperplane::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.

Definition at line 162 of file Hyperplane.h.

◆ normal() [2/2]

EIGEN_DEVICE_FUNC ConstNormalReturnType Eigen::Hyperplane::normal ( ) const
inline
Returns
a constant reference to the unit normal vector of the plane, which corresponds to the linear part of the implicit equation.

Definition at line 157 of file Hyperplane.h.

◆ normalize()

EIGEN_DEVICE_FUNC void Eigen::Hyperplane::normalize ( void  )
inline

normalizes *this

Definition at line 135 of file Hyperplane.h.

◆ offset() [1/2]

EIGEN_DEVICE_FUNC Scalar& Eigen::Hyperplane::offset ( )
inline
Returns
a non-constant reference to the distance to the origin, which is also the constant part of the implicit equation

Definition at line 171 of file Hyperplane.h.

◆ offset() [2/2]

const EIGEN_DEVICE_FUNC Scalar& Eigen::Hyperplane::offset ( ) const
inline
Returns
the distance to the origin, which is also the "constant term" of the implicit equation
Warning
the vector normal is assumed to be normalized.

Definition at line 167 of file Hyperplane.h.

◆ projection()

EIGEN_DEVICE_FUNC VectorType Eigen::Hyperplane::projection ( const VectorType p) const
inline
Returns
the projection of a point p onto the plane *this.

Definition at line 152 of file Hyperplane.h.

◆ signedDistance()

EIGEN_DEVICE_FUNC Scalar Eigen::Hyperplane::signedDistance ( const VectorType p) const
inline
Returns
the signed distance between the plane *this and a point p.
See also
absDistance()

Definition at line 143 of file Hyperplane.h.

◆ Through() [1/2]

static EIGEN_DEVICE_FUNC Hyperplane Eigen::Hyperplane::Through ( const VectorType p0,
const VectorType p1 
)
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.

Definition at line 88 of file Hyperplane.h.

◆ Through() [2/2]

static EIGEN_DEVICE_FUNC Hyperplane Eigen::Hyperplane::Through ( const VectorType p0,
const VectorType p1,
const VectorType p2 
)
inlinestatic

Constructs a hyperplane passing through the three points. The dimension of the ambient space is required to be exactly 3.

Definition at line 99 of file Hyperplane.h.

◆ transform() [1/2]

template<typename XprType >
EIGEN_DEVICE_FUNC Hyperplane& Eigen::Hyperplane::transform ( const MatrixBase< XprType > &  mat,
TransformTraits  traits = Affine 
)
inline

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

Parameters
matthe Dim x Dim transformation matrix
traitsspecifies whether the matrix mat represents an Isometry or a more generic Affine transformation. The default is Affine.

Definition at line 217 of file Hyperplane.h.

◆ transform() [2/2]

template<int TrOptions>
EIGEN_DEVICE_FUNC Hyperplane& Eigen::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
tthe transformation of dimension Dim
traitsspecifies whether the transformation t represents an Isometry or a more generic Affine transformation. The default is Affine. Other kind of transformations are not supported.

Definition at line 241 of file Hyperplane.h.

Member Data Documentation

◆ ConstNormalReturnType

const typedef Block<const Coefficients,AmbientDimAtCompileTime,1> Eigen::Hyperplane::ConstNormalReturnType

Definition at line 50 of file Hyperplane.h.

◆ m_coeffs

Coefficients Eigen::Hyperplane::m_coeffs
protected

Definition at line 277 of file Hyperplane.h.


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


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:10:52