3 #ifndef SCENEVIEW_AXIS_ALIGNED_BOX_HPP__
4 #define SCENEVIEW_AXIS_ALIGNED_BOX_HPP__
35 void SetBounds(
const QVector3D& min,
const QVector3D& max);
56 const QVector3D&
Min()
const {
return min_; }
61 const QVector3D&
Max()
const {
return max_; }
86 return !(*
this == other); }
100 #endif // SCENEVIEW_AXIS_ALIGNED_BOUNDING_BOX_HPP__
const QVector3D & Min() const
Returns the box corner with lowest coordinates.
Definition: axis_aligned_box.hpp:56
AxisAlignedBox()
Constructs an invalid box.
An axis-aligned box typically used for bounding box and intersection calculations.
Definition: axis_aligned_box.hpp:17
bool Intersects(const AxisAlignedBox &other) const
Check if this box intersects with another.
QString ToString() const
For debugging.
const QVector3D & Max() const
Returns the box corner with greatest coordinates.
Definition: axis_aligned_box.hpp:61
bool operator==(const AxisAlignedBox &other) const
Check if this box is identical to another.
void IncludeBox(const AxisAlignedBox &other)
Modifies the box to fully contain the specified other box.
bool Valid() const
Check if the box is valid or not.
void IncludePoint(const QVector3D &point)
Modifies the box to contain the specified point.
void SetBounds(const QVector3D &min, const QVector3D &max)
Manually set the box extents.
AxisAlignedBox Intersection(const AxisAlignedBox &other) const
Computes the intersection of this box with another.
AxisAlignedBox Transformed(const QMatrix4x4 &transform) const
Transforms and axis-aligns the corners of this box.