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:45
bool Contains(const VectorType &point) const
Returns true if the input vector is inside of this box.
Definition BoundingBox-Impl.hpp:86
bool Intersects(const RayType &ray) const
Returns true if the input ray is intersecting with this box.
Definition BoundingBox-Impl.hpp:100
BoundingBoxRayIntersection< T > ClosestIntersection(const RayType &ray) const
Definition BoundingBox-Impl.hpp:129
std::enable_if_t<(N > 2), U > Depth() const
Returns depth of the box.
Definition BoundingBox-Impl.hpp:59
T Length(size_t axis)
Returns length of the box in given axis.
Definition BoundingBox-Impl.hpp:65
VectorType MidPoint() const
Returns the mid-point of this box.
Definition BoundingBox-Impl.hpp:175
VectorType Corner(size_t idx) const
Returns corner position. Index starts from x-first order.
Definition BoundingBox-Impl.hpp:221
T DiagonalLength() const
Returns diagonal length of this box.
Definition BoundingBox-Impl.hpp:181
void Reset()
Resets this box to initial state (min=infinite, max=-infinite).
Definition BoundingBox-Impl.hpp:193
bool IsEmpty() const
Returns true if the box is empty.
Definition BoundingBox-Impl.hpp:241
void Merge(const VectorType &point)
Merges this and other point.
Definition BoundingBox-Impl.hpp:200
BoundingBox & operator=(const BoundingBox &other)
Copy assignment operator.
T DiagonalLengthSquared() const
Returns squared diagonal length of this box.
Definition BoundingBox-Impl.hpp:187
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:71
BoundingBox & operator=(BoundingBox &&other) noexcept
Move assignment operator.
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:52
BoundingBox(BoundingBox &&other) noexcept
Constructs a box with other box instance.
BoundingBox(const BoundingBox &other)
Constructs a box with other box instance.
BoundingBox< U, N > CastTo() const
Returns box with different value type.
Definition BoundingBox-Impl.hpp:256
VectorType Clamp(const VectorType &point) const
Returns the clamped point.
Definition BoundingBox-Impl.hpp:234
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