cisst-saw
Loading...
Searching...
No Matches
vctBoundingBox3Base< _elementType > Class Template Reference

#include <vctBoundingBox3.h>

Public Types

typedef _elementType value_type
typedef vctBoundingBox3Base< value_typeThisType
typedef vctFixedSizeVector< value_type, 3 > PointType

Public Member Functions

 vctBoundingBox3Base (void)
 vctBoundingBox3Base (const PointType &pointA, const PointType &pointB)
 vctBoundingBox3Base (const ThisType &other)
ThisTypeoperator= (const ThisType &other)
ThisTypeoperator= (const PointType &point)
void Reset (void)
void Reset (const PointType &point)
void Reset (const PointType &pointA, const PointType &pointB)
const PointTypeMinCorner (void) const
const PointTypeMaxCorner (void) const
size_t Counter (void) const
PointType Diagonal (void) const
double DiagonalLength (void) const
PointType MidPoint (void) const
ThisTypeInclude (const PointType &point)
ThisTypeInclude (const ThisType &other)
bool Expand (const value_type x, const value_type y, const value_type z)
bool Expand (const PointType &point)
bool Intersect (const ThisType &other) const
void EnlargeBy (const double dist)
int Includes (const PointType &point, const double dist=0.0) const
int Includes (const ThisType &other, const double dist=0.0) const

Protected Attributes

PointType mMinCorner
PointType mMaxCorner
size_t mCounter

Member Typedef Documentation

◆ PointType

template<typename _elementType>
typedef vctFixedSizeVector<value_type, 3> vctBoundingBox3Base< _elementType >::PointType

◆ ThisType

template<typename _elementType>
typedef vctBoundingBox3Base<value_type> vctBoundingBox3Base< _elementType >::ThisType

◆ value_type

template<typename _elementType>
typedef _elementType vctBoundingBox3Base< _elementType >::value_type

Constructor & Destructor Documentation

◆ vctBoundingBox3Base() [1/3]

template<typename _elementType>
vctBoundingBox3Base< _elementType >::vctBoundingBox3Base ( void )
inline

Default constructor. Initializes the corners to infinite values and set the counter to 0.

◆ vctBoundingBox3Base() [2/3]

template<typename _elementType>
vctBoundingBox3Base< _elementType >::vctBoundingBox3Base ( const PointType & pointA,
const PointType & pointB )
inline

Creates a bounding box from two points. These points can be the min and max corner.

◆ vctBoundingBox3Base() [3/3]

template<typename _elementType>
vctBoundingBox3Base< _elementType >::vctBoundingBox3Base ( const ThisType & other)
inline

Copy constructor

Member Function Documentation

◆ Counter()

template<typename _elementType>
size_t vctBoundingBox3Base< _elementType >::Counter ( void ) const
inline

Get the counter value, i.e. number of points used to define the bounding box. The counter is set to zero when the bounding box is undefined (i.e. empty). If the counter is set to 1, the min and max corners are equal. If the counter is greater than one, min and max corners are defined and potentially equal.

◆ Diagonal()

template<typename _elementType>
PointType vctBoundingBox3Base< _elementType >::Diagonal ( void ) const
inline

Get the vector max - min, elements of the diagonal are always positive

◆ DiagonalLength()

template<typename _elementType>
double vctBoundingBox3Base< _elementType >::DiagonalLength ( void ) const
inline

◆ EnlargeBy()

template<typename _elementType>
void vctBoundingBox3Base< _elementType >::EnlargeBy ( const double dist)
inline

Enlarge the bounding box by a constant value in all directions.

◆ Expand() [1/2]

template<typename _elementType>
bool vctBoundingBox3Base< _elementType >::Expand ( const PointType & point)
inline

◆ Expand() [2/2]

template<typename _elementType>
bool vctBoundingBox3Base< _elementType >::Expand ( const value_type x,
const value_type y,
const value_type z )
inline

Expand the bounding box using a single point. Return true iff the bounding box corners have been updated.

◆ Include() [1/2]

template<typename _elementType>
ThisType & vctBoundingBox3Base< _elementType >::Include ( const PointType & point)
inline

Deprecated, use Expand instead

◆ Include() [2/2]

template<typename _elementType>
ThisType & vctBoundingBox3Base< _elementType >::Include ( const ThisType & other)
inline

◆ Includes() [1/2]

template<typename _elementType>
int vctBoundingBox3Base< _elementType >::Includes ( const PointType & point,
const double dist = 0.0 ) const
inline

Check if a point is included in this bounding box, +/- a certain distance.

◆ Includes() [2/2]

template<typename _elementType>
int vctBoundingBox3Base< _elementType >::Includes ( const ThisType & other,
const double dist = 0.0 ) const
inline

Check if a bounding box is fully included in this bounding box, +/- a certain distance.

◆ Intersect()

template<typename _elementType>
bool vctBoundingBox3Base< _elementType >::Intersect ( const ThisType & other) const
inline

Check if a bounding box intersects (overlaps) with this bounding box.

◆ MaxCorner()

template<typename _elementType>
const PointType & vctBoundingBox3Base< _elementType >::MaxCorner ( void ) const
inline

Get the maximum corner. This accessor is "const", one can not change the max corner values directly.

◆ MidPoint()

template<typename _elementType>
PointType vctBoundingBox3Base< _elementType >::MidPoint ( void ) const
inline

Get the center (aka mid-point) of the bounding box.

◆ MinCorner()

template<typename _elementType>
const PointType & vctBoundingBox3Base< _elementType >::MinCorner ( void ) const
inline

Get the minimum corner. This accessor is "const", one can not change the min corner values directly.

◆ operator=() [1/2]

template<typename _elementType>
ThisType & vctBoundingBox3Base< _elementType >::operator= ( const PointType & point)
inline

Resets the bounding box with a single point. Use the method Include or Expand to expand. See also Reset(const PointType &).

◆ operator=() [2/2]

template<typename _elementType>
ThisType & vctBoundingBox3Base< _elementType >::operator= ( const ThisType & other)
inline

◆ Reset() [1/3]

template<typename _elementType>
void vctBoundingBox3Base< _elementType >::Reset ( const PointType & point)
inline

Reset with a starting point. This allows to skip a Reset() call without parameters which would lead to an extra assign HUGE_VAL to the min and max corners.

◆ Reset() [2/3]

template<typename _elementType>
void vctBoundingBox3Base< _elementType >::Reset ( const PointType & pointA,
const PointType & pointB )
inline

Reset a bounding box using two points.

◆ Reset() [3/3]

template<typename _elementType>
void vctBoundingBox3Base< _elementType >::Reset ( void )
inline

Reset the bounding box. See default constructor.

Member Data Documentation

◆ mCounter

template<typename _elementType>
size_t vctBoundingBox3Base< _elementType >::mCounter
protected

◆ mMaxCorner

template<typename _elementType>
PointType vctBoundingBox3Base< _elementType >::mMaxCorner
protected

◆ mMinCorner

template<typename _elementType>
PointType vctBoundingBox3Base< _elementType >::mMinCorner
protected

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