An axis aligned box. More...
Public Types | |
enum | { AmbientDimAtCompileTime } |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef _Scalar | Scalar |
typedef Matrix< Scalar, AmbientDimAtCompileTime, 1 > | VectorType |
Public Member Functions | |
AlignedBox () | |
AlignedBox (int _dim) | |
AlignedBox (const VectorType &_min, const VectorType &_max) | |
AlignedBox (const VectorType &p) | |
template<typename OtherScalarType > | |
AlignedBox (const AlignedBox< OtherScalarType, AmbientDimAtCompileTime > &other) | |
template<typename NewScalarType > | |
ei_cast_return_type < AlignedBox, AlignedBox < NewScalarType, AmbientDimAtCompileTime > >::type | cast () const |
AlignedBox & | clamp (const AlignedBox &b) |
bool | contains (const VectorType &p) const |
bool | contains (const AlignedBox &b) const |
int | dim () const |
AlignedBox & | extend (const VectorType &p) |
AlignedBox & | extend (const AlignedBox &b) |
Scalar | exteriorDistance (const VectorType &p) const |
bool | isApprox (const AlignedBox &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const |
bool | isNull () const |
const VectorType & | max () const |
VectorType & | max () |
const VectorType & | min () const |
VectorType & | min () |
void | setNull () |
Scalar | squaredExteriorDistance (const VectorType &p) const |
AlignedBox & | translate (const VectorType &t) |
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.
|
inlineexplicit |
Default constructor initializing a null box.
|
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
.
|
inline |
Clamps *this
by the box b and returns a reference to *this
.
|
inline |
*this
.
|
inline |
*this
.
|
inline |
|
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.
|
inline |
true
if *this
is approximately equal to other, within the precision determined by prec.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Makes *this
a null/empty box.
|
inline |
*this
, and zero if p is inside the box.
|
inline |
Translate *this
by the vector t and returns a reference to *this
.