#include <volume.h>
VolumeInterface represents a core volume object in cinema.
◆ MAXON_INTERFACE()
◆ CreateFromFile()
Creates a new volume from a .vdb file.
- Parameters
-
[in] | url | The url of the file. |
[in] | scale | The scale to load the volume with. |
[in] | gridIndex | The index of the grid in the file. |
- Returns
- The newly created Volume.
◆ LoadFromFile()
Loads a grid from .vdb file into this volume object.
- Parameters
-
[in] | url | The url of the file. |
[in] | scale | The scale to load the volume with. |
[in] | gridIndex | The index of the grid in the file. |
- Returns
- OK on success.
◆ WriteToFile()
Writes the attached grid to a .vdb file.
- Parameters
-
[in] | url | The url of the file. |
[in] | scale | The scale to write the volume with. |
[in] | metaData | Optional meta data to write to the file. These need to be stored with a string key in the data dictionary. |
- Returns
- OK on success.
◆ HasGrid()
Retrieve if a grid is attached to this volume.
- Returns
- True if this volume holds a grid.
◆ GetGridType()
Retrieve the datatype of this grid.
- Returns
- The GRIDTYPE of this volume.
◆ GetGridClass()
Retrieve the grid class of this grid.
- Returns
- The GRIDCLASS of this volume.
◆ SetGridClass()
Set the grid class for this grid.
- Parameters
-
[in] | gridClass | The GRIDCLASS to set for this volume. |
◆ SetGridTransform()
Set the grid transform for this grid.
- Parameters
-
[in] | newTransform | The transformation matrix to set for this volume. |
◆ GetGridTransform()
Retrieve the grid transform for this grid.
- Returns
- The transformation matrix of this volume.
◆ SetGridName()
Set the grid name for this grid.
- Parameters
-
[in] | name | The name to set for this volume. |
◆ GetGridName()
Retrieve the grid name for this grid.
- Returns
- The name of this volume.
◆ GetWorldBoundingBox()
Retrieve the bounding box of all active voxels of this grid.
- Returns
- The bounding box of the active voxels of this volume.
◆ GetActiveVoxelDim()
Retrieve the active voxel dimensions.
- Returns
- The active voxel dimensions of this volume.
◆ GetActiveVoxelCount()
Retrieve the active voxel count.
- Returns
- The amount of active voxels in this volume.
◆ GetBackground()
Retrieve the background value of the grid.
- Returns
- The background value of the grid.
◆ GetMemUsage()
Returns the amount of memory in bytes used by this volume.
- Returns
- The memory usage in bytes.
◆ GetMinMaxValues()
Returns the Min and Max values of the volume. If it is the first time being called the resulting values are being cached. Only works for numerical gridtypes. If the volume is a vector volume, the magnitude of the vectors will be used.
- Parameters
-
[in] | includeBackground | If true the volume background will be part of the Range, otherwise not. |
- Returns
- The Minimum and Maximum Value of this volume.
◆ SetVecType()
Set the Vector grid type to indicate how transformations should be applied.
- Parameters
-
[in] | gridType | The grid type to set. |
- Returns
- OK on success.
◆ GetVecType()
Get the Vector grid type to indicate how transformations should be applied.
- Returns
- The set vec grid type.
◆ MAXON_INTERFACE_SINGLE_IMPLEMENTATION
MAXON_INTERFACE_SINGLE_IMPLEMENTATION |
|
private |