34 double getRadius()
const {
return (_max - getCenter()).length(); }
50 Vector3 _min =
Vector3(std::numeric_limits<double>::max(), std::numeric_limits<double>::max(),
51 std::numeric_limits<double>::max());
53 Vector3 _max =
Vector3(std::numeric_limits<double>::min(), std::numeric_limits<double>::min(),
54 std::numeric_limits<double>::min());
const double WEM_EPSILON
Epsilon value used in Vector3 comparisons.
This class represents an axis aligned bounding box for a WEMPatch.
Vector3 getMin() const
Returns minimum bounding box extent.
Vector3 getMax() const
Returns maximum bounding box extent.
void reset()
Resets object to the default constructed state.
bool contains(const Vector3 &position) const
Returns whether the bounding box contains the given position.
double getRadius() const
Returns radius.
Vector3 getCenter() const
Returns center of bounding box.
bool isValid() const
Returns whether this is valid.
bool isScalable() const
Returns whether the bounding box is scalable.
WEMBoundingBox & operator&=(const WEMBoundingBox &other)
Returns the union bounding box of this and other.
void setExtents(const Vector3 &min, const Vector3 &max)
Sets extents minimum and maximum and updates center and radius.
bool isCentered() const
Returns whether the bounding box is centered.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
WEMBoundingBox MLWEM_EXPORT operator&(WEMBoundingBox x, const WEMBoundingBox &y)
Returns the union bounding box of x and y.