OpenVDB: MultiResGrid< TreeType >::MaskOp Struct Reference

OpenVDB 12.0.1 |

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
MultiResGrid< TreeType >::MaskOp Struct Reference

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

Inheritance diagram for MultiResGrid< TreeType >::MaskOp:

## Public Types
using | MaskT = typename TreeType::template ValueConverter<ValueMask>::Type
using | PoolType = tbb::enumerable_thread_specific<TreeType>
using | ManagerT = tree::LeafManager<const MaskT>
using | RangeT = typename ManagerT::LeafRange
using | VoxelIterT = typename ManagerT::LeafNodeType::ValueOnCIter
using | Ptr
using | ConstPtr
using | ValueType
using | ValueOnCIter
using | ValueOnIter
using | TreePtr
using | ConstTreePtr
using | GridPtr
using | ConstGridPtr
using | MetadataMap = std::map<Name, Metadata::Ptr>
using | MetaIterator = MetadataMap::iterator
using | ConstMetaIterator = MetadataMap::const_iterator
using | MetadataMap
using | MetaIterator
using | ConstMetaIterator

## Public Member Functions
| MaskOp (const TreeType &fineTree, TreeType &coarseTree, size_t grainSize=1)
void | operator() (const RangeT &range) const
Grid< TreeType >::Ptr | createGrid (float level, size_t grainSize) const
TreeType::ValueType | sampleValue (const Coord &in_ijk, size_t in_level, size_t out_level) const
TreeType::ValueType | sampleValue (const Vec3R &in_xyz, size_t in_level, size_t out_level) const
TreeType::ValueType | sampleValue (const Coord &ijk, double level) const
TreeType::ValueType | sampleValue (const Vec3R &xyz, double level) const
| MultiResGrid (size_t levels, ValueType background, double voxelSize=1.0)
| Constructor of empty grids.
| MultiResGrid (size_t levels, const Grid< TreeType > &grid, bool useInjection=false)
| Given an initial high-resolution grid this constructor generates all the coarser grids by means of restriction.
| MultiResGrid (size_t levels, GridPtr grid, bool useInjection=false)
| Given an initial high-resolution grid this constructor generates all the coarser grids by means of restriction.
size_t | numLevels () const
| Return the number of levels, i.e. trees, in this MultiResGrid.
size_t | coarsestLevel () const
| Return the level of the coarsest grid, i.e. numLevels()-1.
TreeType & | tree (size_t level)
| Return a reference to the tree at the specified level.
const TreeType & | constTree (size_t level) const
| Return a const reference to the tree at the specified level.
TreePtr | treePtr (size_t level)
| Return a shared pointer to the tree at the specified level.
ConstTreePtr | constTreePtr (size_t level) const
| Return a const shared pointer to the tree at the specified level.
TreeType & | finestTree ()
| Return a reference to the tree at the finest level.
const TreeType & | finestConstTree () const
| Return a const reference to the tree at the finest level.
TreePtr | finestTreePtr ()
| Return a shared pointer to the tree at the finest level.
ConstTreePtr | finestConstTreePtr () const
| Return a const shared pointer to the tree at the finest level.
TreeType & | coarsestTree ()
| Return a reference to the tree at the coarsest level.
const TreeType & | coarsestConstTree () const
| Return a const reference to the tree at the coarsest level.
TreePtr | coarsestTreePtr ()
| Return a shared pointer to the tree at the coarsest level.
ConstTreePtr | coarsestConstTreePtr () const
| Return a const shared pointer to the tree at the coarsest level.
GridPtr | grid (size_t level)
| Return a shared pointer to the grid at the specified integer level.
ConstGridPtr | grid (size_t level) const
| Return a const shared pointer to the grid at the specified level.
GridPtr | createGrid (float level, size_t grainSize=1) const
| Return a shared pointer to a new grid at the specified floating-point level.
Grid< TreeType >::Ptr | createGrid (float level, size_t grainSize) const
GridPtrVecPtr | grids ()
| Return a shared pointer to a vector of all the base grids in this instance of the MultiResGrid.
GridCPtrVecPtr | grids () const
| Return a const shared pointer to a vector of all the base grids in this instance of the MultiResGrid.
math::Transform & | transform ()
| Return a reference to the finest grid's transform, which might be shared with other grids.
const math::Transform & | transform () const
const math::Transform & | constTransform () const
ValueType | sampleValue (const Coord &in_ijk, size_t in_level, size_t out_level) const
| Return the value at the specified coordinate position using interpolation of the specified order into the tree at the out_level.
ValueType | sampleValue (const Vec3R &in_ijk, size_t in_level, size_t out_level) const
ValueType | sampleValue (const Coord &ijk, double level) const
| Return the value at the specified integer coordinate position and level using interpolation of the specified order.
ValueType | sampleValue (const Vec3R &xyz, double level) const
| Return the value at the specified floating-point coordinate position and level using interpolation of the specified order.
TreeType::ValueType | sampleValue (const Coord &in_ijk, size_t in_level, size_t out_level) const
TreeType::ValueType | sampleValue (const Vec3R &in_xyz, size_t in_level, size_t out_level) const
TreeType::ValueType | sampleValue (const Coord &ijk, double level) const
TreeType::ValueType | sampleValue (const Vec3R &xyz, double level) const
ValueType | prolongateVoxel (const Coord &coords, const size_t level) const
| Return the value at coordinate location in level tree from the coarser tree at level+1 using trilinear interpolation.
void | prolongateActiveVoxels (size_t destlevel, size_t grainSize=1)
ValueType | restrictVoxel (Coord ijk, const size_t level, bool useInjection=false) const
void | restrictActiveVoxels (size_t destlevel, size_t grainSize=1)
void | print (std::ostream &=std::cout, int verboseLevel=1) const
| Output a human-readable description of this MultiResGrid.
std::string | getName () const
| Return a string with the name of this MultiResGrid.
void | setName (const std::string &name)
| Set the name of this MultiResGrid.
GridClass | getGridClass () const
| Return the class of volumetric data (level set, fog volume, etc.) stored in this grid.
void | setGridClass (GridClass cls)
| Specify the class of volumetric data (level set, fog volume, etc.) stored in this grid.
void | clearGridClass ()
| Remove the setting specifying the class of this grid's volumetric data.
MetaMap::Ptr | copyMeta () const
| Return a copy of this map whose fields are shared with this map.
MetaMap::Ptr | deepCopyMeta () const
| Return a deep copy of this map that shares no data with this map.
void | readMeta (std::istream &)
| Unserialize metadata from the given stream.
void | writeMeta (std::ostream &) const
| Serialize metadata to the given stream.
void | insertMeta (const Name &, const Metadata &value)
| Insert a new metadata field or overwrite the value of an existing field.
void | insertMeta (const MetaMap &)
| Deep copy all of the metadata fields from the given map into this map.
void | removeMeta (const Name &)
| Remove the given metadata field if it exists.
Metadata::Ptr | operator[] (const Name &)
| Return a pointer to the metadata with the given name. If no such field exists, return a null pointer.
Metadata::ConstPtr | operator[] (const Name &) const
template<typename T>
T::Ptr | getMetadata (const Name &)
| Return a pointer to a TypedMetadata object of type `T` and with the given name. If no such field exists or if there is a type mismatch, return a null pointer.
template<typename T>
T::ConstPtr | getMetadata (const Name &) const
template<typename T>
T & | metaValue (const Name &)
| Return a reference to the value of type `T` stored in the given metadata field.
template<typename T>
const T & | metaValue (const Name &) const
MetaIterator | beginMeta ()
ConstMetaIterator | beginMeta () const
MetaIterator | endMeta ()
ConstMetaIterator | endMeta () const
void | clearMetadata ()
size_t | metaCount () const
std::string | str (const std::string &indent="") const
| Return a string describing this metadata map. Prefix each line with indent.
bool | operator== (const MetaMap &other) const
| Return `true` if the given map is equivalent to this map.
bool | operator!= (const MetaMap &other) const
| Return `true` if the given map is different from this map.
MetaMap::Ptr | copyMeta () const
| Return a copy of this map whose fields are shared with this map.
MetaMap::Ptr | deepCopyMeta () const
| Return a deep copy of this map that shares no data with this map.
void | readMeta (std::istream &)
| Unserialize metadata from the given stream.
void | writeMeta (std::ostream &) const
| Serialize metadata to the given stream.
void | insertMeta (const Name &, const Metadata &value)
| Insert a new metadata field or overwrite the value of an existing field.
void | insertMeta (const MetaMap &)
| Deep copy all of the metadata fields from the given map into this map.
void | removeMeta (const Name &)
| Remove the given metadata field if it exists.
Metadata::Ptr | operator[] (const Name &)
| Return a pointer to the metadata with the given name. If no such field exists, return a null pointer.
Metadata::ConstPtr | operator[] (const Name &) const
T::Ptr | getMetadata (const Name &)
| Return a pointer to a TypedMetadata object of type `T` and with the given name. If no such field exists or if there is a type mismatch, return a null pointer.
T::ConstPtr | getMetadata (const Name &) const
T & | metaValue (const Name &)
| Return a reference to the value of type `T` stored in the given metadata field.
const T & | metaValue (const Name &) const
MetaIterator | beginMeta ()
ConstMetaIterator | beginMeta () const
MetaIterator | endMeta ()
ConstMetaIterator | endMeta () const
void | clearMetadata ()
size_t | metaCount () const
std::string | str (const std::string &indent="") const
| Return a string describing this metadata map. Prefix each line with indent.
bool | operator== (const MetaMap &other) const
| Return `true` if the given map is equivalent to this map.
bool | operator!= (const MetaMap &other) const
| Return `true` if the given map is different from this map.

