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:64
bool Contains(const VectorType &point) const
Returns true if the input vector is inside of this box.
Definition BoundingBox-Impl.hpp:105
bool Intersects(const RayType &ray) const
Returns true if the input ray is intersecting with this box.
Definition BoundingBox-Impl.hpp:119
BoundingBoxRayIntersection< T > ClosestIntersection(const RayType &ray) const
Definition BoundingBox-Impl.hpp:148
std::enable_if_t<(N > 2), U > Depth() const
Returns depth of the box.
Definition BoundingBox-Impl.hpp:78
T Length(size_t axis)
Returns length of the box in given axis.
Definition BoundingBox-Impl.hpp:84
VectorType MidPoint() const
Returns the mid-point of this box.
Definition BoundingBox-Impl.hpp:194
VectorType Corner(size_t idx) const
Returns corner position. Index starts from x-first order.
Definition BoundingBox-Impl.hpp:240
T DiagonalLength() const
Returns diagonal length of this box.
Definition BoundingBox-Impl.hpp:200
void Reset()
Resets this box to initial state (min=infinite, max=-infinite).
Definition BoundingBox-Impl.hpp:212
bool IsEmpty() const
Returns true if the box is empty.
Definition BoundingBox-Impl.hpp:260
void Merge(const VectorType &point)
Merges this and other point.
Definition BoundingBox-Impl.hpp:219
BoundingBox & operator=(const BoundingBox &other)
Copy assignment operator.
Definition BoundingBox-Impl.hpp:46
T DiagonalLengthSquared() const
Returns squared diagonal length of this box.
Definition BoundingBox-Impl.hpp:206
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:90
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:71
BoundingBox< U, N > CastTo() const
Returns box with different value type.
Definition BoundingBox-Impl.hpp:275
VectorType Clamp(const VectorType &point) const
Returns the clamped point.
Definition BoundingBox-Impl.hpp:253
Definition Matrix.hpp:30
Definition pybind11Utils.hpp:21
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