Package toxi.volume
Class VolumetricSpaceArray
java.lang.Object
toxi.volume.VolumetricSpace
toxi.volume.VolumetricSpaceArray
-
Field Summary
-
Constructor Summary
ConstructorDescriptionVolumetricSpaceArray
(Vec3D scale, int resX, int resY, int resZ) VolumetricSpaceArray
(Vec3D scale, int resX, int resY, int resZ, float[] data) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
float[]
getData()
final float
getVoxelAt
(int index) final float
getVoxelAt
(int x, int y, int z) void
Saves volume data float array in raw binary format.void
setData
(float[] data) void
setVolumeSidesTo
(float density) final void
setVoxelAt
(int index, float value) final void
setVoxelAt
(int x, int y, int z, float value) Methods inherited from class toxi.volume.VolumetricSpace
getIndexFor, getResolution, getScale, setScale
-
Constructor Details
-
VolumetricSpaceArray
-
VolumetricSpaceArray
-
-
Method Details
-
clear
public void clear()- Specified by:
clear
in classVolumetricSpace
-
closeSides
public void closeSides()- Overrides:
closeSides
in classVolumetricSpace
-
getData
public float[] getData() -
getVoxelAt
public final float getVoxelAt(int index) - Specified by:
getVoxelAt
in classVolumetricSpace
-
getVoxelAt
public final float getVoxelAt(int x, int y, int z) -
saveData
Saves volume data float array in raw binary format.- Parameters:
fn
- absolute path/filename to save to
-
setData
public void setData(float[] data) -
setVolumeSidesTo
public void setVolumeSidesTo(float density) -
setVoxelAt
public final void setVoxelAt(int index, float value) - Overrides:
setVoxelAt
in classVolumetricSpace
-
setVoxelAt
public final void setVoxelAt(int x, int y, int z, float value) - Overrides:
setVoxelAt
in classVolumetricSpace
-