public class MarchingCube extends Object
Constructor and Description |
---|
MarchingCube(float level,
Consumer<float[]> vertexEmiter)
The constructor takes a functional interface of type Consumer<float[]>.
|
Modifier and Type | Method and Description |
---|---|
void |
calculate(float[][][] voxels,
int posX,
int posY,
int posZ)
Given a grid cell and a level, calculate the triangular facets required to represent the isosurface through the cell.
|
public MarchingCube(float level, Consumer<float[]> vertexEmiter)
level
- the level we want to use to define the boundary surface.vertexEmiter
- possibly a lambda expresion for processing the verticespublic void calculate(float[][][] voxels, int posX, int posY, int posZ)
voxels
- a 3dimensional array of floatsposX
- the first index in the array where the cube is positionedposY
- the second indexposZ
- the third indexProcessing Library voxellib by Pablo Miranda Carranza. (c) 2017