OpenVDB  12.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DenseBase< ValueT, LayoutXYZ > Class Template Reference

Partial template specialization of DenseBase. More...

#include <openvdb/tools/Dense.h>

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. More...
 
Coord offsetToLocalCoord (size_t n) const
 Return the index coordinate corresponding to the specified linear offset. More...
 
size_t yStride () const
 Return the stride of the array in the y direction ( = dimX). More...
 
size_t zStride () const
 Return the stride of the array in the y direction ( = dimX*dimY). More...
 

Static Public Member Functions

static size_t xStride ()
 Return the stride of the array in the x direction ( = 1). More...
 

Protected Member Functions

 DenseBase (const CoordBBox &bbox)
 Protected constructor so as to prevent direct instantiation. More...
 

Protected Attributes

const CoordBBox mBBox
 
const size_t mY
 
const size_t mZ
 

Detailed Description

template<typename ValueT>
class openvdb::v12_0::tools::DenseBase< ValueT, LayoutXYZ >

Partial template specialization of DenseBase.

Note
This is the memory-layout employed in Houdini and Maya. It leads to nested for-loops of the order z, y, x.

Constructor & Destructor Documentation

DenseBase ( const CoordBBox &  bbox)
inlineprotected

Protected constructor so as to prevent direct instantiation.

Member Function Documentation

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!
Coord offsetToLocalCoord ( size_t  n) const
inline

Return the index 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.
static size_t xStride ( )
inlinestatic

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

Note
This method is required by both CopyToDense and CopyFromDense.
size_t yStride ( ) const
inline

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

Note
This method is required by both CopyToDense and CopyFromDense.
size_t zStride ( ) const
inline

Return the stride of the array in the y direction ( = dimX*dimY).

Note
This method is required by both CopyToDense and CopyFromDense.

Member Data Documentation

const CoordBBox mBBox
protected
const size_t mY
protected
const size_t mZ
protected