public class VoxelDataAdapter extends Object
Constructor and Description |
---|
VoxelDataAdapter(PApplet processing,
int w,
int h,
int d)
The Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
calculate(float level)
Calculate the mesh corresponding to the level value.
|
void |
draw()
calls the draw() method of the voxellib.Mesh
|
void |
saveAsStl(String fileName)
calls the saveAsStl() method of the voxellib.Mesh
|
void |
set(int x,
int y,
int z,
float val)
Used to set values of individual voxels
|
public VoxelDataAdapter(PApplet processing, int w, int h, int d)
processing
- the PAplet used for drawingw
- width in voxelsh
- height in voxelsd
- depth in voxelspublic void set(int x, int y, int z, float val)
x
- the x coordinate of the voxel to sety
- the y coordinate of the voxel to setz
- the z coordinate of the voxel to setval
- the value to set the voxel topublic void calculate(float level)
level
- the level (or isolevel) used to calculate the surface using the marching cubes algorithmpublic void draw()
public void saveAsStl(String fileName)
Processing Library voxellib by Pablo Miranda Carranza. (c) 2017