An axis aligned box. More...
#include <AlignedBox.h>
Public Types | |
| enum | CornerType { Min , Max , BottomLeft , BottomRight , TopLeft , TopRight , BottomLeftFloor , BottomRightFloor , TopLeftFloor , TopRightFloor , BottomLeftCeil , BottomRightCeil , TopLeftCeil , TopRightCeil } |
Public Member Functions | |
| AlignedBox () | |
| template<typename OtherScalarType> | |
| AlignedBox (const AlignedBox< OtherScalarType, AmbientDimAtCompileTime > &other) | |
| template<typename Derived> | |
| AlignedBox (const MatrixBase< Derived > &a_p) | |
| template<typename OtherVectorType1, typename OtherVectorType2> | |
| AlignedBox (const OtherVectorType1 &_min, const OtherVectorType2 &_max) | |
| AlignedBox (Index _dim) | |
| 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) |
| bool | contains (const AlignedBox &b) const |
| template<typename Derived> | |
| bool | contains (const MatrixBase< Derived > &a_p) const |
| VectorType | corner (CornerType corner) const |
| CwiseBinaryOp< internal::scalar_difference_op< Scalar >, const VectorType, const VectorType > | diagonal () const |
| Index | dim () const |
| AlignedBox & | extend (const AlignedBox &b) |
| template<typename Derived> | |
| AlignedBox & | extend (const MatrixBase< Derived > &a_p) |
| NonInteger | exteriorDistance (const AlignedBox &b) const |
| template<typename Derived> | |
| NonInteger | exteriorDistance (const MatrixBase< Derived > &p) const |
| AlignedBox | intersection (const AlignedBox &b) const |
| bool | isApprox (const AlignedBox &other, RealScalar prec=ScalarTraits::dummy_precision()) const |
| bool | isEmpty () const |
| bool | isNull () const |
| VectorType & | max () |
| const VectorType & | max () const |
| AlignedBox | merged (const AlignedBox &b) const |
| VectorType & | min () |
| const VectorType & | min () const |
| VectorType | sample () const |
| void | setEmpty () |
| void | setNull () |
| const CwiseBinaryOp< internal::scalar_difference_op< Scalar >, const VectorType, const VectorType > | sizes () const |
| Scalar | squaredExteriorDistance (const AlignedBox &b) const |
| template<typename Derived> | |
| Scalar | squaredExteriorDistance (const MatrixBase< Derived > &a_p) const |
| template<typename Derived> | |
| AlignedBox & | translate (const MatrixBase< Derived > &a_t) |
| Scalar | volume () const |
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.
| enum CornerType |
|
inlineexplicit |
Default constructor initializing a null box.
Referenced by AlignedBox< int, 1 >::intersection(), AlignedBox< int, 1 >::merged(), and squaredExteriorDistance().
|
inlineexplicit |
Constructs a null box with _dim the dimension of the ambient space.
|
inline |
Constructs a box with extremities _min and _max.
|
inlineexplicit |
Constructs a box containing a single point p.
|
inlineexplicit |
Copy constructor with scalar type conversion
|
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.
Referenced by AlignedBox< int, 1 >::AlignedBox().
|
inline |
|
inline |
Clamps *this by the box b and returns a reference to *this.
|
inline |
*this.
|
inline |
*this.
|
inline |
|
inline |
|
inline |
Referenced by AlignedBox< int, 1 >::corner(), AlignedBox< int, 1 >::sample(), squaredExteriorDistance(), and squaredExteriorDistance().
|
inline |
Extends *this such that it contains the box b and returns a reference to *this.
|
inline |
Extends *this such that it contains the point p and returns a reference to *this.
|
inline |
*this, and zero if the boxes intersect.
|
inline |
*this, and zero if p is inside the box.
|
inline |
Returns an AlignedBox that is the intersection of b and *this
|
inline |
true if *this is approximately equal to other, within the precision determined by prec.
|
inline |
Referenced by AlignedBox< int, 1 >::isNull().
|
inline |
|
inline |
|
inline |
Referenced by AlignedBox< int, 1 >::AlignedBox(), and AlignedBox< int, 1 >::contains().
|
inline |
Returns an AlignedBox that is the union of b and *this
|
inline |
|
inline |
Referenced by AlignedBox< int, 1 >::AlignedBox(), and AlignedBox< int, 1 >::contains().
|
inline |
|
inline |
Makes *this an empty box.
Referenced by AlignedBox< int, 1 >::AlignedBox(), AlignedBox< int, 1 >::AlignedBox(), and AlignedBox< int, 1 >::setNull().
|
inline |
|
inline |
Referenced by AlignedBox< int, 1 >::diagonal(), and AlignedBox< int, 1 >::volume().
|
inline |
*this, and zero if the boxes intersect. References AlignedBox(), and dim().
|
inline |
*this, and zero if p is inside the box. References dim().
Referenced by AlignedBox< int, 1 >::exteriorDistance(), and AlignedBox< int, 1 >::exteriorDistance().
|
inline |
Translate *this by the vector t and returns a reference to *this.
|
inline |