An axis aligned box. More...
Public Types | |
enum | CornerType { Min , BottomLeft , BottomLeftFloor } |
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 |
An axis aligned box.
This is defined in the Geometry module.
#include <Eigen/Geometry>
_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 |
AlignedBox | ( | ) | [inline, explicit] |
Default constructor initializing a null box.
AlignedBox | ( | Index | _dim | ) | [inline, explicit] |
Constructs a null box with _dim the dimension of the ambient space.
AlignedBox | ( | const OtherVectorType1 & | _min, |
const OtherVectorType2 & | _max | ||
) | [inline] |
Constructs a box with extremities _min and _max.
AlignedBox | ( | const MatrixBase< Derived > & | a_p | ) | [inline, explicit] |
Constructs a box containing a single point p.
AlignedBox | ( | const AlignedBox< OtherScalarType, AmbientDimAtCompileTime > & | other | ) | [inline, explicit] |
Copy constructor with scalar type conversion
internal::cast_return_type<AlignedBox, AlignedBox<NewScalarType,AmbientDimAtCompileTime> >::type cast | ( | ) | const [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
.
const CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, const CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const VectorType, const VectorType> > center | ( | ) | const [inline] |
AlignedBox& clamp | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | [inline] |
Clamps *this
by the box b and returns a reference to *this
.
bool contains | ( | const MatrixBase< Derived > & | a_p | ) | const [inline] |
*this
. bool contains | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | const [inline] |
*this
. VectorType corner | ( | CornerType | corner | ) | const [inline] |
CwiseBinaryOp< internal::scalar_difference_op<Scalar>, const VectorType, const VectorType> diagonal | ( | ) | const [inline] |
Index dim | ( | ) | const [inline] |
AlignedBox& extend | ( | const MatrixBase< Derived > & | a_p | ) | [inline] |
Extends *this
such that it contains the point p and returns a reference to *this
.
AlignedBox& extend | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | [inline] |
Extends *this
such that it contains the box b and returns a reference to *this
.
NonInteger exteriorDistance | ( | const MatrixBase< Derived > & | p | ) | const [inline] |
*this
, and zero if p is inside the box. NonInteger exteriorDistance | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | const [inline] |
*this
, and zero if the boxes intersect. AlignedBox intersection | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | const [inline] |
Returns an AlignedBox that is the intersection of b and *this
bool isApprox | ( | const AlignedBox< _Scalar, _AmbientDim > & | other, |
RealScalar | prec = ScalarTraits::dummy_precision() |
||
) | const [inline] |
true
if *this
is approximately equal to other, within the precision determined by prec.bool isEmpty | ( | ) | const [inline] |
bool isNull | ( | ) | const [inline] |
const VectorType&() max | ( | ) | const [inline] |
VectorType&() max | ( | ) | [inline] |
AlignedBox merged | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | const [inline] |
Returns an AlignedBox that is the union of b and *this
const VectorType&() min | ( | ) | const [inline] |
VectorType&() min | ( | ) | [inline] |
VectorType sample | ( | ) | const [inline] |
void setEmpty | ( | ) | [inline] |
Makes *this
an empty box.
void setNull | ( | ) | [inline] |
const CwiseBinaryOp< internal::scalar_difference_op<Scalar>, const VectorType, const VectorType> sizes | ( | ) | const [inline] |
Scalar squaredExteriorDistance | ( | const MatrixBase< Derived > & | a_p | ) | const [inline] |
*this
, and zero if p is inside the box. Scalar squaredExteriorDistance | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | const [inline] |
*this
, and zero if the boxes intersect. AlignedBox& translate | ( | const MatrixBase< Derived > & | a_t | ) | [inline] |
Translate *this
by the vector t and returns a reference to *this
.
Scalar volume | ( | ) | const [inline] |