Loading...
Searching...
No Matches
DenseGrid< ValueT > Class Template Reference

Simple dense grid class. More...

`#include <nanovdb/examples/benchmark/DenseGrid.h>`

Inheritance diagram for DenseGrid< ValueT >:

## Public Types

using | ValueType = ValueT

## Public Member Functions

__hostdev__ | DenseGrid (const DenseGrid &)=delete
__hostdev__ | ~DenseGrid ()=delete
__hostdev__ DenseGrid & | operator= (const DenseGrid &)=delete
__hostdev__ uint64_t | size () const
__hostdev__ uint64_t | coordToOffset (const Coord &ijk) const
__hostdev__ bool | test (const Coord &ijk) const
__hostdev__ uint64_t | memUsage () const
__hostdev__ uint64_t | gridSize () const
__hostdev__ const Coord & | min () const
__hostdev__ const Coord & | max () const
__hostdev__ bool | isValidType () const
__hostdev__ const Map & | map () const
| Return a const reference to the Map for this grid.
__hostdev__ const Vec3R & | voxelSize () const
template<typename Vec3T>
__hostdev__ Vec3T | worldToIndex (const Vec3T &xyz) const
| world to index space transformation
template<typename Vec3T>
__hostdev__ Vec3T | indexToWorld (const Vec3T &xyz) const
| world to index space transformation
template<typename Vec3T>
__hostdev__ Vec3T | indexToWorldDir (const Vec3T &dir) const
| transformation from index space direction to world space direction
template<typename Vec3T>
__hostdev__ Vec3T | worldToIndexDir (const Vec3T &dir) const
| transformation from world space direction to index space direction
template<typename Vec3T>
__hostdev__ Vec3T | indexToWorldGrad (const Vec3T &grad) const
| transform the gradient from index space to world space.
template<typename Vec3T>
__hostdev__ Vec3T | worldToIndexF (const Vec3T &xyz) const
| world to index space transformation
template<typename Vec3T>
__hostdev__ Vec3T | indexToWorldF (const Vec3T &xyz) const
| index to world space transformation
template<typename Vec3T>
__hostdev__ Vec3T | indexToWorldDirF (const Vec3T &dir) const
| transformation from index space direction to world space direction
template<typename Vec3T>
__hostdev__ Vec3T | worldToIndexDirF (const Vec3T &dir) const
| transformation from world space direction to index space direction
template<typename Vec3T>
__hostdev__ Vec3T | indexToWorldGradF (const Vec3T &grad) const
| Transforms the gradient from index space to world space.
__hostdev__ const BBox< Vec3R > & | worldBBox () const
| Computes a AABB of active values in world space.
__hostdev__ bool | isLevelSet () const
__hostdev__ bool | isFogVolume () const
__hostdev__ const CoordBBox & | indexBBox () const
| Computes a AABB of active values in index space.
__hostdev__ const GridType & | gridType () const
__hostdev__ const GridClass & | gridClass () const
__hostdev__ DenseData * | data ()
__hostdev__ const DenseData * | data () const
__hostdev__ ValueT * | values ()
__hostdev__ const ValueT * | values () const
__hostdev__ const ValueT & | getValue (const Coord &ijk) const
__hostdev__ void | setValue (const Coord &ijk, const ValueT &v)

## Static Public Member Functions

template<typename BufferT = HostBuffer>
static DenseGridHandle< BufferT > | create (Coord min, Coord max, double dx=1.0, const Vec3d &p0=Vec3d(0.0), GridClass gridClass=GridClass::Unknown, const BufferT &allocator=BufferT())

## Detailed Description

template<typename ValueT>
class nanovdb::DenseGrid< ValueT >

Simple dense grid class.

Note
  ZYX is the memory-layout in VDB. It leads to nested for-loops of the order x, y, z.

## Member Typedef Documentation

## ValueType

template<typename ValueT>

using ValueType = ValueT

## Constructor & Destructor Documentation

## DenseGrid()

template<typename ValueT>

__hostdev__ DenseGrid | ( | const DenseGrid< ValueT > & |  | ) |

delete

## ~DenseGrid()

template<typename ValueT>

__hostdev__ ~DenseGrid | ( |  | ) |

delete

## Member Function Documentation

## coordToOffset()

template<typename ValueT>

uint64_t coordToOffset | ( | const Coord & | ijk | ) | const

inline

## create()

template<typename ValueT>
template<typename BufferT>

DenseGridHandle< BufferT > create | ( | Coord | min,
|  | Coord | max,
|  | double | dx = 1.0,
|  | const Vec3d & | p0 = Vec3d(0.0),
|  | GridClass | gridClass = GridClass::Unknown,
|  | const BufferT & | allocator = BufferT() )

inline static

## data() [1/2]

template<typename ValueT>

__hostdev__ DenseData * data | ( |  | ) |

inline

## data() [2/2]

template<typename ValueT>

__hostdev__ const DenseData * data | ( |  | ) | const

inline

## getValue()

