OpenVDB 13.0.0

Loading...
Searching...
No Matches
DenseBase< ValueT, LayoutZYX > Class Template Reference

Partial template specialization of DenseBase. More...

`#include <openvdb/tools/Dense.h>`

Inheritance diagram for DenseBase< ValueT, LayoutZYX >:

## Public Member Functions
size_t | coordToOffset (size_t i, size_t j, size_t k) const
| Return the linear offset into this grid's value array given by unsigned coordinates (i, j, k), i.e., coordinates relative to the origin of this grid's bounding box.
Coord | offsetToLocalCoord (size_t n) const
| Return the local coordinate corresponding to the specified linear offset.
size_t | xStride () const
| Return the stride of the array in the x direction ( = dimY*dimZ).
size_t | yStride () const
| Return the stride of the array in the y direction ( = dimZ).

## Static Public Member Functions
static size_t | zStride ()
| Return the stride of the array in the z direction ( = 1).

## Protected Member Functions
| DenseBase (const CoordBBox &bbox)
| Protected constructor so as to prevent direct instantiation.

## Protected Attributes
const CoordBBox | mBBox
const size_t | mY
const size_t | mX

## Detailed Description

template<typename ValueT>
class openvdb::v13_0::tools::DenseBase< ValueT, LayoutZYX >

Partial template specialization of DenseBase.

Note
  ZYX is the memory-layout in VDB. It leads to nested for-loops of the order x, y, z which we find to be the most intuitive.

## Constructor & Destructor Documentation

## ◆ DenseBase()

template<typename ValueT>

DenseBase | ( | const CoordBBox & | bbox | ) |
| inline protected

Protected constructor so as to prevent direct instantiation.

## Member Function Documentation

## ◆ coordToOffset()

template<typename ValueT>

size_t coordToOffset | ( | size_t | i,
|  | size_t | j,
|  | size_t | k ) const
| inline

Return the linear offset into this grid's value array given by unsigned coordinates (i, j, k), i.e., coordinates relative to the origin of this grid's bounding box.

Warning
  The input coordinates are assume to be relative to the grid's origin, i.e. minimum of its index bounding box!

## ◆ offsetToLocalCoord()

template<typename ValueT>

Coord offsetToLocalCoord | ( | size_t | n | ) | const
| inline

Return the local coordinate corresponding to the specified linear offset.

Warning
  The returned coordinate is relative to the origin of this grid's bounding box so add dense.origin() to get absolute coordinates.

## ◆ xStride()

template<typename ValueT>

size_t xStride | ( |  | ) | const
| inline

Return the stride of the array in the x direction ( = dimY*dimZ).

Note
  This method is required by both CopyToDense and CopyFromDense.

## ◆ yStride()

template<typename ValueT>

size_t yStride | ( |  | ) | const
| inline

Return the stride of the array in the y direction ( = dimZ).

Note
  This method is required by both CopyToDense and CopyFromDense.

## ◆ zStride()

template<typename ValueT>

size_t zStride | ( |  | ) |
| inline static

Return the stride of the array in the z direction ( = 1).

Note
  This method is required by both CopyToDense and CopyFromDense.

## Member Data Documentation

## ◆ mBBox

template<typename ValueT>

const CoordBBox mBBox
| protected

## ◆ mX

template<typename ValueT>

const size_t mX
| protected

## ◆ mY

template<typename ValueT>

const size_t mY
| protected