## Static Public Member Functions
static size_t | finestLevel ()
| Return the level of the finest grid (always 0)
static Vec3R | xyz (const Coord &in_ijk, size_t in_level, size_t out_level)
| Return the floating-point index coordinate at out_level given the index coordinate in_xyz at in_level.
static Vec3R | xyz (const Vec3R &in_xyz, size_t in_level, size_t out_level)
static Vec3R | xyz (const Vec3R &in_xyz, double in_level, double out_level)

## Public Attributes
PoolType * | mPool

## Member Typedef Documentation

## ◆ ConstGridPtr

using ConstGridPtr

## ◆ ConstMetaIterator [1/2]

using ConstMetaIterator = MetadataMap::const_iterator
| inherited

## ◆ ConstMetaIterator [2/2]

using ConstMetaIterator

## ◆ ConstPtr

using ConstPtr

## ◆ ConstTreePtr

using ConstTreePtr

## ◆ GridPtr

using GridPtr

## ◆ ManagerT

template<typename TreeType>

using ManagerT = tree::LeafManager<const MaskT>

## ◆ MaskT

template<typename TreeType>

using MaskT = typename TreeType::template ValueConverter<ValueMask>::Type

## ◆ MetadataMap [1/2]

using MetadataMap = std::map<Name, Metadata::Ptr>
| inherited

