OpenVDB: DenseGrid< ValueT > Class Template Reference

OpenVDB 10.0.1

Public Types | Public Member Functions | Static Public Member Functions | List of all members
DenseGrid< ValueT > Class Template Reference

Simple dense grid class. More...

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

Inherits DenseData.

## 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. More...
__hostdev__ const Vec3R & | voxelSize () const
template<typename Vec3T >
__hostdev__ Vec3T | worldToIndex (const Vec3T &xyz) const
| world to index space transformation More...
template<typename Vec3T >
__hostdev__ Vec3T | indexToWorld (const Vec3T &xyz) const
| world to index space transformation More...
template<typename Vec3T >
__hostdev__ Vec3T | indexToWorldDir (const Vec3T &dir) const
| transformation from index space direction to world space direction More...
template<typename Vec3T >
__hostdev__ Vec3T | worldToIndexDir (const Vec3T &dir) const
| transformation from world space direction to index space direction More...
template<typename Vec3T >
__hostdev__ Vec3T | indexToWorldGrad (const Vec3T &grad) const
| transform the gradient from index space to world space. More...
template<typename Vec3T >
__hostdev__ Vec3T | worldToIndexF (const Vec3T &xyz) const
| world to index space transformation More...
template<typename Vec3T >
__hostdev__ Vec3T | indexToWorldF (const Vec3T &xyz) const
| index to world space transformation More...
template<typename Vec3T >
__hostdev__ Vec3T | indexToWorldDirF (const Vec3T &dir) const
| transformation from index space direction to world space direction More...
template<typename Vec3T >
__hostdev__ Vec3T | worldToIndexDirF (const Vec3T &dir) const
| transformation from world space direction to index space direction More...
template<typename Vec3T >
__hostdev__ Vec3T | indexToWorldGradF (const Vec3T &grad) const
| Transforms the gradient from index space to world space. More...
__hostdev__ const BBox< Vec3R > & | worldBBox () const
| Computes a AABB of active values in world space. More...
__hostdev__ bool | isLevelSet () const
__hostdev__ bool | isFogVolume () const
__hostdev__ const CoordBBox & | indexBBox () const
| Computes a AABB of active values in index space. More...
__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

using ValueType = ValueT

## Constructor & Destructor Documentation

## ◆ DenseGrid()

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

## ◆ ~DenseGrid()

__hostdev__ ~DenseGrid | ( |  | ) |
| delete

## Member Function Documentation

## ◆ coordToOffset()

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

## ◆ create()

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()`
| ) |  |
| inlinestatic

## ◆ data() [1/2]

__hostdev__ DenseData * data | ( |  | ) |
| inline

## ◆ data() [2/2]

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

## ◆ getValue()

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

## ◆ gridClass()

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

## ◆ gridSize()

__hostdev__ uint64_t gridSize | ( |  | ) | const
| inline

## ◆ gridType()

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

## ◆ indexBBox()

__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()

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

world to index space transformation

## ◆ indexToWorldDir()

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

transformation from index space direction to world space direction

Warning
  assumes dir to be normalized

## ◆ indexToWorldDirF()

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

transformation from index space direction to world space direction

Warning
  assumes dir to be normalized

## ◆ indexToWorldF()

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

index to world space transformation

## ◆ indexToWorldGrad()

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

transform the gradient from index space to world space.

Applies the inverse jacobian transform map.

## ◆ indexToWorldGradF()

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

Transforms the gradient from index space to world space.

Applies the inverse jacobian transform map.

## ◆ isFogVolume()

__hostdev__ bool isFogVolume | ( |  | ) | const
| inline

## ◆ isLevelSet()

__hostdev__ bool isLevelSet | ( |  | ) | const
| inline

## ◆ isValidType()

bool isValidType
| inline

## ◆ map()

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

Return a const reference to the Map for this grid.

## ◆ max()

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

## ◆ memUsage()

__hostdev__ uint64_t memUsage | ( |  | ) | const
| inline

## ◆ min()

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

## ◆ operator=()

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

## ◆ setValue()

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

## ◆ size()

__hostdev__ uint64_t size | ( |  | ) | const
| inline

## ◆ test()

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

## ◆ values() [1/2]

__hostdev__ ValueT * values | ( |  | ) |
| inline

## ◆ values() [2/2]

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

## ◆ voxelSize()

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

## ◆ worldBBox()

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

Computes a AABB of active values in world space.

## ◆ worldToIndex()

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

world to index space transformation

## ◆ worldToIndexDir()

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

transformation from world space direction to index space direction

Warning
  assumes dir to be normalized

## ◆ worldToIndexDirF()

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

transformation from world space direction to index space direction

Warning
  assumes dir to be normalized

## ◆ worldToIndexF()

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

world to index space transformation