toxi.volume
Class VolumetricSpace

java.lang.Object
  extended by toxi.volume.VolumetricSpace

public class VolumetricSpace
extends java.lang.Object


Constructor Summary
VolumetricSpace(toxi.geom.Vec3D scale, int resX, int resY, int resZ)
           
 
Method Summary
 void clear()
           
 void closeSides()
           
 float[] getData()
           
 int getIndexFor(int x, int y, int z)
           
 toxi.geom.Vec3D getResolution()
           
 toxi.geom.Vec3D getScale()
           
 float getVoxelAt(int x, int y, int z)
           
 void saveData(java.lang.String fn)
          Saves volume data float array in raw binary format.
 void setScale(toxi.geom.Vec3D scale)
           
 void setVolumeSidesTo(float density)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VolumetricSpace

public VolumetricSpace(toxi.geom.Vec3D scale,
                       int resX,
                       int resY,
                       int resZ)
Method Detail

clear

public void clear()

closeSides

public void closeSides()

getData

public float[] getData()

getIndexFor

public int getIndexFor(int x,
                       int y,
                       int z)

getResolution

public toxi.geom.Vec3D getResolution()

getScale

public toxi.geom.Vec3D getScale()
Returns:
the scale

getVoxelAt

public float getVoxelAt(int x,
                        int y,
                        int z)

saveData

public void saveData(java.lang.String fn)
Saves volume data float array in raw binary format.

Parameters:
fn - absolute path/filename to save to

setScale

public void setScale(toxi.geom.Vec3D scale)
Parameters:
scale - the scale to set

setVolumeSidesTo

public void setVolumeSidesTo(float density)