## ◆ MetadataMap [2/2]

using MetadataMap

## ◆ MetaIterator [1/2]

using MetaIterator = MetadataMap::iterator
| inherited

## ◆ MetaIterator [2/2]

using MetaIterator

## ◆ PoolType

template<typename TreeType>

using PoolType = tbb::enumerable_thread_specific<TreeType>

## ◆ Ptr

using Ptr

## ◆ RangeT

template<typename TreeType>

using RangeT = typename ManagerT::LeafRange

## ◆ TreePtr

using TreePtr

## ◆ ValueOnCIter

using ValueOnCIter

## ◆ ValueOnIter

using ValueOnIter

## ◆ ValueType

using ValueType

## ◆ VoxelIterT

template<typename TreeType>

using VoxelIterT = typename ManagerT::LeafNodeType::ValueOnCIter

## Constructor & Destructor Documentation

## ◆ MaskOp()

template<typename TreeType>

MaskOp | ( | const TreeType & | fineTree,
|  | TreeType & | coarseTree,
|  | size_t | grainSize = 1 )
| inline

## Member Function Documentation

## ◆ beginMeta() [1/4]

MetaIterator beginMeta | ( |  | ) |
| inlineinherited

## ◆ beginMeta() [2/4]

ConstMetaIterator beginMeta | ( |  | ) | const
| inlineinherited

