![]() |
Eigen
3.3.3
|
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.
Public Types | |
enum | CornerType { Min, Max, BottomLeft, BottomRight, TopLeft, TopRight, BottomLeftFloor, BottomRightFloor, TopLeftFloor, TopRightFloor, BottomLeftCeil, BottomRightCeil, TopLeftCeil } |
typedef Eigen::Index | Index |
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 |
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, Scalar >, const VectorType, const VectorType > | diagonal () const |
Index | dim () const |
const | EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE (VectorTypeSum, RealScalar, quotient) center() 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, 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 |
typedef Eigen::Index Eigen::AlignedBox< _Scalar, _AmbientDim >::Index |
enum Eigen::AlignedBox::CornerType |
Define constants to name the corners of a 1D, 2D or 3D axis aligned bounding box
Eigen::AlignedBox< _Scalar, _AmbientDim >::AlignedBox | ( | ) | [inline] |
Default constructor initializing a null box.
Eigen::AlignedBox< _Scalar, _AmbientDim >::AlignedBox | ( | Index | _dim | ) | [inline, explicit] |
Constructs a null box with _dim the dimension of the ambient space.
Eigen::AlignedBox< _Scalar, _AmbientDim >::AlignedBox | ( | const OtherVectorType1 & | _min, |
const OtherVectorType2 & | _max | ||
) | [inline] |
Constructs a box with extremities _min and _max.
Eigen::AlignedBox< _Scalar, _AmbientDim >::AlignedBox | ( | const MatrixBase< Derived > & | p | ) | [inline, explicit] |
Constructs a box containing a single point p.
Eigen::AlignedBox< _Scalar, _AmbientDim >::AlignedBox | ( | const AlignedBox< OtherScalarType, AmbientDimAtCompileTime > & | other | ) | [inline, explicit] |
Copy constructor with scalar type conversion
internal::cast_return_type<AlignedBox, AlignedBox<NewScalarType,AmbientDimAtCompileTime> >::type Eigen::AlignedBox< _Scalar, _AmbientDim >::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
.
AlignedBox& Eigen::AlignedBox< _Scalar, _AmbientDim >::clamp | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | [inline] |
Clamps *this
by the box b and returns a reference to *this
.
bool Eigen::AlignedBox< _Scalar, _AmbientDim >::contains | ( | const MatrixBase< Derived > & | p | ) | const [inline] |
*this
. bool Eigen::AlignedBox< _Scalar, _AmbientDim >::contains | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | const [inline] |
*this
. VectorType Eigen::AlignedBox< _Scalar, _AmbientDim >::corner | ( | CornerType | corner | ) | const [inline] |
CwiseBinaryOp< internal::scalar_difference_op<Scalar,Scalar>, const VectorType, const VectorType> Eigen::AlignedBox< _Scalar, _AmbientDim >::diagonal | ( | ) | const [inline] |
Index Eigen::AlignedBox< _Scalar, _AmbientDim >::dim | ( | ) | const [inline] |
const Eigen::AlignedBox< _Scalar, _AmbientDim >::EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE | ( | VectorTypeSum | , |
RealScalar | , | ||
quotient | |||
) | const [inline] |
AlignedBox& Eigen::AlignedBox< _Scalar, _AmbientDim >::extend | ( | const MatrixBase< Derived > & | p | ) | [inline] |
Extends *this
such that it contains the point p and returns a reference to *this
.
AlignedBox& Eigen::AlignedBox< _Scalar, _AmbientDim >::extend | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | [inline] |
Extends *this
such that it contains the box b and returns a reference to *this
.
NonInteger Eigen::AlignedBox< _Scalar, _AmbientDim >::exteriorDistance | ( | const MatrixBase< Derived > & | p | ) | const [inline] |
*this
, and zero if p is inside the box. NonInteger Eigen::AlignedBox< _Scalar, _AmbientDim >::exteriorDistance | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | const [inline] |
*this
, and zero if the boxes intersect. AlignedBox Eigen::AlignedBox< _Scalar, _AmbientDim >::intersection | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | const [inline] |
Returns an AlignedBox that is the intersection of b and *this
bool Eigen::AlignedBox< _Scalar, _AmbientDim >::intersects | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | const [inline] |
*this
. bool Eigen::AlignedBox< _Scalar, _AmbientDim >::isApprox | ( | const AlignedBox< _Scalar, _AmbientDim > & | other, |
const RealScalar & | prec = ScalarTraits::dummy_precision() |
||
) | const [inline] |
true
if *this
is approximately equal to other, within the precision determined by prec.bool Eigen::AlignedBox< _Scalar, _AmbientDim >::isEmpty | ( | ) | const [inline] |
bool Eigen::AlignedBox< _Scalar, _AmbientDim >::isNull | ( | ) | const [inline] |
const VectorType&() Eigen::AlignedBox< _Scalar, _AmbientDim >::max | ( | ) | const [inline] |
VectorType&() Eigen::AlignedBox< _Scalar, _AmbientDim >::max | ( | ) | [inline] |
AlignedBox Eigen::AlignedBox< _Scalar, _AmbientDim >::merged | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | const [inline] |
Returns an AlignedBox that is the union of b and *this
.
*this
. const VectorType&() Eigen::AlignedBox< _Scalar, _AmbientDim >::min | ( | ) | const [inline] |
VectorType&() Eigen::AlignedBox< _Scalar, _AmbientDim >::min | ( | ) | [inline] |
VectorType Eigen::AlignedBox< _Scalar, _AmbientDim >::sample | ( | ) | const [inline] |
void Eigen::AlignedBox< _Scalar, _AmbientDim >::setEmpty | ( | ) | [inline] |
Makes *this
an empty box.
void Eigen::AlignedBox< _Scalar, _AmbientDim >::setNull | ( | ) | [inline] |
const CwiseBinaryOp< internal::scalar_difference_op<Scalar,Scalar>, const VectorType, const VectorType> Eigen::AlignedBox< _Scalar, _AmbientDim >::sizes | ( | ) | const [inline] |
Scalar Eigen::AlignedBox< Scalar, AmbientDim >::squaredExteriorDistance | ( | const MatrixBase< Derived > & | p | ) | const [inline] |
*this
, and zero if p is inside the box. Scalar Eigen::AlignedBox< Scalar, AmbientDim >::squaredExteriorDistance | ( | const AlignedBox< _Scalar, _AmbientDim > & | b | ) | const [inline] |
*this
, and zero if the boxes intersect. AlignedBox& Eigen::AlignedBox< _Scalar, _AmbientDim >::translate | ( | const MatrixBase< Derived > & | a_t | ) | [inline] |
Translate *this
by the vector t and returns a reference to *this
.
Scalar Eigen::AlignedBox< _Scalar, _AmbientDim >::volume | ( | ) | const [inline] |