OpenVDB 10.1.0
|
Signed (i, j, k) 32-bit integer coordinate class, similar to openvdb::math::Coord. More...
#include <nanovdb/NanoVDB.h>
Public Types | |
using | ValueType = int32_t |
using | IndexType = uint32_t |
Public Member Functions | |
Coord () | |
Initialize all coordinates to zero. | |
Coord (ValueType n) | |
Initializes all coordinates to the given signed integer. | |
Coord (ValueType i, ValueType j, ValueType k) | |
Initializes coordinate to the given signed integers. | |
Coord (ValueType *ptr) | |
int32_t | x () const |
int32_t | y () const |
int32_t | z () const |
int32_t & | x () |
int32_t & | y () |
int32_t & | z () |
const ValueType & | operator[] (IndexType i) const |
Return a const reference to the given Coord component. | |
ValueType & | operator[] (IndexType i) |
Return a non-const reference to the given Coord component. | |
template<typename CoordT > | |
Coord & | operator= (const CoordT &other) |
Assignment operator that works with openvdb::Coord. | |
Coord | operator& (IndexType n) const |
Return a new instance with coordinates masked by the given unsigned integer. | |
Coord | operator<< (IndexType n) const |
Coord | operator>> (IndexType n) const |
bool | operator< (const Coord &rhs) const |
Return true if this Coord is lexicographically less than the given Coord. | |
bool | operator== (const Coord &rhs) const |
bool | operator!= (const Coord &rhs) const |
Coord & | operator&= (int n) |
Coord & | operator<<= (uint32_t n) |
Coord & | operator>>= (uint32_t n) |
Coord & | operator+= (int n) |
Coord | operator+ (const Coord &rhs) const |
Coord | operator- (const Coord &rhs) const |
Coord & | operator+= (const Coord &rhs) |
Coord & | operator-= (const Coord &rhs) |
Coord & | minComponent (const Coord &other) |
Perform a component-wise minimum with the other Coord. | |
Coord & | maxComponent (const Coord &other) |
Perform a component-wise maximum with the other Coord. | |
Coord | offsetBy (ValueType dx, ValueType dy, ValueType dz) const |
Coord | offsetBy (ValueType n) const |
template<int Log2N = 3 + 4 + 5> | |
uint32_t | hash () const |
Return a hash key derived from the existing coordinates. | |
uint8_t | octant () const |
Return the octant of this Coord. | |
Vec3< float > | asVec3s () const |
Return a single precision floating-point vector of this coordinate. | |
Vec3< double > | asVec3d () const |
Return a double precision floating-point vector of this coordinate. | |
Static Public Member Functions | |
static Coord | max () |
static Coord | min () |
static size_t | memUsage () |
static bool | lessThan (const Coord &a, const Coord &b) |
template<typename Vec3T > | |
static Coord | Floor (const Vec3T &xyz) |
Return the largest integer coordinates that are not greater than xyz (node centered conversion). | |
Signed (i, j, k) 32-bit integer coordinate class, similar to openvdb::math::Coord.
|
inline |
Initialize all coordinates to zero.
Initializes coordinate to the given signed integers.
|
inline |
Return a double precision floating-point vector of this coordinate.
|
inline |
Return a single precision floating-point vector of this coordinate.
Return the largest integer coordinates that are not greater than xyz (node centered conversion).
Return a hash key derived from the existing coordinates.
For details on this hash function please see the VDB paper. The prime numbers are modified based on the ACM Transactions on Graphics paper: "Real-time 3D reconstruction at scale using voxel hashing"
Return true if any of the components of a are smaller than the corresponding components of b.
Perform a component-wise maximum with the other Coord.
Perform a component-wise minimum with the other Coord.
Return a new instance with coordinates masked by the given unsigned integer.
Assignment operator that works with openvdb::Coord.
Return a non-const reference to the given Coord component.
Return a const reference to the given Coord component.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |