![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Template class for 3D bounding box. This is a base template that is instantiated for double and float. More...
#include <Bnd_B3.hxx>
Public Member Functions | |
| constexpr | Bnd_B3 () noexcept |
| Empty constructor. | |
| constexpr | Bnd_B3 (const gp_XYZ &theCenter, const gp_XYZ &theHSize) noexcept |
| Constructor. | |
| constexpr | Bnd_B3 (const std::array< RealType, 3 > &theCenter, const std::array< RealType, 3 > &theHSize) noexcept |
| Constructor. | |
| constexpr bool | IsVoid () const noexcept |
| Returns True if the box is void (non-initialized). | |
| void | Clear () noexcept |
| Reset the box data. | |
| void | Add (const gp_XYZ &thePnt) |
| Update the box by a point. | |
| void | Add (const gp_Pnt &thePnt) |
| Update the box by a point. | |
| void | Add (const Bnd_B3< RealType > &theBox) |
| Update the box by another box. | |
| gp_XYZ | CornerMin () const noexcept |
| Query the lower corner: (Center - HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result. | |
| gp_XYZ | CornerMax () const noexcept |
| Query the upper corner: (Center + HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result. | |
| constexpr double | SquareExtent () const noexcept |
| Query the square diagonal. If the box is VOID (see method IsVoid()) then a very big real value is returned. | |
| void | Enlarge (const double theDiff) noexcept |
| Extend the Box by the absolute value of theDiff. | |
| bool | Limit (const Bnd_B3< RealType > &theOtherBox) |
| Limit the Box by the internals of theOtherBox. Returns True if the limitation takes place, otherwise False indicating that the boxes do not intersect. | |
| Bnd_B3< RealType > | Transformed (const gp_Trsf &theTrsf) const |
| Transform the bounding box with the given transformation. The resulting box will be larger if theTrsf contains rotation. | |
| constexpr bool | IsOut (const gp_XYZ &thePnt) const noexcept |
| Check the given point for the inclusion in the Box. Returns True if the point is outside. | |
| bool | IsOut (const gp_XYZ &theCenter, const double theRadius, const bool isSphereHollow=false) const |
| Check a sphere for the intersection with the current box. Returns True if there is no intersection between boxes. If the parameter 'IsSphereHollow' is True, then the intersection is not reported for a box that is completely inside the sphere (otherwise this method would report an intersection). | |
| constexpr bool | IsOut (const Bnd_B3< RealType > &theOtherBox) const noexcept |
| Check the given box for the intersection with the current box. Returns True if there is no intersection between boxes. | |
| bool | IsOut (const Bnd_B3< RealType > &theOtherBox, const gp_Trsf &theTrsf) const |
| Check the given box oriented by the given transformation for the intersection with the current box. Returns True if there is no intersection between boxes. | |
| bool | IsOut (const gp_Ax1 &theLine, const bool isRay=false, const double theOverthickness=0.0) const |
| Check the given Line for the intersection with the current box. Returns True if there is no intersection. isRay==True means intersection check with the positive half-line theOverthickness is the addition to the size of the current box (may be negative). If positive, it can be treated as the thickness of the line 'theLine' or the radius of the cylinder along 'theLine'. | |
| bool | IsOut (const gp_Ax3 &thePlane) const |
| Check the given Plane for the intersection with the current box. Returns True if there is no intersection. | |
| constexpr bool | IsIn (const Bnd_B3< RealType > &theBox) const noexcept |
| Check that the box 'this' is inside the given box 'theBox'. Returns True if 'this' box is fully inside 'theBox'. | |
| bool | IsIn (const Bnd_B3< RealType > &theBox, const gp_Trsf &theTrsf) const |
| Check that the box 'this' is inside the given box 'theBox' transformed by 'theTrsf'. Returns True if 'this' box is fully inside the transformed 'theBox'. | |
| void | SetCenter (const gp_XYZ &theCenter) noexcept |
| Set the Center coordinates. | |
| void | SetCenter (const std::array< RealType, 3 > &theCenter) noexcept |
| Set the Center coordinates. | |
| void | SetHSize (const gp_XYZ &theHSize) noexcept |
| Set the HSize (half-diagonal) coordinates. All components of theHSize must be non-negative. | |
| void | SetHSize (const std::array< RealType, 3 > &theHSize) noexcept |
| Set the HSize (half-diagonal) coordinates. All components of theHSize must be non-negative. | |
| constexpr const std::array< RealType, 3 > & | Center () const noexcept |
| Get the Center coordinates. | |
| constexpr const std::array< RealType, 3 > & | HSize () const noexcept |
| Get the HSize (half-diagonal) coordinates. | |
Static Protected Member Functions | |
| static constexpr bool | compareDist (const RealType aHSize[3], const RealType aDist[3]) noexcept |
| static bool | compareDistD (const gp_XYZ &aHSize, const gp_XYZ &aDist) noexcept |
Static Protected Attributes | |
| static constexpr RealType | THE_RealLast = RealType(1e30) |
| Constant representing a very large value for void box initialization. | |
Template class for 3D bounding box. This is a base template that is instantiated for double and float.
Empty constructor.
|
inlineconstexprnoexcept |
Constructor.
|
inlineconstexprnoexcept |
Constructor.
Update the box by another box.
Update the box by a point.
Update the box by a point.
|
inlineconstexprnoexcept |
Get the Center coordinates.
|
inlinestaticconstexprprotectednoexcept |
|
inlinestaticprotectednoexcept |
Query the upper corner: (Center + HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.
Query the lower corner: (Center - HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.
Extend the Box by the absolute value of theDiff.
|
inlineconstexprnoexcept |
Get the HSize (half-diagonal) coordinates.
|
inlineconstexprnoexcept |
Check that the box 'this' is inside the given box 'theBox'. Returns True if 'this' box is fully inside 'theBox'.
Check that the box 'this' is inside the given box 'theBox' transformed by 'theTrsf'. Returns True if 'this' box is fully inside the transformed 'theBox'.
|
inlineconstexprnoexcept |
Check the given box for the intersection with the current box. Returns True if there is no intersection between boxes.
| bool Bnd_B3< RealType >::IsOut | ( | const Bnd_B3< RealType > & | theOtherBox, |
| const gp_Trsf & | theTrsf ) const |
Check the given box oriented by the given transformation for the intersection with the current box. Returns True if there is no intersection between boxes.
| bool Bnd_B3< RealType >::IsOut | ( | const gp_Ax1 & | theLine, |
| const bool | isRay = false, | ||
| const double | theOverthickness = 0.0 ) const |
Check the given Line for the intersection with the current box. Returns True if there is no intersection. isRay==True means intersection check with the positive half-line theOverthickness is the addition to the size of the current box (may be negative). If positive, it can be treated as the thickness of the line 'theLine' or the radius of the cylinder along 'theLine'.
Check the given Plane for the intersection with the current box. Returns True if there is no intersection.
| bool Bnd_B3< RealType >::IsOut | ( | const gp_XYZ & | theCenter, |
| const double | theRadius, | ||
| const bool | isSphereHollow = false ) const |
Check a sphere for the intersection with the current box. Returns True if there is no intersection between boxes. If the parameter 'IsSphereHollow' is True, then the intersection is not reported for a box that is completely inside the sphere (otherwise this method would report an intersection).
Check the given point for the inclusion in the Box. Returns True if the point is outside.
Returns True if the box is void (non-initialized).
Limit the Box by the internals of theOtherBox. Returns True if the limitation takes place, otherwise False indicating that the boxes do not intersect.
Set the Center coordinates.
Set the Center coordinates.
Set the HSize (half-diagonal) coordinates. All components of theHSize must be non-negative.
Set the HSize (half-diagonal) coordinates. All components of theHSize must be non-negative.
Query the square diagonal. If the box is VOID (see method IsVoid()) then a very big real value is returned.
Transform the bounding box with the given transformation. The resulting box will be larger if theTrsf contains rotation.
Constant representing a very large value for void box initialization.