A pair of two Vector3 that define the boundaries of an object (the minimum point and the maximum point in the space).
The two vectors are the lower (minumum) bound and the upper (maximum) bound.
- void ApplyTransform(const Transform& transform)
- Recalculates the bounding box after having applied the given transform.
- auto GetCenter() const -> Vector3
- Returns the center of this bounding box.
- auto Contains(const Vector3& point) const -> bool
- Tells whether this bounding box contains the given point.
- auto Intersect(const BoundingBox& other, BoundingBox& dst = BoundingBox()) const -> bool
- Finds the intersection between two bounding boxes.
BoundingBox:: Intersect(const BoundingBox& other,
BoundingBox& dst = BoundingBox()) const
Finds the intersection between two bounding boxes.
|other||The other bounding box to intersect with.|
|dst out||[Optional] Where the intersection will be written. Points inside this bbox are contained in both bbox.|
The return value will indicate whether this bbox and the other intersect anywhere (
true) or not (
false); optionally, you can pass another bounding box where the intersection will be written.
The method will return true if the resulting intersection box is degenerate, that is, has volume 0; this means taht bounding boxes that only intersect in one point, line or plane return false.