template<typename ValueT>

const ValueT & getValue | ( | const Coord & | ijk | ) | const

inline

## gridClass()

template<typename ValueT>

__hostdev__ const GridClass & gridClass | ( |  | ) | const

inline

## gridSize()

template<typename ValueT>

__hostdev__ uint64_t gridSize | ( |  | ) | const

inline

## gridType()

template<typename ValueT>

__hostdev__ const GridType & gridType | ( |  | ) | const

inline

## indexBBox()

template<typename ValueT>

__hostdev__ const CoordBBox & indexBBox | ( |  | ) | const

inline

Computes a AABB of active values in index space.

Note
  This method is returning a floating point bounding box and not a CoordBBox. This makes it more useful for clipping rays.

## indexToWorld()

template<typename ValueT>
template<typename Vec3T>

__hostdev__ Vec3T indexToWorld | ( | const Vec3T & | xyz | ) | const

inline

world to index space transformation

## indexToWorldDir()

template<typename ValueT>
template<typename Vec3T>

__hostdev__ Vec3T indexToWorldDir | ( | const Vec3T & | dir | ) | const

inline

transformation from index space direction to world space direction

Warning
  assumes dir to be normalized

## indexToWorldDirF()

template<typename ValueT>
template<typename Vec3T>

__hostdev__ Vec3T indexToWorldDirF | ( | const Vec3T & | dir | ) | const

inline

transformation from index space direction to world space direction

Warning
  assumes dir to be normalized

## indexToWorldF()

template<typename ValueT>
template<typename Vec3T>

__hostdev__ Vec3T indexToWorldF | ( | const Vec3T & | xyz | ) | const

inline

index to world space transformation

## indexToWorldGrad()

template<typename ValueT>
template<typename Vec3T>

__hostdev__ Vec3T indexToWorldGrad | ( | const Vec3T & | grad | ) | const

inline

transform the gradient from index space to world space.

Applies the inverse jacobian transform map.

## indexToWorldGradF()

template<typename ValueT>
template<typename Vec3T>

__hostdev__ Vec3T indexToWorldGradF | ( | const Vec3T & | grad | ) | const

inline

Transforms the gradient from index space to world space.

Applies the inverse jacobian transform map.

## isFogVolume()

template<typename ValueT>

__hostdev__ bool isFogVolume | ( |  | ) | const

inline

## isLevelSet()

template<typename ValueT>

__hostdev__ bool isLevelSet | ( |  | ) | const

inline

## isValidType()

template<typename ValueT>

bool isValidType | ( |  | ) | const

inline

## map()

template<typename ValueT>

__hostdev__ const Map & map | ( |  | ) | const

inline

Return a const reference to the Map for this grid.

## max()

template<typename ValueT>

__hostdev__ const Coord & max | ( |  | ) | const

inline

## memUsage()

template<typename ValueT>

__hostdev__ uint64_t memUsage | ( |  | ) | const

inline

## min()

template<typename ValueT>

__hostdev__ const Coord & min | ( |  | ) | const

inline

## operator=()

template<typename ValueT>

__hostdev__ DenseGrid & operator= | ( | const DenseGrid< ValueT > & |  | ) |

delete

## setValue()

template<typename ValueT>

void setValue | ( | const Coord & | ijk,
|  | const ValueT & | v )

inline

## size()

template<typename ValueT>

__hostdev__ uint64_t size | ( |  | ) | const

inline

## test()

template<typename ValueT>

bool test | ( | const Coord & | ijk | ) | const

inline

## values() [1/2]

template<typename ValueT>

__hostdev__ ValueT * values | ( |  | ) |

inline

## values() [2/2]

template<typename ValueT>

__hostdev__ const ValueT * values | ( |  | ) | const

inline

## voxelSize()

template<typename ValueT>

__hostdev__ const Vec3R & voxelSize | ( |  | ) | const

inline

## worldBBox()

template<typename ValueT>

__hostdev__ const BBox< Vec3R > & worldBBox | ( |  | ) | const

inline

Computes a AABB of active values in world space.

## worldToIndex()

template<typename ValueT>
template<typename Vec3T>

__hostdev__ Vec3T worldToIndex | ( | const Vec3T & | xyz | ) | const

inline

world to index space transformation

## worldToIndexDir()

template<typename ValueT>
template<typename Vec3T>

__hostdev__ Vec3T worldToIndexDir | ( | const Vec3T & | dir | ) | const

inline

transformation from world space direction to index space direction

Warning
  assumes dir to be normalized

## worldToIndexDirF()

template<typename ValueT>
template<typename Vec3T>

__hostdev__ Vec3T worldToIndexDirF | ( | const Vec3T & | dir | ) | const

inline

transformation from world space direction to index space direction

Warning
  assumes dir to be normalized

## worldToIndexF()

template<typename ValueT>
template<typename Vec3T>

__hostdev__ Vec3T worldToIndexF | ( | const Vec3T & | xyz | ) | const

inline

world to index space transformation