Open CASCADE Technology 7.8.0
|
#include <Bnd_B2d.hxx>
Public Member Functions | |
Bnd_B2d () | |
Empty constructor. | |
Bnd_B2d (const gp_XY &theCenter, const gp_XY &theHSize) | |
Constructor. | |
Standard_Boolean | IsVoid () const |
Returns True if the box is void (non-initialized). | |
void | Clear () |
Reset the box data. | |
void | Add (const gp_XY &thePnt) |
Update the box by a point. | |
void | Add (const gp_Pnt2d &thePnt) |
Update the box by a point. | |
void | Add (const Bnd_B2d &theBox) |
Update the box by another box. | |
gp_XY | CornerMin () const |
Query a box corner: (Center - HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result. | |
gp_XY | CornerMax () const |
Query a box corner: (Center + HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result. | |
Standard_Real | SquareExtent () const |
Query the square diagonal. If the box is VOID (see method IsVoid()) then a very big real value is returned. | |
void | Enlarge (const Standard_Real theDiff) |
Extend the Box by the absolute value of theDiff. | |
Standard_Boolean | Limit (const Bnd_B2d &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_B2d | Transformed (const gp_Trsf2d &theTrsf) const |
Transform the bounding box with the given transformation. The resulting box will be larger if theTrsf contains rotation. | |
Standard_Boolean | IsOut (const gp_XY &thePnt) const |
Check the given point for the inclusion in the Box. Returns True if the point is outside. | |
Standard_Boolean | IsOut (const gp_XY &theCenter, const Standard_Real theRadius, const Standard_Boolean isCircleHollow=Standard_False) const |
Check a circle for the intersection with the current box. Returns True if there is no intersection between boxes. | |
Standard_Boolean | IsOut (const Bnd_B2d &theOtherBox) const |
Check the given box for the intersection with the current box. Returns True if there is no intersection between boxes. | |
Standard_Boolean | IsOut (const Bnd_B2d &theOtherBox, const gp_Trsf2d &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. | |
Standard_Boolean | IsOut (const gp_Ax2d &theLine) const |
Check the given Line for the intersection with the current box. Returns True if there is no intersection. | |
Standard_Boolean | IsOut (const gp_XY &theP0, const gp_XY &theP1) const |
Check the Segment defined by the couple of input points for the intersection with the current box. Returns True if there is no intersection. | |
Standard_Boolean | IsIn (const Bnd_B2d &theBox) const |
Check that the box 'this' is inside the given box 'theBox'. Returns True if 'this' box is fully inside 'theBox'. | |
Standard_Boolean | IsIn (const Bnd_B2d &theBox, const gp_Trsf2d &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_XY &theCenter) |
Set the Center coordinates. | |
void | SetHSize (const gp_XY &theHSize) |
Set the HSize (half-diagonal) coordinates. All components of theHSize must be non-negative. | |
Protected Attributes | |
Standard_Real | myCenter [2] |
Standard_Real | myHSize [2] |
Bnd_B2d::Bnd_B2d | ( | ) |
Empty constructor.
void Bnd_B2d::Clear | ( | ) |
Reset the box data.
gp_XY Bnd_B2d::CornerMax | ( | ) | const |
Query a box corner: (Center + HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.
gp_XY Bnd_B2d::CornerMin | ( | ) | const |
Query a box corner: (Center - HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.
void Bnd_B2d::Enlarge | ( | const Standard_Real | theDiff | ) |
Extend the Box by the absolute value of theDiff.
Standard_Boolean Bnd_B2d::IsIn | ( | const Bnd_B2d & | theBox | ) | const |
Check that the box 'this' is inside the given box 'theBox'. Returns True if 'this' box is fully inside 'theBox'.
Standard_Boolean Bnd_B2d::IsIn | ( | const Bnd_B2d & | theBox, |
const gp_Trsf2d & | 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'.
Standard_Boolean Bnd_B2d::IsOut | ( | const Bnd_B2d & | theOtherBox | ) | const |
Check the given box for the intersection with the current box. Returns True if there is no intersection between boxes.
Standard_Boolean Bnd_B2d::IsOut | ( | const Bnd_B2d & | theOtherBox, |
const gp_Trsf2d & | 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.
Standard_Boolean Bnd_B2d::IsOut | ( | const gp_Ax2d & | theLine | ) | const |
Check the given Line for the intersection with the current box. Returns True if there is no intersection.
Standard_Boolean Bnd_B2d::IsOut | ( | const gp_XY & | theCenter, |
const Standard_Real | theRadius, | ||
const Standard_Boolean | isCircleHollow = Standard_False |
||
) | const |
Check a circle for the intersection with the current box. Returns True if there is no intersection between boxes.
Standard_Boolean Bnd_B2d::IsOut | ( | const gp_XY & | theP0, |
const gp_XY & | theP1 | ||
) | const |
Check the Segment defined by the couple of input points for the intersection with the current box. Returns True if there is no intersection.
Standard_Boolean Bnd_B2d::IsOut | ( | const gp_XY & | thePnt | ) | const |
Check the given point for the inclusion in the Box. Returns True if the point is outside.
Standard_Boolean Bnd_B2d::IsVoid | ( | ) | const |
Returns True if the box is void (non-initialized).
Standard_Boolean Bnd_B2d::Limit | ( | const Bnd_B2d & | 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.
Set the HSize (half-diagonal) coordinates. All components of theHSize must be non-negative.
Standard_Real Bnd_B2d::SquareExtent | ( | ) | const |
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.
|
protected |
|
protected |