|
| Dense (const CoordBBox &bbox) |
| Construct a dense grid with a given range of coordinates. More...
|
|
| Dense (const CoordBBox &bbox, const ValueT &value) |
| Construct a dense grid with a given range of coordinates and initial value. More...
|
|
| Dense (const CoordBBox &bbox, ValueT *data) |
| Construct a dense grid that wraps an external array. More...
|
|
| Dense (const Coord &dim, const Coord &min=Coord(0)) |
| Construct a dense grid with a given origin and dimensions. More...
|
|
ValueT * | data () |
| Return a raw pointer to this grid's value array. More...
|
|
const ValueT * | data () const |
| Return a raw pointer to this grid's value array. More...
|
|
const CoordBBox & | bbox () const |
| Return the bounding box of the signed index domain of this grid. More...
|
|
const Coord & | origin () const |
| Return the grid's origin in index coordinates. More...
|
|
Index64 | valueCount () const |
| Return the number of voxels contained in this grid. More...
|
|
void | setValue (size_t offset, const ValueT &value) |
| Set the value of the voxel at the given array offset. More...
|
|
const ValueT & | getValue (size_t offset) const |
| Return a const reference to the value of the voxel at the given array offset. More...
|
|
ValueT & | getValue (size_t offset) |
| Return a non-const reference to the value of the voxel at the given array offset. More...
|
|
void | setValue (size_t i, size_t j, size_t k, const ValueT &value) |
| Set the value of the voxel at unsigned index coordinates (i, j, k). More...
|
|
const ValueT & | getValue (size_t i, size_t j, size_t k) const |
| Return a const reference to the value of the voxel at unsigned index coordinates (i, j, k). More...
|
|
ValueT & | getValue (size_t i, size_t j, size_t k) |
| Return a non-const reference to the value of the voxel at unsigned index coordinates (i, j, k). More...
|
|
void | setValue (const Coord &xyz, const ValueT &value) |
| Set the value of the voxel at the given signed coordinates. More...
|
|
const ValueT & | getValue (const Coord &xyz) const |
| Return a const reference to the value of the voxel at the given signed coordinates. More...
|
|
ValueT & | getValue (const Coord &xyz) |
| Return a non-const reference to the value of the voxel at the given signed coordinates. More...
|
|
void | fill (const ValueT &value) |
| Fill this grid with a constant value. More...
|
|
size_t | coordToOffset (const Coord &xyz) const |
| Return the linear offset into this grid's value array given by the specified signed coordinates, i.e., coordinates in the space of this grid's bounding box. More...
|
|
Coord | offsetToCoord (size_t n) const |
| Return the global coordinate corresponding to the specified linear offset. More...
|
|
Index64 | memUsage () const |
| Return the memory footprint of this Dense grid in bytes. More...
|
|
void | print (const std::string &name="", std::ostream &os=std::cout) const |
| Output a human-readable description of this grid to the specified stream. More...
|
|
template<typename ValueT, MemoryLayout Layout = LayoutZYX>
class openvdb::v12_0::tools::Dense< ValueT, Layout >
Dense is a simple dense grid API used by the CopyToDense and CopyFromDense classes defined below.
Use the Dense class to efficiently produce a dense in-memory representation of an OpenVDB grid. However, be aware that a dense grid could have a memory footprint that is orders of magnitude larger than the sparse grid from which it originates.
- Note
- This class can be used as a simple wrapper for existing dense grid classes if they provide access to the raw data array.
-
This implementation allows for the 3D memory layout to be defined by the MemoryLayout template parameter (see above for definition). The default memory layout is ZYX since that's the layout used by OpenVDB grids.