An axis aligned box. More...
#include <AlignedBox.h>
Public Types | |
| enum | { AmbientDimAtCompileTime } |
| enum | CornerType { Min, Max, BottomLeft, BottomRight, TopLeft, TopRight, BottomLeftFloor, BottomRightFloor, TopLeftFloor, TopRightFloor, BottomLeftCeil, BottomRightCeil, TopLeftCeil, TopRightCeil } |
| typedef DenseIndex | Index |
| typedef ScalarTraits::NonInteger | NonInteger |
| typedef ScalarTraits::Real | RealScalar |
| typedef _Scalar | Scalar |
| typedef NumTraits< Scalar > | ScalarTraits |
| typedef Matrix< Scalar, AmbientDimAtCompileTime, 1 > | VectorType |
Public Member Functions | |
| AlignedBox () | |
| AlignedBox (Index _dim) | |
| template<typename OtherVectorType1 , typename OtherVectorType2 > | |
| AlignedBox (const OtherVectorType1 &_min, const OtherVectorType2 &_max) | |
| template<typename Derived > | |
| AlignedBox (const MatrixBase< Derived > &a_p) | |
| template<typename OtherScalarType > | |
| AlignedBox (const AlignedBox< OtherScalarType, AmbientDimAtCompileTime > &other) | |
| template<typename NewScalarType > | |
| internal::cast_return_type < AlignedBox, AlignedBox < NewScalarType, AmbientDimAtCompileTime > >::type | cast () const |
| const CwiseUnaryOp < internal::scalar_quotient1_op < Scalar >, const CwiseBinaryOp < internal::scalar_sum_op < Scalar >, const VectorType, const VectorType > > | center () const |
| AlignedBox & | clamp (const AlignedBox &b) |
| template<typename Derived > | |
| bool | contains (const MatrixBase< Derived > &a_p) const |
| bool | contains (const AlignedBox &b) const |
| VectorType | corner (CornerType corner) const |
| CwiseBinaryOp < internal::scalar_difference_op < Scalar >, const VectorType, const VectorType > | diagonal () const |
| Index | dim () const |
| template<typename Derived > | |
| AlignedBox & | extend (const MatrixBase< Derived > &a_p) |
| AlignedBox & | extend (const AlignedBox &b) |
| template<typename Derived > | |
| NonInteger | exteriorDistance (const MatrixBase< Derived > &p) const |
| NonInteger | exteriorDistance (const AlignedBox &b) const |
| AlignedBox | intersection (const AlignedBox &b) const |
| bool | isApprox (const AlignedBox &other, RealScalar prec=ScalarTraits::dummy_precision()) const |
| bool | isEmpty () const |
| bool | isNull () const |
| const VectorType &() | max () const |
| VectorType &() | max () |
| AlignedBox | merged (const AlignedBox &b) const |
| const VectorType &() | min () const |
| VectorType &() | min () |
| VectorType | sample () const |
| void | setEmpty () |
| void | setNull () |
| const CwiseBinaryOp < internal::scalar_difference_op < Scalar >, const VectorType, const VectorType > | sizes () const |
| template<typename Derived > | |
| Scalar | squaredExteriorDistance (const MatrixBase< Derived > &a_p) const |
| Scalar | squaredExteriorDistance (const AlignedBox &b) const |
| template<typename Derived > | |
| AlignedBox & | translate (const MatrixBase< Derived > &a_t) |
| Scalar | volume () const |
| ~AlignedBox () | |
Protected Attributes | |
| VectorType | m_max |
| VectorType | m_min |
An axis aligned box.
This is defined in the Geometry module.
| _Scalar | the type of the scalar coefficients |
| _AmbientDim | the dimension of the ambient space, can be a compile time value or Dynamic. |
This class represents an axis aligned box as a pair of the minimal and maximal corners.
| typedef DenseIndex Index |
| typedef ScalarTraits::NonInteger NonInteger |
| typedef ScalarTraits::Real RealScalar |
| typedef _Scalar Scalar |
| typedef NumTraits<Scalar> ScalarTraits |
| typedef Matrix<Scalar,AmbientDimAtCompileTime,1> VectorType |
| enum CornerType |
Define constants to name the corners of a 1D, 2D or 3D axis aligned bounding box
|
inlineexplicit |
Default constructor initializing a null box.
References AlignedBox< _Scalar, _AmbientDim >::AmbientDimAtCompileTime, Eigen::Dynamic, and AlignedBox< _Scalar, _AmbientDim >::setEmpty().
Referenced by AlignedBox< _Scalar, _AmbientDim >::cast(), AlignedBox< _Scalar, _AmbientDim >::intersection(), and AlignedBox< _Scalar, _AmbientDim >::merged().
|
inlineexplicit |
Constructs a null box with _dim the dimension of the ambient space.
References AlignedBox< _Scalar, _AmbientDim >::setEmpty().
|
inline |
Constructs a box with extremities _min and _max.
|
inlineexplicit |
Constructs a box containing a single point p.
References AlignedBox< _Scalar, _AmbientDim >::m_max, AlignedBox< _Scalar, _AmbientDim >::m_min, and p.
|
inline |
|
inlineexplicit |
Copy constructor with scalar type conversion
References AlignedBox< _Scalar, _AmbientDim >::m_max, AlignedBox< _Scalar, _AmbientDim >::m_min, AlignedBox< _Scalar, _AmbientDim >::max(), and AlignedBox< _Scalar, _AmbientDim >::min().
|
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 AlignedBox< _Scalar, _AmbientDim >::AlignedBox().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::m_max, and AlignedBox< _Scalar, _AmbientDim >::m_min.
|
inline |
Clamps *this by the box b and returns a reference to *this.
References AlignedBox< _Scalar, _AmbientDim >::m_max, and AlignedBox< _Scalar, _AmbientDim >::m_min.
|
inline |
*this. References AlignedBox< _Scalar, _AmbientDim >::m_max, AlignedBox< _Scalar, _AmbientDim >::m_min, and p.
|
inline |
*this. References AlignedBox< _Scalar, _AmbientDim >::m_max, AlignedBox< _Scalar, _AmbientDim >::m_min, AlignedBox< _Scalar, _AmbientDim >::max(), and AlignedBox< _Scalar, _AmbientDim >::min().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::dim(), EIGEN_STATIC_ASSERT, AlignedBox< _Scalar, _AmbientDim >::m_max, and AlignedBox< _Scalar, _AmbientDim >::m_min.
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::sizes().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::AmbientDimAtCompileTime, Eigen::Dynamic, and AlignedBox< _Scalar, _AmbientDim >::m_min.
Referenced by AlignedBox< _Scalar, _AmbientDim >::corner(), and AlignedBox< _Scalar, _AmbientDim >::sample().
|
inline |
Extends *this such that it contains the point p and returns a reference to *this.
References AlignedBox< _Scalar, _AmbientDim >::m_max, AlignedBox< _Scalar, _AmbientDim >::m_min, and p.
|
inline |
Extends *this such that it contains the box b and returns a reference to *this.
References AlignedBox< _Scalar, _AmbientDim >::m_max, and AlignedBox< _Scalar, _AmbientDim >::m_min.
|
inline |
*this, and zero if p is inside the box. References sqrt(), and AlignedBox< _Scalar, _AmbientDim >::squaredExteriorDistance().
|
inline |
*this, and zero if the boxes intersect. References sqrt(), and AlignedBox< _Scalar, _AmbientDim >::squaredExteriorDistance().
|
inline |
Returns an AlignedBox that is the intersection of b and *this
References AlignedBox< _Scalar, _AmbientDim >::AlignedBox(), AlignedBox< _Scalar, _AmbientDim >::m_max, and AlignedBox< _Scalar, _AmbientDim >::m_min.
|
inline |
true if *this is approximately equal to other, within the precision determined by prec.References AlignedBox< _Scalar, _AmbientDim >::m_max, and AlignedBox< _Scalar, _AmbientDim >::m_min.
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::m_max, and AlignedBox< _Scalar, _AmbientDim >::m_min.
Referenced by AlignedBox< _Scalar, _AmbientDim >::isNull().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::isEmpty().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::m_max.
Referenced by AlignedBox< _Scalar, _AmbientDim >::AlignedBox(), and AlignedBox< _Scalar, _AmbientDim >::contains().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::m_max.
|
inline |
Returns an AlignedBox that is the union of b and *this
References AlignedBox< _Scalar, _AmbientDim >::AlignedBox(), AlignedBox< _Scalar, _AmbientDim >::m_max, and AlignedBox< _Scalar, _AmbientDim >::m_min.
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::m_min.
Referenced by AlignedBox< _Scalar, _AmbientDim >::AlignedBox(), and AlignedBox< _Scalar, _AmbientDim >::contains().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::m_min.
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::dim(), GenericNumTraits< Scalar >::IsInteger, AlignedBox< _Scalar, _AmbientDim >::m_max, and AlignedBox< _Scalar, _AmbientDim >::m_min.
|
inline |
Makes *this an empty box.
References AlignedBox< _Scalar, _AmbientDim >::m_max, AlignedBox< _Scalar, _AmbientDim >::m_min, and PlainObjectBase< Derived >::setConstant().
Referenced by AlignedBox< _Scalar, _AmbientDim >::AlignedBox(), and AlignedBox< _Scalar, _AmbientDim >::setNull().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::setEmpty().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::m_max, and AlignedBox< _Scalar, _AmbientDim >::m_min.
Referenced by AlignedBox< _Scalar, _AmbientDim >::diagonal(), and AlignedBox< _Scalar, _AmbientDim >::volume().
|
inline |
*this, and zero if p is inside the box. References p.
Referenced by AlignedBox< _Scalar, _AmbientDim >::exteriorDistance().
|
inline |
*this, and zero if the boxes intersect. References AlignedBox< _Scalar, _AmbientDim >::m_max, and AlignedBox< _Scalar, _AmbientDim >::m_min.
|
inline |
Translate *this by the vector t and returns a reference to *this.
References AlignedBox< _Scalar, _AmbientDim >::m_max, and AlignedBox< _Scalar, _AmbientDim >::m_min.
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::sizes().
|
protected |
Referenced by AlignedBox< _Scalar, _AmbientDim >::AlignedBox(), AlignedBox< _Scalar, _AmbientDim >::center(), AlignedBox< _Scalar, _AmbientDim >::clamp(), AlignedBox< _Scalar, _AmbientDim >::contains(), AlignedBox< _Scalar, _AmbientDim >::corner(), AlignedBox< _Scalar, _AmbientDim >::extend(), AlignedBox< _Scalar, _AmbientDim >::intersection(), AlignedBox< _Scalar, _AmbientDim >::isApprox(), AlignedBox< _Scalar, _AmbientDim >::isEmpty(), AlignedBox< _Scalar, _AmbientDim >::max(), AlignedBox< _Scalar, _AmbientDim >::merged(), AlignedBox< _Scalar, _AmbientDim >::sample(), AlignedBox< _Scalar, _AmbientDim >::setEmpty(), AlignedBox< _Scalar, _AmbientDim >::sizes(), AlignedBox< _Scalar, _AmbientDim >::squaredExteriorDistance(), and AlignedBox< _Scalar, _AmbientDim >::translate().
|
protected |
Referenced by AlignedBox< _Scalar, _AmbientDim >::AlignedBox(), AlignedBox< _Scalar, _AmbientDim >::center(), AlignedBox< _Scalar, _AmbientDim >::clamp(), AlignedBox< _Scalar, _AmbientDim >::contains(), AlignedBox< _Scalar, _AmbientDim >::corner(), AlignedBox< _Scalar, _AmbientDim >::dim(), AlignedBox< _Scalar, _AmbientDim >::extend(), AlignedBox< _Scalar, _AmbientDim >::intersection(), AlignedBox< _Scalar, _AmbientDim >::isApprox(), AlignedBox< _Scalar, _AmbientDim >::isEmpty(), AlignedBox< _Scalar, _AmbientDim >::merged(), AlignedBox< _Scalar, _AmbientDim >::min(), AlignedBox< _Scalar, _AmbientDim >::sample(), AlignedBox< _Scalar, _AmbientDim >::setEmpty(), AlignedBox< _Scalar, _AmbientDim >::sizes(), AlignedBox< _Scalar, _AmbientDim >::squaredExteriorDistance(), and AlignedBox< _Scalar, _AmbientDim >::translate().
1.8.1.1