Loading...
Searching...
No Matches
BoundingBox.hpp
Go to the documentation of this file.
T Width() const
Returns width of the box.
Definition BoundingBox-Impl.hpp:59
bool Contains(const VectorType &point) const
Returns true if the input vector is inside of this box.
Definition BoundingBox-Impl.hpp:100
bool Intersects(const RayType &ray) const
Returns true if the input ray is intersecting with this box.
Definition BoundingBox-Impl.hpp:114
BoundingBoxRayIntersection< T > ClosestIntersection(const RayType &ray) const
Definition BoundingBox-Impl.hpp:143
std::enable_if_t<(N > 2), U > Depth() const
Returns depth of the box.
Definition BoundingBox-Impl.hpp:73
T Length(size_t axis)
Returns length of the box in given axis.
Definition BoundingBox-Impl.hpp:79
VectorType MidPoint() const
Returns the mid-point of this box.
Definition BoundingBox-Impl.hpp:189
VectorType Corner(size_t idx) const
Returns corner position. Index starts from x-first order.
Definition BoundingBox-Impl.hpp:235
T DiagonalLength() const
Returns diagonal length of this box.
Definition BoundingBox-Impl.hpp:195
void Reset()
Resets this box to initial state (min=infinite, max=-infinite).
Definition BoundingBox-Impl.hpp:207
bool IsEmpty() const
Returns true if the box is empty.
Definition BoundingBox-Impl.hpp:255
void Merge(const VectorType &point)
Merges this and other point.
Definition BoundingBox-Impl.hpp:214
BoundingBox & operator=(const BoundingBox &other)
Copy assignment operator.
T DiagonalLengthSquared() const
Returns squared diagonal length of this box.
Definition BoundingBox-Impl.hpp:201
BoundingBox()
Default constructor.
Definition BoundingBox-Impl.hpp:17
bool Overlaps(const BoundingBox &other) const
Returns true of this box and other box overlaps.
Definition BoundingBox-Impl.hpp:85
VectorType lowerCorner
Lower corner of the bounding box.
Definition BoundingBox.hpp:145
VectorType upperCorner
Upper corner of the bounding box.
Definition BoundingBox.hpp:148
std::enable_if_t<(N > 1), U > Height() const
Returns height of the box.
Definition BoundingBox-Impl.hpp:66
BoundingBox< U, N > CastTo() const
Returns box with different value type.
Definition BoundingBox-Impl.hpp:270
VectorType Clamp(const VectorType &point) const
Returns the clamped point.
Definition BoundingBox-Impl.hpp:248
Definition Matrix.hpp:30
Definition pybind11Utils.hpp:22
T near
Distance to the first intersection point.
Definition BoundingBox.hpp:33
bool isIntersecting
True if the box and ray intersects.
Definition BoundingBox.hpp:30
T far
Distance to the second (and the last) intersection point.
Definition BoundingBox.hpp:36
1.9.8