Package empro :: Module empro :: Module geometry :: Class BoundingBox2D
[frames] | no frames]

Class BoundingBox2D

core.Updatable --+    
                 |    
   core.Selectable --+
                     |
                    BoundingBox2D

A bounding box in 2 dimensions.

Class Hierarchy for BoundingBox2D
Class Hierarchy for BoundingBox2D

constructor BoundingBox2D():

constructor BoundingBox2D(iLower, iUpper):

Instance Methods
double
area()
Returns the area of the bounding box.
Vector2d
center()
The center of the bounding box.
bool
contains(iPoint)
Check if another bounding box is within the bounding box.
Vector2d
extent()
The extent of the bounding box.
None
forceInclusion(iPoint)
Expands the bounding box to include a point.
bool
intersects()
Determines wheter the two bounding boxes intersect or not.
list{Vector2d}
vertices()
The list of vertices of the bounding box.

Inherited from core.Selectable: clone, isSelected

Inherited from core.Updatable: __enter__, __exit__, hash, isValid, reasonWhyInvalid

Properties
Vector2dNone lower
The lower corner point.
Vector2dNone upper
The upper corner point.

Inherited from core.Selectable: metaData, name, notes

Method Details

contains(iPoint)

 

Check if another bounding box is within the bounding box.

Parameters:
Returns: bool

forceInclusion(iPoint)

 

Expands the bounding box to include a point.

Parameters:
  • iPoint (Vector2d) - The point to forcefully include in the bounding box allowing expansion.
Returns: None