## ◆ beginMeta() [3/4]

MetaIterator beginMeta | ( |  | ) |
| inline

## ◆ beginMeta() [4/4]

ConstMetaIterator beginMeta | ( |  | ) | const
| inline

## ◆ clearGridClass()

void clearGridClass | ( |  | ) |
| inline

Remove the setting specifying the class of this grid's volumetric data.

## ◆ clearMetadata() [1/2]

void clearMetadata | ( |  | ) |
| inlineinherited

## ◆ clearMetadata() [2/2]

void clearMetadata | ( |  | ) |
| inline

## ◆ coarsestConstTree()

const TreeType & coarsestConstTree | ( |  | ) | const
| inline

Return a const reference to the tree at the coarsest level.

## ◆ coarsestConstTreePtr()

ConstTreePtr coarsestConstTreePtr | ( |  | ) | const
| inline

Return a const shared pointer to the tree at the coarsest level.

## ◆ coarsestLevel()

size_t coarsestLevel | ( |  | ) | const
| inline

Return the level of the coarsest grid, i.e. numLevels()-1.

## ◆ coarsestTree()

TreeType & coarsestTree | ( |  | ) |
| inline

Return a reference to the tree at the coarsest level.

## ◆ coarsestTreePtr()

TreePtr coarsestTreePtr | ( |  | ) |
| inline

Return a shared pointer to the tree at the coarsest level.

## ◆ constTransform()

const math::Transform & constTransform | ( |  | ) | const
| inline

## ◆ constTree()

const TreeType & constTree | ( | size_t | level | ) | const
| inline

Return a const reference to the tree at the specified level.

Parameters

  level | The level of the tree to be returned

Note
  Level 0 is by definition the finest tree.

## ◆ constTreePtr()

TreeType::ConstPtr constTreePtr | ( | size_t | level | ) | const
| inline

Return a const shared pointer to the tree at the specified level.

Parameters

  level | The level of the tree to be returned

Note
  Level 0 is by definition the finest tree.

## ◆ copyMeta() [1/2]

MetaMap::Ptr copyMeta | ( |  | ) | const
| inherited

Return a copy of this map whose fields are shared with this map.

## ◆ copyMeta() [2/2]

MetaMap::Ptr copyMeta | ( |  | ) | const

Return a copy of this map whose fields are shared with this map.

## ◆ createGrid() [1/3]

Grid< TreeType >::Ptr createGrid | ( | float | level,
|  | size_t | grainSize ) const

## ◆ createGrid() [2/3]

Grid< TreeType >::Ptr createGrid | ( | float | level,
|  | size_t | grainSize ) const

## ◆ createGrid() [3/3]

GridPtr createGrid | ( | float | level,
|  | size_t | grainSize = 1 ) const

Return a shared pointer to a new grid at the specified floating-point level.

Parameters

  level | Floating-point level of the grid to be returned
  grainSize | Grain size for the multi-threading

Interpolation of the specified order is performed between the bracketing integer levels.

Note
  Level 0 is by definition the finest grid.

## ◆ deepCopyMeta() [1/2]

MetaMap::Ptr deepCopyMeta | ( |  | ) | const
| inherited

Return a deep copy of this map that shares no data with this map.

## ◆ deepCopyMeta() [2/2]

MetaMap::Ptr deepCopyMeta | ( |  | ) | const

Return a deep copy of this map that shares no data with this map.

## ◆ endMeta() [1/4]

MetaIterator endMeta | ( |  | ) |
| inlineinherited

## ◆ endMeta() [2/4]

ConstMetaIterator endMeta | ( |  | ) | const
| inlineinherited

