AlignedBox< _Scalar, _AmbientDim > Class Template Reference
[Geometry_Module]

An axis aligned box. More...

#include <AlignedBox.h>

List of all members.

Public Types

enum  { AmbientDimAtCompileTime = _AmbientDim }
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)
 ~AlignedBox ()

Protected Attributes

VectorType m_max
VectorType m_min

Detailed Description

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

An axis aligned box.

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.

Definition at line 41 of file AlignedBox.h.


Member Typedef Documentation

template<typename _Scalar, int _AmbientDim>
typedef NumTraits<Scalar>::Real AlignedBox< _Scalar, _AmbientDim >::RealScalar

Definition at line 47 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
typedef _Scalar AlignedBox< _Scalar, _AmbientDim >::Scalar

Definition at line 46 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
typedef Matrix<Scalar,AmbientDimAtCompileTime,1> AlignedBox< _Scalar, _AmbientDim >::VectorType

Definition at line 48 of file AlignedBox.h.


Member Enumeration Documentation

template<typename _Scalar, int _AmbientDim>
anonymous enum
Enumerator:
AmbientDimAtCompileTime 

Definition at line 45 of file AlignedBox.h.


Constructor & Destructor Documentation

template<typename _Scalar, int _AmbientDim>
AlignedBox< _Scalar, _AmbientDim >::AlignedBox (  )  [inline, explicit]

Default constructor initializing a null box.

Definition at line 51 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
AlignedBox< _Scalar, _AmbientDim >::AlignedBox ( int  _dim  )  [inline, explicit]

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

Definition at line 55 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
AlignedBox< _Scalar, _AmbientDim >::AlignedBox ( const VectorType _min,
const VectorType _max 
) [inline]

Constructs a box with extremities _min and _max.

Definition at line 59 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
AlignedBox< _Scalar, _AmbientDim >::AlignedBox ( const VectorType p  )  [inline, explicit]

Constructs a box containing a single point p.

Definition at line 62 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
AlignedBox< _Scalar, _AmbientDim >::~AlignedBox (  )  [inline]

Definition at line 64 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
template<typename OtherScalarType >
AlignedBox< _Scalar, _AmbientDim >::AlignedBox ( const AlignedBox< OtherScalarType, AmbientDimAtCompileTime > &  other  )  [inline, explicit]

Copy constructor with scalar type conversion

Definition at line 140 of file AlignedBox.h.


Member Function Documentation

template<typename _Scalar, int _AmbientDim>
template<typename NewScalarType >
ei_cast_return_type<AlignedBox, AlignedBox<NewScalarType,AmbientDimAtCompileTime> >::type AlignedBox< _Scalar, _AmbientDim >::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.

Definition at line 132 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
AlignedBox& AlignedBox< _Scalar, _AmbientDim >::clamp ( const AlignedBox< _Scalar, _AmbientDim > &  b  )  [inline]

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

Definition at line 105 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
bool AlignedBox< _Scalar, _AmbientDim >::contains ( const AlignedBox< _Scalar, _AmbientDim > &  b  )  const [inline]
Returns:
true if the box b is entirely inside the box *this.

Definition at line 93 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
bool AlignedBox< _Scalar, _AmbientDim >::contains ( const VectorType p  )  const [inline]
Returns:
true if the point p is inside the box *this.

Definition at line 89 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
int AlignedBox< _Scalar, _AmbientDim >::dim (  )  const [inline]
Returns:
the dimension in which the box holds

Definition at line 67 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
AlignedBox& 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.

Definition at line 101 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
AlignedBox& AlignedBox< _Scalar, _AmbientDim >::extend ( const VectorType p  )  [inline]

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

Definition at line 97 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
Scalar AlignedBox< _Scalar, _AmbientDim >::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()

Definition at line 122 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
bool AlignedBox< _Scalar, _AmbientDim >::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()

Definition at line 150 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
bool AlignedBox< _Scalar, _AmbientDim >::isNull (  )  const [inline]
Returns:
true if the box is null, i.e, empty.

Definition at line 70 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
VectorType& AlignedBox< _Scalar, _AmbientDim >::max (  )  [inline]
Returns:
a non const reference to the maximal corner

Definition at line 86 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
const VectorType& AlignedBox< _Scalar, _AmbientDim >::max (  )  const [inline]
Returns:
the maximal corner

Definition at line 84 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
VectorType& AlignedBox< _Scalar, _AmbientDim >::min (  )  [inline]
Returns:
a non const reference to the minimal corner

Definition at line 82 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
const VectorType& AlignedBox< _Scalar, _AmbientDim >::min (  )  const [inline]
Returns:
the minimal corner

Definition at line 80 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
void AlignedBox< _Scalar, _AmbientDim >::setNull (  )  [inline]

Makes *this a null/empty box.

Definition at line 73 of file AlignedBox.h.

template<typename Scalar , int AmbiantDim>
Scalar AlignedBox< Scalar, AmbiantDim >::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()

Definition at line 159 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
AlignedBox& AlignedBox< _Scalar, _AmbientDim >::translate ( const VectorType t  )  [inline]

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

Definition at line 109 of file AlignedBox.h.


Member Data Documentation

template<typename _Scalar, int _AmbientDim>
VectorType AlignedBox< _Scalar, _AmbientDim >::m_max [protected]

Definition at line 155 of file AlignedBox.h.

template<typename _Scalar, int _AmbientDim>
VectorType AlignedBox< _Scalar, _AmbientDim >::m_min [protected]

Definition at line 155 of file AlignedBox.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:21:31 2013