AlignedBox< _Scalar, _AmbientDim > Class Template Reference
[Geometry module]

An axis aligned box. More...

List of all members.

Public Types

enum  { AmbientDimAtCompileTime }
typedef NumTraits< Scalar >::Real RealScalar
typedef _Scalar Scalar
typedef Matrix< Scalar,
AmbientDimAtCompileTime, 1 > 
VectorType

Public Member Functions

template<typename OtherScalarType >
 AlignedBox (const AlignedBox< OtherScalarType, AmbientDimAtCompileTime > &other)
 AlignedBox (const VectorType &p)
 AlignedBox (const VectorType &_min, const VectorType &_max)
 AlignedBox (int _dim)
 AlignedBox ()
template<typename NewScalarType >
ei_cast_return_type
< AlignedBox, AlignedBox
< NewScalarType,
AmbientDimAtCompileTime >
>::type 
cast () const
AlignedBoxclamp (const AlignedBox &b)
bool contains (const AlignedBox &b) const
bool contains (const VectorType &p) const
int dim () const
AlignedBoxextend (const AlignedBox &b)
AlignedBoxextend (const VectorType &p)
Scalar exteriorDistance (const VectorType &p) const
bool isApprox (const AlignedBox &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const
bool isNull () const
VectorTypemax ()
const VectorTypemax () const
VectorTypemin ()
const VectorTypemin () const
void setNull ()
Scalar squaredExteriorDistance (const VectorType &p) const
AlignedBoxtranslate (const VectorType &t)

Protected Attributes

VectorType m_max
VectorType m_min

Detailed Description

template<typename _Scalar, int _AmbientDim>
class Eigen::AlignedBox< _Scalar, _AmbientDim >

An axis aligned box.

This is defined in the Geometry module.

 #include <Eigen/Geometry> 
Warning:
This is not considered to be part of the stable public API yet. Changes may happen in future releases. See Experimental parts of Eigen
Parameters:
_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.


Constructor & Destructor Documentation

AlignedBox (  )  [inline, explicit]

Default constructor initializing a null box.

AlignedBox ( int  _dim  )  [inline, explicit]

Constructs a null box with _dim the dimension of the ambient space.

AlignedBox ( const VectorType _min,
const VectorType _max 
) [inline]

Constructs a box with extremities _min and _max.

AlignedBox ( const VectorType 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


Member Function Documentation

ei_cast_return_type<AlignedBox, AlignedBox<NewScalarType,AmbientDimAtCompileTime> >::type cast (  )  const [inline]
Returns:
*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& clamp ( const AlignedBox< _Scalar, _AmbientDim > &  b  )  [inline]

Clamps *this by the box b and returns a reference to *this.

bool contains ( const AlignedBox< _Scalar, _AmbientDim > &  b  )  const [inline]
Returns:
true if the box b is entirely inside the box *this.
bool contains ( const VectorType p  )  const [inline]
Returns:
true if the point p is inside the box *this.
int dim (  )  const [inline]
Returns:
the dimension in which the box holds
AlignedBox& extend ( const AlignedBox< _Scalar, _AmbientDim > &  b  )  [inline]

Extends *this such that it contains the box b and returns a reference to *this.

AlignedBox& extend ( const VectorType p  )  [inline]

Extends *this such that it contains the point p and returns a reference to *this.

Scalar exteriorDistance ( const VectorType p  )  const [inline]
Returns:
the distance between the point p and the box *this, and zero if p is inside the box.
See also:
squaredExteriorDistance()
bool isApprox ( const AlignedBox< _Scalar, _AmbientDim > &  other,
typename NumTraits< Scalar >::Real  prec = precision<Scalar>() 
) const [inline]
Returns:
true if *this is approximately equal to other, within the precision determined by prec.
See also:
MatrixBase::isApprox()
bool isNull (  )  const [inline]
Returns:
true if the box is null, i.e, empty.
VectorType& max (  )  [inline]
Returns:
a non const reference to the maximal corner
const VectorType& max (  )  const [inline]
Returns:
the maximal corner
VectorType& min (  )  [inline]
Returns:
a non const reference to the minimal corner
const VectorType& min (  )  const [inline]
Returns:
the minimal corner
void setNull (  )  [inline]

Makes *this a null/empty box.

Scalar squaredExteriorDistance ( const VectorType p  )  const [inline]
Returns:
the squared distance between the point p and the box *this, and zero if p is inside the box.
See also:
exteriorDistance()
AlignedBox& translate ( const VectorType t  )  [inline]

Translate *this by the vector t and returns a reference to *this.


The documentation for this class was generated from the following file:

Generated on Mon Aug 31 17:48:40 2009 for Eigen by  doxygen 1.6.1