The class describes the Oriented Bounding Box (OBB), much tighter enclosing volume for the shape than the Axis Aligned Bounding Box (AABB). The OBB is defined by a center of the box, the axes and the halves of its three dimensions. The OBB can be used more effectively than AABB as a rejection mechanism for non-interfering objects.
More...
|
| Bnd_OBB () |
| Empty constructor. More...
|
|
| Bnd_OBB (const gp_Pnt &theCenter, const gp_Dir &theXDirection, const gp_Dir &theYDirection, const gp_Dir &theZDirection, const Standard_Real theHXSize, const Standard_Real theHYSize, const Standard_Real theHZSize) |
| Constructor taking all defining parameters. More...
|
|
| Bnd_OBB (const Bnd_Box &theBox) |
| Constructor to create OBB from AABB. More...
|
|
void | ReBuild (const TColgp_Array1OfPnt &theListOfPoints, const TColStd_Array1OfReal *theListOfTolerances=0, const Standard_Boolean theIsOptimal=Standard_False) |
| Creates new OBB covering every point in theListOfPoints. Tolerance of every such point is set by *theListOfTolerances array. If this array is not void (not null-pointer) then the resulted Bnd_OBB will be enlarged using tolerances of points lying on the box surface. <theIsOptimal> flag defines the mode in which the OBB will be built. Constructing Optimal box takes more time, but the resulting box is usually more tight. In case of construction of Optimal OBB more possible axes are checked. More...
|
|
void | SetCenter (const gp_Pnt &theCenter) |
| Sets the center of OBB. More...
|
|
void | SetXComponent (const gp_Dir &theXDirection, const Standard_Real theHXSize) |
| Sets the X component of OBB - direction and size. More...
|
|
void | SetYComponent (const gp_Dir &theYDirection, const Standard_Real theHYSize) |
| Sets the Y component of OBB - direction and size. More...
|
|
void | SetZComponent (const gp_Dir &theZDirection, const Standard_Real theHZSize) |
| Sets the Z component of OBB - direction and size. More...
|
|
gp_Ax3 | Position () const |
| Returns the local coordinates system of this oriented box. So that applying it to axis-aligned box ((-XHSize, -YHSize, -ZHSize), (XHSize, YHSize, ZHSize)) will produce this oriented box. More...
|
|
const gp_XYZ & | Center () const |
| Returns the center of OBB. More...
|
|
const gp_XYZ & | XDirection () const |
| Returns the X Direction of OBB. More...
|
|
const gp_XYZ & | YDirection () const |
| Returns the Y Direction of OBB. More...
|
|
const gp_XYZ & | ZDirection () const |
| Returns the Z Direction of OBB. More...
|
|
Standard_Real | XHSize () const |
| Returns the X Dimension of OBB. More...
|
|
Standard_Real | YHSize () const |
| Returns the Y Dimension of OBB. More...
|
|
Standard_Real | ZHSize () const |
| Returns the Z Dimension of OBB. More...
|
|
Standard_Boolean | IsVoid () const |
| Checks if the box is empty. More...
|
|
void | SetVoid () |
| Clears this box. More...
|
|
void | SetAABox (const Standard_Boolean &theFlag) |
| Sets the flag for axes aligned box. More...
|
|
Standard_Boolean | IsAABox () const |
| Returns TRUE if the box is axes aligned. More...
|
|
void | Enlarge (const Standard_Real theGapAdd) |
| Enlarges the box with the given value. More...
|
|
Standard_Boolean | GetVertex (gp_Pnt theP[8]) const |
| Returns the array of vertices in <this>. The local coordinate of the vertex depending on the index of the array are follow: Index == 0: (-XHSize(), -YHSize(), -ZHSize()) Index == 1: ( XHSize(), -YHSize(), -ZHSize()) Index == 2: (-XHSize(), YHSize(), -ZHSize()) Index == 3: ( XHSize(), YHSize(), -ZHSize()) Index == 4: (-XHSize(), -YHSize(), ZHSize()) Index == 5: ( XHSize(), -YHSize(), ZHSize()) Index == 6: (-XHSize(), YHSize(), ZHSize()) Index == 7: ( XHSize(), YHSize(), ZHSize()). More...
|
|
Standard_Real | SquareExtent () const |
| Returns square diagonal of this box. More...
|
|
Standard_Boolean | IsOut (const Bnd_OBB &theOther) const |
| Check if the box do not interfere the other box. More...
|
|
Standard_Boolean | IsOut (const gp_Pnt &theP) const |
| Check if the point is inside of <this>. More...
|
|
Standard_Boolean | IsCompletelyInside (const Bnd_OBB &theOther) const |
| Check if the theOther is completely inside *this. More...
|
|
void | Add (const Bnd_OBB &theOther) |
| Rebuilds this in order to include all previous objects (which it was created from) and theOther. More...
|
|
void | Add (const gp_Pnt &theP) |
| Rebuilds this in order to include all previous objects (which it was created from) and theP. More...
|
|
void | DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const |
| Dumps the content of me into the stream. More...
|
|
The class describes the Oriented Bounding Box (OBB), much tighter enclosing volume for the shape than the Axis Aligned Bounding Box (AABB). The OBB is defined by a center of the box, the axes and the halves of its three dimensions. The OBB can be used more effectively than AABB as a rejection mechanism for non-interfering objects.