cee::BoundingBox
-
class BoundingBox
Axis-aligned bounding box.
The BoundingBox class defines an axis-aligned bounding box. The bounding box is defined as the smallest possible box surrounding a collection of points. There must be at least two separate points set for a valid bounding box.
When adding points to an existing bounding box, it will grow to surround the newly added points in addition to the existing. Single points or other bounding boxes can be added.
You can query an existing bounding box for minimum, maximum, center point, extent and radius.
The views bounding box can be retrieved by View::boundingBox().
See also
Public Functions
-
BoundingBox()
Constructs an empty bounding box object.
-
BoundingBox(const BoundingBox &other)
Constructs a bounding box as a copy of other.
-
BoundingBox &operator=(const BoundingBox &rhs)
Assigns rhs to this bounding box and returns a reference to this bounding box.
-
BoundingBox operator+(const BoundingBox &rhs)
Adds rhs with this and return the product bounding box, leaving this unchanged.
-
void reset()
Resets the bounding box.
-
bool isValid() const
Returns false if no input has been given.
-
void add(const Vec3d &vertex)
Adds a point to the bounding box area.
The bounding box will grow to include the added point.
-
void add(const BoundingBox &bb)
Adds another bounding box to this bounding box area.
The bounding box will grow to include the added bounding box.
-
double radius() const
Returns the radius as half the length of the box’s diagonal.
-
BoundingBox()