#include <volumeaccessors.h>
GridAccessorInterface allows to access volume data.
Public Member Functions | |
MAXON_METHOD Result< void > | Init (const Volume &volumeObject, VOLUMESAMPLER sampler=VOLUMESAMPLER::NEAREST) |
MAXON_METHOD Result< void > | InitWithWriteAccess (Volume &volumeObject, VOLUMESAMPLER sampler=VOLUMESAMPLER::NEAREST) |
MAXON_METHOD Result< void > | SetSampler (VOLUMESAMPLER sampler) |
MAXON_METHOD TYPE | GetValue (const IntVector32 &coords) const |
MAXON_METHOD TYPE | GetValue (const Vector &position) const |
MAXON_METHOD Vector | GetCoords (const Vector &position) const |
MAXON_METHOD Result< void > | SetValue (const IntVector32 &coords, const TYPE val) |
MAXON_METHOD Result< void > | SetValueOnly (const IntVector32 &coords, const TYPE val) |
MAXON_METHOD Result< void > | SetActiveState (const IntVector32 &coords, Bool state) |
MAXON_METHOD Bool | GetActiveState (const IntVector32 &coords) const |
Static Public Member Functions | |
static MAXON_FUNCTION Result< GridAccessorRef< TYPE > > | Create () |
Private Member Functions | |
MAXON_INTERFACE_SIMPLE_VIRTUAL (GridAccessorInterface, MAXON_REFERENCE_NORMAL) | |
|
private |
|
static |
MAXON_METHOD Result<void> Init | ( | const Volume & | volumeObject, |
VOLUMESAMPLER | sampler = VOLUMESAMPLER::NEAREST |
||
) |
Initialize the accessor with a volume object in a read only state.
[in] | volumeObject | The volume object to initialize this accessor for. |
[in] | sampler | The used sampler for position sampling. |
MAXON_METHOD Result<void> InitWithWriteAccess | ( | Volume & | volumeObject, |
VOLUMESAMPLER | sampler = VOLUMESAMPLER::NEAREST |
||
) |
Initialize the accessor with a volume object with both read and write access.
[in] | volumeObject | The volume object to initialize this accessor for. |
[in] | sampler | The sampler to use for position sampling. |
MAXON_METHOD Result<void> SetSampler | ( | VOLUMESAMPLER | sampler | ) |
Changes the sampler Type.
[in] | sampler | The used sampler for position sampling. |
MAXON_METHOD TYPE GetValue | ( | const IntVector32 & | coords | ) | const |
Retrieve the value of the volume at the given voxel index.
[in] | coords | The voxel index at which the data should be retrieved. |
MAXON_METHOD TYPE GetValue | ( | const Vector & | position | ) | const |
Retrieve the value of the volume at the given world position.
[in] | position | The world position at which the data should be retrieved. |
MAXON_METHOD Vector GetCoords | ( | const Vector & | position | ) | const |
Retrieve the sub voxel index position of the volume at the given world position.
[in] | position | The world position at which the sub voxel index position should be retrieved. |
MAXON_METHOD Result<void> SetValue | ( | const IntVector32 & | coords, |
const TYPE | val | ||
) |
Sets a voxel value at a voxel index.
[in] | coords | The voxel index at which the value will be set. |
[in] | val | The value to set. |
MAXON_METHOD Result<void> SetValueOnly | ( | const IntVector32 & | coords, |
const TYPE | val | ||
) |
Sets a voxel value at a voxel index.
[in] | coords | The voxel index at which the value will be set. |
[in] | val | The value to set. |
MAXON_METHOD Result<void> SetActiveState | ( | const IntVector32 & | coords, |
Bool | state | ||
) |
Sets the active state of a voxel at a voxel index.
[in] | coords | The voxel index at which the active state will be set. |
[in] | state | The state to set, true means active, false inactive. |
MAXON_METHOD Bool GetActiveState | ( | const IntVector32 & | coords | ) | const |
Retrieve the active state of a voxel at a voxel index.
[in] | coords | The voxel index at which the active state will be checked. |