## ◆ endMeta() [3/4]

MetaIterator endMeta | ( |  | ) |
| inline

## ◆ endMeta() [4/4]

ConstMetaIterator endMeta | ( |  | ) | const
| inline

## ◆ finestConstTree()

const TreeType & finestConstTree | ( |  | ) | const
| inline

Return a const reference to the tree at the finest level.

## ◆ finestConstTreePtr()

ConstTreePtr finestConstTreePtr | ( |  | ) | const
| inline

Return a const shared pointer to the tree at the finest level.

## ◆ finestLevel()

static size_t finestLevel | ( |  | ) |
| inlinestatic

Return the level of the finest grid (always 0)

## ◆ finestTree()

TreeType & finestTree | ( |  | ) |
| inline

Return a reference to the tree at the finest level.

## ◆ finestTreePtr()

TreePtr finestTreePtr | ( |  | ) |
| inline

Return a shared pointer to the tree at the finest level.

## ◆ getGridClass()

GridClass getGridClass | ( |  | ) | const
| inline

Return the class of volumetric data (level set, fog volume, etc.) stored in this grid.

## ◆ getMetadata() [1/4]

template<typename T>

T::Ptr getMetadata | ( | const Name & | name | ) |
| inlineinherited

Return a pointer to a TypedMetadata object of type `T` and with the given name. If no such field exists or if there is a type mismatch, return a null pointer.

## ◆ getMetadata() [2/4]

template<typename T>

T::ConstPtr getMetadata | ( | const Name & | name | ) | const
| inlineinherited

## ◆ getMetadata() [3/4]

T::Ptr getMetadata | ( | const Name & | name | ) |
| inline

Return a pointer to a TypedMetadata object of type `T` and with the given name. If no such field exists or if there is a type mismatch, return a null pointer.

## ◆ getMetadata() [4/4]

T::ConstPtr getMetadata | ( | const Name & | name | ) | const
| inline

## ◆ getName()

std::string getName | ( |  | ) | const
| inline

Return a string with the name of this MultiResGrid.

## ◆ grid() [1/2]

Grid< TreeType >::Ptr grid | ( | size_t | level | ) |

Return a shared pointer to the grid at the specified integer level.

Parameters

  level | Integer level of the grid to be returned

Note
  Level 0 is by definition the finest grid.

## ◆ grid() [2/2]

Grid< TreeType >::ConstPtr grid | ( | size_t | level | ) | const
| inline

Return a const shared pointer to the grid at the specified level.

Parameters

  level | The level of the grid to be returned

Note
  Level 0 is by definition the finest grid.

## ◆ grids() [1/2]

GridPtrVecPtr grids | ( |  | ) |

Return a shared pointer to a vector of all the base grids in this instance of the MultiResGrid.

This method is useful for I/O

## ◆ grids() [2/2]

GridCPtrVecPtr grids | ( |  | ) | const

Return a const shared pointer to a vector of all the base grids in this instance of the MultiResGrid.

This method is useful for I/O

## ◆ insertMeta() [1/4]

void insertMeta | ( | const MetaMap & |  | ) |
| inherited

Deep copy all of the metadata fields from the given map into this map.

Exceptions

  TypeError | if any field in the given map has the same name as but a different value type than one of this map's fields.

## ◆ insertMeta() [2/4]

void insertMeta | ( | const Name & | ,
|  | const Metadata & | value )
| inherited

Insert a new metadata field or overwrite the value of an existing field.

If a field with the given name doesn't already exist, add a new field. Otherwise, if the new value's type is the same as the existing field's value type, overwrite the existing value with new value.

Exceptions

  TypeError | if a field with the given name already exists, but its value type is not the same as the new value's
  ValueError | if the given field name is empty.

## ◆ insertMeta() [3/4]

void insertMeta | ( | const MetaMap & |  | ) |

Deep copy all of the metadata fields from the given map into this map.

Exceptions

  TypeError | if any field in the given map has the same name as but a different value type than one of this map's fields.

## ◆ insertMeta() [4/4]

