-
首页
-
C4D R23.110 C++ SDK
GridAccessorInterface< TYPE > Class Template Reference
#include <volumeaccessors.h>
详细描述
template<typename TYPE>
class maxon::GridAccessorInterface< TYPE >
GridAccessorInterface
allows to access volume data.
成员函数文档编制
◆
MAXON_INTERFACE_SIMPLE_VIRTUAL()
◆
Create()
◆
Init()
Initialize the accessor with a volume object in a read only state.
-
注意
-
if GetValue at a world position wants to be used a VOLUMESAMPLER needs to be passed or SetSampler needs to be called.
-
参数
-
[in]
|
volumeObject
|
The volume object to initialize this accessor for.
|
[in]
|
sampler
|
The used sampler for position sampling.
|
-
返回
-
True if the accessor was initialized with a volume, false otherwise.
◆
InitWithWriteAccess()
Initialize the accessor with a volume object with both read and write access.
-
注意
-
if
GetValue()
at a world position is needed, a VOLUMESAMPLER must be passed or SetSampler needs to be called.
-
参数
-
[in]
|
volumeObject
|
The volume object to initialize this accessor for.
|
[in]
|
sampler
|
The sampler to use for position sampling.
|
-
返回
-
True if the accessor was initialized with a volume, false otherwise.
◆
SetSampler()
Changes the sampler Type.
-
参数
-
[in]
|
sampler
|
The used sampler for position sampling.
|
◆
GetValue()
[1/2]
Retrieve the value of the volume at the given voxel index.
-
参数
-
[in]
|
coords
|
The voxel index at which the data should be retrieved.
|
-
返回
-
The voxel value at the voxel index.
◆
GetValue()
[2/2]
Retrieve the value of the volume at the given world position.
-
注意
-
the returned value depends on the VOLUMESAMPLER that was set.
-
参数
-
[in]
|
position
|
The world position at which the data should be retrieved.
|
-
返回
-
The voxel value at the world position.
◆
GetCoords()
Retrieve the sub voxel index position of the volume at the given world position.
-
注意
-
this value depends on the VOLUMESAMPLER that was set.
-
参数
-
[in]
|
position
|
The world position at which the sub voxel index position should be retrieved.
|
-
返回
-
The sub voxel index position at the passed position.
◆
SetValue()
Sets a voxel value at a voxel index.
-
注意
-
this will activate a voxel
-
参数
-
[in]
|
coords
|
The voxel index at which the value will be set.
|
[in]
|
val
|
The value to set.
|
◆
SetValueOnly()
Sets a voxel value at a voxel index.
-
注意
-
same as SetValue, but this will not activate a voxel
-
参数
-
[in]
|
coords
|
The voxel index at which the value will be set.
|
[in]
|
val
|
The value to set.
|
◆
SetActiveState()
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.
|
◆
GetActiveState()
Retrieve the active state of a voxel at a voxel index.
-
参数
-
[in]
|
coords
|
The voxel index at which the active state will be checked.
|
-
返回
-
The active state of the voxel at that voxel index.