Open CASCADE Technology  7.4.0
Public Member Functions | Protected Attributes
Bnd_B3d Class Reference

#include <Bnd_B3d.hxx>

Public Member Functions

 Bnd_B3d ()
 Empty constructor. More...
 
 Bnd_B3d (const gp_XYZ &theCenter, const gp_XYZ &theHSize)
 Constructor. More...
 
Standard_Boolean IsVoid () const
 Returns True if the box is void (non-initialized). More...
 
void Clear ()
 Reset the box data. More...
 
void Add (const gp_XYZ &thePnt)
 Update the box by a point. More...
 
void Add (const gp_Pnt &thePnt)
 Update the box by a point. More...
 
void Add (const Bnd_B3d &theBox)
 Update the box by another box. More...
 
gp_XYZ CornerMin () const
 Query the lower corner: (Center - HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result. More...
 
gp_XYZ CornerMax () const
 Query the upper corner: (Center + HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result. More...
 
Standard_Real SquareExtent () const
 Query the square diagonal. If the box is VOID (see method IsVoid()) then a very big real value is returned. More...
 
void Enlarge (const Standard_Real theDiff)
 Extend the Box by the absolute value of theDiff. More...
 
Standard_Boolean Limit (const Bnd_B3d &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. More...
 
Bnd_B3d Transformed (const gp_Trsf &theTrsf) const
 Transform the bounding box with the given transformation. The resulting box will be larger if theTrsf contains rotation. More...
 
Standard_Boolean IsOut (const gp_XYZ &thePnt) const
 Check the given point for the inclusion in the Box. Returns True if the point is outside. More...
 
Standard_Boolean IsOut (const gp_XYZ &theCenter, const Standard_Real theRadius, const Standard_Boolean isSphereHollow=Standard_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). More...
 
Standard_Boolean IsOut (const Bnd_B3d &theOtherBox) const
 Check the given box for the intersection with the current box. Returns True if there is no intersection between boxes. More...
 
Standard_Boolean IsOut (const Bnd_B3d &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. More...
 
Standard_Boolean IsOut (const gp_Ax1 &theLine, const Standard_Boolean isRay=Standard_False, const Standard_Real 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'. More...
 
Standard_Boolean IsOut (const gp_Ax3 &thePlane) const
 Check the given Plane for the intersection with the current box. Returns True if there is no intersection. More...
 
Standard_Boolean IsIn (const Bnd_B3d &theBox) const
 Check that the box 'this' is inside the given box 'theBox'. Returns True if 'this' box is fully inside 'theBox'. More...
 
Standard_Boolean IsIn (const Bnd_B3d &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'. More...
 
void SetCenter (const gp_XYZ &theCenter)
 Set the Center coordinates. More...
 
void SetHSize (const gp_XYZ &theHSize)
 Set the HSize (half-diagonal) coordinates. All components of theHSize must be non-negative. More...
 

Protected Attributes

Standard_Real myCenter [3]
 
Standard_Real myHSize [3]
 

Constructor & Destructor Documentation

◆ Bnd_B3d() [1/2]

Bnd_B3d::Bnd_B3d ( )

Empty constructor.

◆ Bnd_B3d() [2/2]

Bnd_B3d::Bnd_B3d ( const gp_XYZ theCenter,
const gp_XYZ theHSize 
)

Constructor.

Member Function Documentation

◆ Add() [1/3]

void Bnd_B3d::Add ( const gp_XYZ thePnt)

Update the box by a point.

◆ Add() [2/3]

void Bnd_B3d::Add ( const gp_Pnt thePnt)

Update the box by a point.

◆ Add() [3/3]

void Bnd_B3d::Add ( const Bnd_B3d theBox)

Update the box by another box.

◆ Clear()

void Bnd_B3d::Clear ( )

Reset the box data.

◆ CornerMax()

gp_XYZ Bnd_B3d::CornerMax ( ) const

Query the upper corner: (Center + HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.

◆ CornerMin()

gp_XYZ Bnd_B3d::CornerMin ( ) const

Query the lower corner: (Center - HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.

◆ Enlarge()

void Bnd_B3d::Enlarge ( const Standard_Real  theDiff)

Extend the Box by the absolute value of theDiff.

◆ IsIn() [1/2]

Standard_Boolean Bnd_B3d::IsIn ( const Bnd_B3d theBox) const

Check that the box 'this' is inside the given box 'theBox'. Returns True if 'this' box is fully inside 'theBox'.

◆ IsIn() [2/2]

Standard_Boolean Bnd_B3d::IsIn ( const Bnd_B3d 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'.

◆ IsOut() [1/6]

Standard_Boolean Bnd_B3d::IsOut ( const gp_XYZ thePnt) const

Check the given point for the inclusion in the Box. Returns True if the point is outside.

◆ IsOut() [2/6]

Standard_Boolean Bnd_B3d::IsOut ( const gp_XYZ theCenter,
const Standard_Real  theRadius,
const Standard_Boolean  isSphereHollow = Standard_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).

◆ IsOut() [3/6]

Standard_Boolean Bnd_B3d::IsOut ( const Bnd_B3d theOtherBox) const

Check the given box for the intersection with the current box. Returns True if there is no intersection between boxes.

◆ IsOut() [4/6]

Standard_Boolean Bnd_B3d::IsOut ( const Bnd_B3d 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.

◆ IsOut() [5/6]

Standard_Boolean Bnd_B3d::IsOut ( const gp_Ax1 theLine,
const Standard_Boolean  isRay = Standard_False,
const Standard_Real  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'.

◆ IsOut() [6/6]

Standard_Boolean Bnd_B3d::IsOut ( const gp_Ax3 thePlane) const

Check the given Plane for the intersection with the current box. Returns True if there is no intersection.

◆ IsVoid()

Standard_Boolean Bnd_B3d::IsVoid ( ) const

Returns True if the box is void (non-initialized).

◆ Limit()

Standard_Boolean Bnd_B3d::Limit ( const Bnd_B3d 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.

◆ SetCenter()

void Bnd_B3d::SetCenter ( const gp_XYZ theCenter)

Set the Center coordinates.

◆ SetHSize()

void Bnd_B3d::SetHSize ( const gp_XYZ theHSize)

Set the HSize (half-diagonal) coordinates. All components of theHSize must be non-negative.

◆ SquareExtent()

Standard_Real Bnd_B3d::SquareExtent ( ) const

Query the square diagonal. If the box is VOID (see method IsVoid()) then a very big real value is returned.

◆ Transformed()

Bnd_B3d Bnd_B3d::Transformed ( const gp_Trsf theTrsf) const

Transform the bounding box with the given transformation. The resulting box will be larger if theTrsf contains rotation.

Field Documentation

◆ myCenter

Standard_Real Bnd_B3d::myCenter[3]
protected

◆ myHSize

Standard_Real Bnd_B3d::myHSize[3]
protected

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