public class Mesh extends Object
Modifier and Type | Method and Description |
---|---|
void |
draw()
It draws the mesh using PApplet.
|
void |
makeFromVoxels(boolean[][][] voxels,
float boxSize)
Generates a mesh made of quads from voxel data consisting of a
three dimensional array of boolean values.
|
void |
makeFromVoxels(float[][][] voxels,
float boxSize,
float level)
Generates a mesh made out of triangular faces from from voxel data consisting
of a three dimensional array of float values.
|
void |
saveAsStl(String fileName)
This saves the mesh as a binary .stl (sterolithography) file, that can be used
for 3D printing or otherwise to open in a modelling or CAD package.
|
public Mesh(PApplet processing)
processing
- the instance of PApplet in which it should draw.public void makeFromVoxels(boolean[][][] voxels, float boxSize)
voxels
- a 3 dimensional array of boolean valuesboxSize
- the size of each cell (same width,length and height)public void makeFromVoxels(float[][][] voxels, float boxSize, float level)
voxels
- a 3 dimensional array of boolean valuesboxSize
- the size of each cell (same width,length and height)level
- the float value used to define the isosurfacepublic void draw()
public void saveAsStl(String fileName)
fileName
- the path and name of the file we want to save. If only a filename is given
the file will be saved in the local directory of the application.Processing Library voxellib by Pablo Miranda Carranza. (c) 2017