Open CASCADE Technology 7.8.0
|
Defines axis aligned bounding box (AABB) based on BVH vectors. More...
#include <BVH_Box.hxx>
Public Types | |
typedef BVH::VectorType< T, N >::Type | BVH_VecNt |
Public Member Functions | |
BVH_Box () | |
Creates uninitialized bounding box. | |
BVH_Box (const BVH_VecNt &thePoint) | |
Creates bounding box of given point. | |
BVH_Box (const BVH_VecNt &theMinPoint, const BVH_VecNt &theMaxPoint) | |
Creates bounding box from corner points. | |
void | Clear () |
Clears bounding box. | |
Standard_Boolean | IsValid () const |
Is bounding box valid? | |
void | Add (const BVH_VecNt &thePoint) |
Appends new point to the bounding box. | |
void | Combine (const BVH_Box &theBox) |
Combines bounding box with another one. | |
const BVH_VecNt & | CornerMin () const |
Returns minimum point of bounding box. | |
const BVH_VecNt & | CornerMax () const |
Returns maximum point of bounding box. | |
BVH_VecNt & | CornerMin () |
Returns minimum point of bounding box. | |
BVH_VecNt & | CornerMax () |
Returns maximum point of bounding box. | |
T | Area () const |
Returns surface area of bounding box. If the box is degenerated into line, returns the perimeter instead. | |
BVH_VecNt | Size () const |
Returns diagonal of bounding box. | |
BVH_VecNt | Center () const |
Returns center of bounding box. | |
T | Center (const Standard_Integer theAxis) const |
Returns center of bounding box along the given axis. | |
void | DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const |
Dumps the content of me into the stream. | |
Standard_Boolean | InitFromJson (const Standard_SStream &theSStream, Standard_Integer &theStreamPos) |
Inits the content of me from the stream. | |
Standard_Boolean | IsOut (const BVH_Box< T, N > &theOther) const |
Checks if the Box is out of the other box. | |
Standard_Boolean | IsOut (const BVH_VecNt &theMinPoint, const BVH_VecNt &theMaxPoint) const |
Checks if the Box is out of the other box defined by two points. | |
Standard_Boolean | Contains (const BVH_Box< T, N > &theOther, Standard_Boolean &hasOverlap) const |
Checks if the Box fully contains the other box. | |
Standard_Boolean | Contains (const BVH_VecNt &theMinPoint, const BVH_VecNt &theMaxPoint, Standard_Boolean &hasOverlap) const |
Checks if the Box is fully contains the other box. | |
Standard_Boolean | IsOut (const BVH_VecNt &thePoint) const |
Checks if the Point is out of the box. | |
Protected Attributes | |
BVH_VecNt | myMinPoint |
Minimum point of bounding box. | |
BVH_VecNt | myMaxPoint |
Maximum point of bounding box. | |
Standard_Boolean | myIsInited |
Is bounding box initialized? | |
Defines axis aligned bounding box (AABB) based on BVH vectors.
T | Numeric data type |
N | Vector dimension |
typedef BVH::VectorType<T,N>::Type BVH_Box< T, N >::BVH_VecNt |
Creates bounding box of given point.
Creates bounding box from corner points.
Appends new point to the bounding box.
Returns surface area of bounding box. If the box is degenerated into line, returns the perimeter instead.
Returns center of bounding box.
T BVH_Box< T, N >::Center | ( | const Standard_Integer | theAxis | ) | const |
Returns center of bounding box along the given axis.
Combines bounding box with another one.
|
inline |
Checks if the Box fully contains the other box.
|
inline |
Checks if the Box is fully contains the other box.
Returns maximum point of bounding box.
Returns maximum point of bounding box.
Returns minimum point of bounding box.
Returns minimum point of bounding box.
|
inline |
Dumps the content of me into the stream.
|
inline |
Inits the content of me from the stream.
|
inline |
Checks if the Box is out of the other box.
|
inline |
Checks if the Box is out of the other box defined by two points.
|
inline |
Checks if the Point is out of the box.
|
inline |
Is bounding box valid?
Returns diagonal of bounding box.
|
protected |
Is bounding box initialized?
Maximum point of bounding box.
Minimum point of bounding box.