![]() |
Eigen
3.2.7
|
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.
Public Types | |
enum | CornerType { Min, Max, BottomLeft, BottomRight, TopLeft, TopRight, BottomLeftFloor, BottomRightFloor, TopLeftFloor, TopRightFloor, BottomLeftCeil, BottomRightCeil, TopLeftCeil } |
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 > &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 > &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 > &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 | intersects (const AlignedBox &b) const |
bool | isApprox (const AlignedBox &other, const 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 > &p) const |
Scalar | squaredExteriorDistance (const AlignedBox &b) const |
template<typename Derived > | |
AlignedBox & | translate (const MatrixBase< Derived > &a_t) |
Scalar | volume () const |
enum CornerType |
Define constants to name the corners of a 1D, 2D or 3D axis aligned bounding box
|
inline |
Default constructor initializing a null box.
References 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.
|
inlineexplicit |
Copy constructor with scalar type conversion
References 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 |
|
inline |
Clamps *this
by the box b and returns a reference to *this
.
|
inline |
*this
.
|
inline |
*this
. References AlignedBox< _Scalar, _AmbientDim >::max(), and AlignedBox< _Scalar, _AmbientDim >::min().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::dim().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::sizes().
|
inline |
References Eigen::Dynamic.
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
.
|
inline |
Extends *this
such that it contains the box b and returns a reference to *this
.
|
inline |
*this
, and zero if p is inside the box. References AlignedBox< _Scalar, _AmbientDim >::squaredExteriorDistance().
|
inline |
*this
, and zero if the boxes intersect. References AlignedBox< _Scalar, _AmbientDim >::squaredExteriorDistance().
|
inline |
Returns an AlignedBox that is the intersection of b and *this
References AlignedBox< _Scalar, _AmbientDim >::AlignedBox().
|
inline |
*this
. References AlignedBox< _Scalar, _AmbientDim >::max(), and AlignedBox< _Scalar, _AmbientDim >::min().
|
inline |
true
if *this
is approximately equal to other, within the precision determined by prec.
|
inline |
Referenced by AlignedBox< _Scalar, _AmbientDim >::isNull().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::isEmpty().
|
inline |
Referenced by AlignedBox< _Scalar, _AmbientDim >::AlignedBox(), AlignedBox< _Scalar, _AmbientDim >::contains(), and AlignedBox< _Scalar, _AmbientDim >::intersects().
|
inline |
|
inline |
Returns an AlignedBox that is the union of b and *this
.
*this
. References AlignedBox< _Scalar, _AmbientDim >::AlignedBox().
|
inline |
Referenced by AlignedBox< _Scalar, _AmbientDim >::AlignedBox(), AlignedBox< _Scalar, _AmbientDim >::contains(), and AlignedBox< _Scalar, _AmbientDim >::intersects().
|
inline |
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::dim().
|
inline |
Makes *this
an empty box.
References PlainObjectBase< Derived >::setConstant().
Referenced by AlignedBox< _Scalar, _AmbientDim >::AlignedBox(), and AlignedBox< _Scalar, _AmbientDim >::setNull().
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::setEmpty().
|
inline |
Referenced by AlignedBox< _Scalar, _AmbientDim >::diagonal(), and AlignedBox< _Scalar, _AmbientDim >::volume().
|
inline |
*this
, and zero if p is inside the box. Referenced by AlignedBox< _Scalar, _AmbientDim >::exteriorDistance().
|
inline |
*this
, and zero if the boxes intersect.
|
inline |
Translate *this
by the vector t and returns a reference to *this
.
|
inline |
References AlignedBox< _Scalar, _AmbientDim >::sizes().