void insertMeta | ( | const Name & | ,
|  | const Metadata & | value )

Insert a new metadata field or overwrite the value of an existing field.

If a field with the given name doesn't already exist, add a new field. Otherwise, if the new value's type is the same as the existing field's value type, overwrite the existing value with new value.

Exceptions

  TypeError | if a field with the given name already exists, but its value type is not the same as the new value's
  ValueError | if the given field name is empty.

## ◆ metaCount() [1/2]

size_t metaCount | ( |  | ) | const
| inlineinherited

## ◆ metaCount() [2/2]

size_t metaCount | ( |  | ) | const
| inline

## ◆ metaValue() [1/4]

template<typename T>

T & metaValue | ( | const Name & | name | ) |
| inlineinherited

Return a reference to the value of type `T` stored in the given metadata field.

Exceptions

  LookupError | if no field with the given name exists.
  TypeError | if the given field is not of type `T`.

## ◆ metaValue() [2/4]

template<typename T>

const T & metaValue | ( | const Name & | name | ) | const
| inlineinherited

## ◆ metaValue() [3/4]

T & metaValue | ( | const Name & | name | ) |
| inline

Return a reference to the value of type `T` stored in the given metadata field.

Exceptions

  LookupError | if no field with the given name exists.
  TypeError | if the given field is not of type `T`.

## ◆ metaValue() [4/4]

const T & metaValue | ( | const Name & | name | ) | const
| inline

## ◆ MultiResGrid() [1/3]

MultiResGrid | ( | size_t | levels,
|  | const Grid< TreeType > & | grid,
|  | bool | useInjection = false )

Given an initial high-resolution grid this constructor generates all the coarser grids by means of restriction.

Parameters

  levels | The number of trees in this MultiResGrid
  grid | High-resolution input grid
  useInjection | Use restriction by injection, vs full-weighting. It defaults to false and should rarely be used.

Note
  This constructor will perform a deep copy of the input grid and use it as the highest level grid.

## ◆ MultiResGrid() [2/3]

MultiResGrid | ( | size_t | levels,
|  | GridPtr | grid,
|  | bool | useInjection = false )

Given an initial high-resolution grid this constructor generates all the coarser grids by means of restriction.

Parameters

  levels | The number of trees in this MultiResGrid
  grid | High-resolution input grid
  useInjection | Use restriction by injection, vs full-weighting. It defaults to false and should rarely be used.

Note
  This constructor will steal the input grid and use it as the highest level grid. On output the grid is empty.

## ◆ MultiResGrid() [3/3]

MultiResGrid | ( | size_t | levels,
|  | ValueType | background,
|  | double | voxelSize = 1.0 )

Constructor of empty grids.

Parameters

  levels | The number of trees in this MultiResGrid
  background | Background value
  voxelSize | Size of a (uniform voxel). Defaults to one.

Note
  The multiple grids are all empty.

## ◆ numLevels()

size_t numLevels | ( |  | ) | const
| inline

Return the number of levels, i.e. trees, in this MultiResGrid.

Note
  level 0 is the finest level and numLevels()-1 is the coarsest level.

## ◆ operator!=() [1/2]

bool operator!= | ( | const MetaMap & | other | ) | const
| inlineinherited

Return `true` if the given map is different from this map.

## ◆ operator!=() [2/2]

bool operator!= | ( | const MetaMap & | other | ) | const
| inline

Return `true` if the given map is different from this map.

## ◆ operator()()

template<typename TreeType>

void operator() | ( | const RangeT & | range | ) | const
| inline

## ◆ operator==() [1/2]

bool operator== | ( | const MetaMap & | other | ) | const
| inherited

Return `true` if the given map is equivalent to this map.

## ◆ operator==() [2/2]

bool operator== | ( | const MetaMap & | other | ) | const

Return `true` if the given map is equivalent to this map.

## ◆ operator[]() [1/4]

Metadata::Ptr operator[] | ( | const Name & | name | ) |
| inlineinherited

Return a pointer to the metadata with the given name. If no such field exists, return a null pointer.

