OpenVDB: VolumeExecutable Class Reference

OpenVDB 8.0.0

Public Types | Public Member Functions | Friends | List of all members
VolumeExecutable Class Reference

Object that encapsulates compiled AX code which can be executed on a collection of VDB volume grids. More...

`#include <VolumeExecutable.h>`

## Public Types
enum | IterType { ON, OFF, ALL }
using | Ptr = std::shared_ptr< VolumeExecutable >

## Public Member Functions
| ~VolumeExecutable ()
| VolumeExecutable (const VolumeExecutable &other)
| Copy constructor. Shares the LLVM constructs but deep copies the settings. Multiple copies of an executor can be used at the same time safely. More...
void | execute (openvdb::GridPtrVec &grids) const
| Execute AX code on target grids. More...
void | execute (openvdb::GridBase &grid) const
void | setCreateMissing (const bool flag)
| Set the behaviour when missing grids are accessed. Default behaviour is true, which creates them with default transforms and background values. More...
bool | getCreateMissing () const
void | setTreeExecutionLevel (const Index level)
| Set the execution level for this executable. This controls what nodes are processed when execute is called. Possible values depend on the OpenVDB configuration in use however a value of 0 is the default and will always correspond to the lowest level (leaf-level). More...
Index | getTreeExecutionLevel () const
void | setValueIterator (const IterType &iter)
| Set the value iterator type to use with this executable. Options are ON, OFF, ALL. Default is ON. More...
IterType | getValueIterator () const
void | setGrainSize (const size_t grain)
| Set the threading grain size. Default is 1. A value of 0 has the effect of disabling multi-threading. More...
size_t | getGrainSize () const

## Friends
class | Compiler
class | ::TestVolumeExecutable

## Detailed Description

Object that encapsulates compiled AX code which can be executed on a collection of VDB volume grids.

## Member Typedef Documentation

## ◆ Ptr

using Ptr = std::shared_ptr<VolumeExecutable>

## Member Enumeration Documentation

## ◆ IterType

enum IterType
| strong

Enumerator
ON |
OFF |
ALL |

## Constructor & Destructor Documentation

## ◆ ~VolumeExecutable()

~VolumeExecutable | ( |  | ) |

## ◆ VolumeExecutable()

VolumeExecutable | ( | const VolumeExecutable & | other | ) |

Copy constructor. Shares the LLVM constructs but deep copies the settings. Multiple copies of an executor can be used at the same time safely.

## Member Function Documentation

## ◆ execute() [1/2]

void execute | ( | openvdb::GridBase & | grid | ) | const

## ◆ execute() [2/2]

void execute | ( | openvdb::GridPtrVec & | grids | ) | const

Execute AX code on target grids.

## ◆ getCreateMissing()

bool getCreateMissing | ( |  | ) | const

Returns
  Whether this executable will generate new grids.

## ◆ getGrainSize()

size_t getGrainSize | ( |  | ) | const

Returns
  The current grain size

## ◆ getTreeExecutionLevel()

Index getTreeExecutionLevel | ( |  | ) | const

Returns
  The tree execution level. Default is 0 i.e. the leaf level

## ◆ getValueIterator()

IterType getValueIterator | ( |  | ) | const

Returns
  The current value iterator type

## ◆ setCreateMissing()

void setCreateMissing | ( | const bool | flag | ) |

Set the behaviour when missing grids are accessed. Default behaviour is true, which creates them with default transforms and background values.

Parameters

  flag | Enables or disables the creation of missing attributes

## ◆ setGrainSize()

void setGrainSize | ( | const size_t | grain | ) |

Set the threading grain size. Default is 1. A value of 0 has the effect of disabling multi-threading.

Parameters

  grain | The grain size

## ◆ setTreeExecutionLevel()

void setTreeExecutionLevel | ( | const Index | level | ) |

Set the execution level for this executable. This controls what nodes are processed when execute is called. Possible values depend on the OpenVDB configuration in use however a value of 0 is the default and will always correspond to the lowest level (leaf-level).

Note
  A value larger that the number of levels in the tree (i.e. larger than the tree depth) will cause this method to throw a runtime error.

Warning
  Executing over tiles with compiled code designed for voxel level access may produce incorrect results. This is typically the case when accessing VDBs with mismatching topology. Consider voxelizing tiles where necessary.

Parameters

  level | The tree execution level to set

## ◆ setValueIterator()

void setValueIterator | ( | const IterType & | iter | ) |

Set the value iterator type to use with this executable. Options are ON, OFF, ALL. Default is ON.

Parameters

  iter | The value iterator type to set

## Friends And Related Function Documentation

## ◆ ::TestVolumeExecutable

friend class ::TestVolumeExecutable
| friend

## ◆ Compiler

friend class Compiler
| friend

The documentation for this class was generated from the following file:

- VolumeExecutable.h