C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

An arbitrarily oriented bounding box (OBB) that includes some geometric object within box boundaries. More...

#include <mb_oriented_box.h>

Public Member Functions

 MbOrientedBox ()
 Construct an empty box.
 
MbOrientedBoxoperator= (const MbOrientedBox &)
 Assignment operator.
 
const MbCartPoint3DCentre () const
 Geometric center of the bounding box is in the middle of the main diagonal of PE.
 
const MbCartPoint3DVertex (size_t i) const
 One of the eight vertices by 0-based index. More...
 
MbVector3D SemiDiagonal () const
 Half of the longest diagonal of the parallelepiped in the proper coordinate system.
 
double SizeMax () const
 The size of the box is equal to the maximum of the dimensions along its axes.
 
bool IsEmpty () const
 The check for emptiness. More...
 
bool Intersect (const MbOrientedBox &) const
 Whether the box intersects another box or not. More...
 
void Include (const MbCartPoint3D &)
 Include a point in the box subset with orientation preserved.
 
MbOrientedBoxSetOXY (const MbCartPoint3D &centre, const MbVector3D &, const MbVector3D &)
 Set the position and orientation of PE. More...
 
MbOrientedBoxSetSize (double wx, double wy, double wz)
 Sets the semi-dimensions of the parallelepiped by the axies (X,Y,Z).
 
MbOrientedBoxSetEmpty ()
 Set the box empty.
 
MbOrientedBoxTransform (const MbMatrix3D &)
 Transform according to the matrix. More...
 
MbOrientedBoxMove (const MbVector3D &)
 Translate to the given vector.
 
const MbVector3D LowerBnd () const
 The lower bound of the interval radius-vector covering the box range (projections on the box axies but via the world origin).
 
const MbVector3D UpperBnd () const
 The upper bound of the interval radius-vector covering the box range (in the local CS).
 

Detailed Description

An arbitrarily oriented bounding box (OBB) that includes some geometric object within box boundaries.

A bounding box (parallelepiped, PE) specifies a domain of 3D-space that more or less tightly packs some geometric object.
It is used for quick estimation of the proximity or non-intersection of three-dimensional objects which are contained in the "box".

Member Function Documentation

◆ Vertex()

const MbCartPoint3D& MbOrientedBox::Vertex ( size_t  i) const
inline

One of the eight vertices by 0-based index.

Note
The rule of numbering vertices is given in "mb_oriented_box.h" below the function declaration.

◆ IsEmpty()

bool MbOrientedBox::IsEmpty ( ) const
inline

The check for emptiness.

A bounding box is empty if it doesn't contain any points of 3D-space.

◆ Intersect()

bool MbOrientedBox::Intersect ( const MbOrientedBox ) const

Whether the box intersects another box or not.

Returns
Returns true if it intersects.

◆ SetOXY()

MbOrientedBox& MbOrientedBox::SetOXY ( const MbCartPoint3D centre,
const MbVector3D ,
const MbVector3D  
)

Set the position and orientation of PE.

The func sets the position and orientation, namely coordinates of center and vector pair of (X,Y)-axies.

◆ Transform()

MbOrientedBox& MbOrientedBox::Transform ( const MbMatrix3D )

Transform according to the matrix.

Note
The correct result is only guaranteed for isometric transformations (rotations,translations and reflections) or uniform scalings.

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