![]() |
OpenVDB 14.0.0
|
Partial template specialization for integer coordinate types. More...
#include <nanovdb/math/Math.h>
Classes | |
| class | Iterator |
| Iterator over the domain covered by a BBox. More... | |
Public Types | |
| using | BaseT = BaseBBox<CoordT> |
Public Member Functions | |
| __hostdev__ constexpr Iterator | begin () const noexcept |
| Iterator positioned at the min corner. | |
| __hostdev__ constexpr Iterator | end () const noexcept |
One-past-the-end iterator (max corner shifted by one in x). | |
| __hostdev__ constexpr | BBox () noexcept |
Default construct an empty bbox (min = CoordT::max(), max = CoordT::min()). | |
| __hostdev__ constexpr | BBox (const CoordT &min, const CoordT &max) noexcept |
| Construct from explicit min / max integer corners. | |
| template<typename SplitT> | |
| __hostdev__ constexpr | BBox (BBox &other, const SplitT &) noexcept |
| Splitting constructor (used by parallel range-based iteration). | |
| __hostdev__ constexpr bool | is_divisible () const noexcept |
Return true iff the box has more than one cell along every axis. | |
| __hostdev__ constexpr bool | empty () const noexcept |
| Return true if this bounding box is empty, e.g. uninitialized. | |
| __hostdev__ constexpr | operator bool () const noexcept |
| Convert this BBox to boolean true if it is not empty. | |
| __hostdev__ constexpr CoordT | dim () const noexcept |
| Return the per-axis extent (max - min + 1 when non-empty, else 0). | |
| __hostdev__ constexpr uint64_t | volume () const noexcept |
Return the number of integer cells in the box, i.e. dim().x * dim().y * dim().z. | |
| __hostdev__ constexpr bool | isInside (const CoordT &p) const noexcept |
Return true iff the integer coordinate p lies inside the closed box. | |
| __hostdev__ constexpr bool | isInside (const BBox &b) const noexcept |
Return true if the given bounding box is inside this bounding box. | |
| __hostdev__ constexpr bool | hasOverlap (const BBox &b) const noexcept |
Return true if the given bounding box overlaps with this bounding box. | |
| template<typename RealT = double> | |
| __hostdev__ constexpr BBox< Vec3< RealT > > | asReal () const noexcept |
| __hostdev__ constexpr BBox | expandBy (typename CoordT::ValueType padding) const noexcept |
| Return a new instance that is expanded by the specified padding. | |
| template<typename Map> | |
| __hostdev__ constexpr auto | transform (const Map &map) const noexcept |
| Transform this coordinate bounding box by the specified map. | |
| __hostdev__ constexpr bool | operator== (const BaseBBox &rhs) const noexcept |
| Equality on the two corner points. | |
| __hostdev__ constexpr bool | operator!= (const BaseBBox &rhs) const noexcept |
| Inequality on the two corner points. | |
| __hostdev__ constexpr const CoordT & | operator[] (int i) const noexcept |
| Indexed corner access: i = 0 returns min, i = 1 returns max. | |
| __hostdev__ constexpr CoordT & | operator[] (int i) noexcept |
Mutable variant of operator[]. | |
| __hostdev__ constexpr CoordT & | min () noexcept |
| Mutable accessor for the min corner. | |
| __hostdev__ constexpr const CoordT & | min () const noexcept |
| Const accessor for the min corner. | |
| __hostdev__ constexpr CoordT & | max () noexcept |
| Mutable accessor for the max corner. | |
| __hostdev__ constexpr const CoordT & | max () const noexcept |
| Const accessor for the max corner. | |
| __hostdev__ constexpr BaseBBox & | translate (const CoordT &xyz) noexcept |
Translate (rigid-shift) both corners by xyz; return *this. | |
| __hostdev__ constexpr BaseBBox & | expand (const CoordT &xyz) noexcept |
Expand this bounding box to enclose point xyz. | |
| __hostdev__ constexpr BaseBBox & | expand (const BaseBBox &bbox) noexcept |
| Expand this bounding box to enclose the given bounding box. | |
| __hostdev__ constexpr BaseBBox & | intersect (const BaseBBox &bbox) noexcept |
| Intersect this bounding box with the given bounding box. | |
Static Public Member Functions | |
| static __hostdev__ constexpr BBox | createCube (const CoordT &min, typename CoordT::ValueType dim) noexcept |
Return a cube-shaped BBox with min corner min and edge length dim. | |
| static __hostdev__ constexpr BBox | createCube (typename CoordT::ValueType min, typename CoordT::ValueType max) noexcept |
Return a cube-shaped BBox spanning min..max in every axis. | |
Public Attributes | |
| CoordT | mCoord [2] |
Partial template specialization for integer coordinate types.
|
inlineconstexprnoexcept |
Default construct an empty bbox (min = CoordT::max(), max = CoordT::min()).
|
inlineconstexprnoexcept |
Construct from explicit min / max integer corners.
|
inlineconstexprnoexcept |
Splitting constructor (used by parallel range-based iteration).
Halves the box along its longest axis: other keeps the upper half, the newly constructed BBox is the lower half. The SplitT tag type is ignored; it exists so this overload doesn't collide with the copy constructor.
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
Iterator positioned at the min corner.
|
inlinestaticnodiscardconstexprnoexcept |
Return a cube-shaped BBox with min corner min and edge length dim.
|
inlinestaticnodiscardconstexprnoexcept |
Return a cube-shaped BBox spanning min..max in every axis.
|
inlinenodiscardconstexprnoexcept |
Return the per-axis extent (max - min + 1 when non-empty, else 0).
|
inlinenodiscardconstexprnoexcept |
Return true if this bounding box is empty, e.g. uninitialized.
|
inlinenodiscardconstexprnoexcept |
One-past-the-end iterator (max corner shifted by one in x).
|
inlineconstexprnoexceptinherited |
Expand this bounding box to enclose the given bounding box.
|
inlineconstexprnoexceptinherited |
Expand this bounding box to enclose point xyz.
|
inlinenodiscardconstexprnoexcept |
Return a new instance that is expanded by the specified padding.
|
inlinenodiscardconstexprnoexcept |
Return true if the given bounding box overlaps with this bounding box.
|
inlineconstexprnoexceptinherited |
Intersect this bounding box with the given bounding box.
|
inlinenodiscardconstexprnoexcept |
Return true iff the box has more than one cell along every axis.
|
inlinenodiscardconstexprnoexcept |
Return true if the given bounding box is inside this bounding box.
|
inlinenodiscardconstexprnoexcept |
Return true iff the integer coordinate p lies inside the closed box.
|
inlineconstexprnoexceptinherited |
Const accessor for the max corner.
|
inlineconstexprnoexceptinherited |
Mutable accessor for the max corner.
|
inlineconstexprnoexceptinherited |
Const accessor for the min corner.
|
inlineconstexprnoexceptinherited |
Mutable accessor for the min corner.
|
inlinenodiscardconstexprnoexcept |
Convert this BBox to boolean true if it is not empty.
|
inlinenodiscardconstexprnoexceptinherited |
Inequality on the two corner points.
|
inlinenodiscardconstexprnoexceptinherited |
Equality on the two corner points.
|
inlineconstexprnoexceptinherited |
Indexed corner access: i = 0 returns min, i = 1 returns max.
|
inlineconstexprnoexceptinherited |
Mutable variant of operator[].
|
inlinenodiscardconstexprnoexcept |
Transform this coordinate bounding box by the specified map.
| map | mapping of index to world coordinates |
|
inlineconstexprnoexceptinherited |
Translate (rigid-shift) both corners by xyz; return *this.
|
inlinenodiscardconstexprnoexcept |
| CoordT mCoord[2] |