## ◆ operator[]() [2/4]

Metadata::ConstPtr operator[] | ( | const Name & | name | ) | const
| inlineinherited

## ◆ operator[]() [3/4]

Metadata::Ptr operator[] | ( | const Name & | name | ) |
| inline

Return a pointer to the metadata with the given name. If no such field exists, return a null pointer.

## ◆ operator[]() [4/4]

Metadata::ConstPtr operator[] | ( | const Name & | name | ) | const
| inline

## ◆ print()

void print | ( | std::ostream & | os = std::cout,
|  | int | verboseLevel = 1 ) const

Output a human-readable description of this MultiResGrid.

## ◆ prolongateActiveVoxels()

void prolongateActiveVoxels | ( | size_t | destlevel,
|  | size_t | grainSize = 1 )

(coarse->fine) Populates all the active voxel values in a fine (level) tree from the coarse (level+1) tree using linear interpolation This transforms multiple values of the tree in parallel

## ◆ prolongateVoxel()

TreeType::ValueType prolongateVoxel | ( | const Coord & | coords,
|  | const size_t | level ) const

Return the value at coordinate location in level tree from the coarser tree at level+1 using trilinear interpolation.

Parameters

  coords | input coords relative to the fine tree at level
  level | The fine level to receive values from the coarser level-1

Note
  Prolongation means to interpolation from coarse -> fine

## ◆ readMeta() [1/2]

void readMeta | ( | std::istream & |  | ) |
| inherited

Unserialize metadata from the given stream.

## ◆ readMeta() [2/2]

void readMeta | ( | std::istream & |  | ) |

Unserialize metadata from the given stream.

## ◆ removeMeta() [1/2]

void removeMeta | ( | const Name & |  | ) |
| inherited

Remove the given metadata field if it exists.

## ◆ removeMeta() [2/2]

void removeMeta | ( | const Name & |  | ) |

Remove the given metadata field if it exists.

## ◆ restrictActiveVoxels()

void restrictActiveVoxels | ( | size_t | destlevel,
|  | size_t | grainSize = 1 )

(fine->coarse) Populates all the active voxel values in the coarse (level) tree from the fine (level-1) tree using trilinear interpolation. For cell-centered data, this is equivalent to an average For vertex-centered data this is equivalent to transferring the data from the fine vertex directly above the coarse vertex. This transforms multiple values of the tree in parallel

## ◆ restrictVoxel()

TreeType::ValueType restrictVoxel | ( | Coord | ijk,
|  | const size_t | level,
|  | bool | useInjection = false ) const

Populate a coordinate location in level (coarse) tree from the level-1 (fine) tree using trilinear interpolation input coords are relative to the mTree[level] (coarse)

Note
  Restriction means remapping from fine -> coarse

## ◆ sampleValue() [1/12]

ValueType sampleValue | ( | const Coord & | ijk,
|  | double | level ) const

Return the value at the specified integer coordinate position and level using interpolation of the specified order.

Parameters

  ijk | Integer coordinate position relative to the highest level (=0) grid
  level | Floating-point level from which to interpolate the value.

Non-integer values of the level will use linear-interpolation between the neighboring integer levels.

## ◆ sampleValue() [2/12]

TreeType::ValueType sampleValue | ( | const Coord & | ijk,
|  | double | level ) const

## ◆ sampleValue() [3/12]

TreeType::ValueType sampleValue | ( | const Coord & | ijk,
|  | double | level ) const

## ◆ sampleValue() [4/12]

ValueType sampleValue | ( | const Coord & | in_ijk,
|  | size_t | in_level,
|  | size_t | out_level ) const

Return the value at the specified coordinate position using interpolation of the specified order into the tree at the out_level.

First in_ijk is mapped from index space at in_level to out_level, and then a value is interpolated from the tree at out_level.

Parameters

  in_ijk | Index coordinate position relative to tree at in_level
  in_level | Integer level of the input coordinate in_ijk
  out_level | Integer level of the interpolated value

## ◆ sampleValue() [5/12]

TreeType::ValueType sampleValue | ( | const Coord & | in_ijk,
|  | size_t | in_level,
|  | size_t | out_level ) const

## ◆ sampleValue() [6/12]

TreeType::ValueType sampleValue | ( | const Coord & | in_ijk,
|  | size_t | in_level,
|  | size_t | out_level ) const

## ◆ sampleValue() [7/12]

ValueType sampleValue | ( | const Vec3R & | in_ijk,
|  | size_t | in_level,
|  | size_t | out_level ) const

## ◆ sampleValue() [8/12]

TreeType::ValueType sampleValue | ( | const Vec3R & | in_xyz,
|  | size_t | in_level,
|  | size_t | out_level ) const

## ◆ sampleValue() [9/12]

TreeType::ValueType sampleValue | ( | const Vec3R & | in_xyz,
|  | size_t | in_level,
|  | size_t | out_level ) const

## ◆ sampleValue() [10/12]

ValueType sampleValue | ( | const Vec3R & | xyz,
|  | double | level ) const

Return the value at the specified floating-point coordinate position and level using interpolation of the specified order.

Parameters

  xyz | Floating-point coordinate position relative to the highest level grid
  level | Floating-point level from which to interpolate the value.

Non-integer values of the level will use linear-interpolation between the neighboring integer levels.

## ◆ sampleValue() [11/12]

TreeType::ValueType sampleValue | ( | const Vec3R & | xyz,
|  | double | level ) const

## ◆ sampleValue() [12/12]

TreeType::ValueType sampleValue | ( | const Vec3R & | xyz,
|  | double | level ) const

## ◆ setGridClass()

void setGridClass | ( | GridClass | cls | ) |
| inline

Specify the class of volumetric data (level set, fog volume, etc.) stored in this grid.

## ◆ setName()

void setName | ( | const std::string & | name | ) |
| inline

Set the name of this MultiResGrid.

## ◆ str() [1/2]

std::string str | ( | const std::string & | indent = "" | ) | const
| inherited

Return a string describing this metadata map. Prefix each line with indent.

## ◆ str() [2/2]

std::string str | ( | const std::string & | indent = "" | ) | const

Return a string describing this metadata map. Prefix each line with indent.

## ◆ transform() [1/2]

math::Transform & transform | ( |  | ) |
| inline

Return a reference to the finest grid's transform, which might be shared with other grids.

Note
  Calling setTransform() on this grid invalidates all references previously returned by this method.

Warning
  The transform is relative to the finest level (=0) grid!

## ◆ transform() [2/2]

const math::Transform & transform | ( |  | ) | const
| inline

## ◆ tree()

TreeType & tree | ( | size_t | level | ) |
| inline

Return a reference to the tree at the specified level.

Parameters

  level | The level of the tree to be returned

Note
  Level 0 is by definition the finest tree.

## ◆ treePtr()

TreeType::Ptr treePtr | ( | size_t | level | ) |
| inline

Return a shared pointer to the tree at the specified level.

Parameters

  level | The level of the tree to be returned

Note
  Level 0 is by definition the finest tree.

## ◆ writeMeta() [1/2]

void writeMeta | ( | std::ostream & |  | ) | const
| inherited

Serialize metadata to the given stream.

## ◆ writeMeta() [2/2]

void writeMeta | ( | std::ostream & |  | ) | const

Serialize metadata to the given stream.

## ◆ xyz() [1/3]

Vec3R xyz | ( | const Coord & | in_ijk,
|  | size_t | in_level,
|  | size_t | out_level )
| static

Return the floating-point index coordinate at out_level given the index coordinate in_xyz at in_level.

## ◆ xyz() [2/3]

Vec3R xyz | ( | const Vec3R & | in_xyz,
|  | double | in_level,
|  | double | out_level )
| static

## ◆ xyz() [3/3]

Vec3R xyz | ( | const Vec3R & | in_xyz,
|  | size_t | in_level,
|  | size_t | out_level )
| static

## Member Data Documentation

## ◆ mPool

template<typename TreeType>

PoolType* mPool