|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttoxi.volume.IsoSurface
public class IsoSurface
IsoSurface class based on C version by Paul Bourke and Lingo version by myself.
Field Summary | |
---|---|
toxi.geom.Vec3D[] |
faceNormals
|
float |
isoValue
|
Constructor Summary | |
---|---|
IsoSurface(VolumetricSpace volume)
|
Method Summary | |
---|---|
void |
computeFaceNormals()
|
void |
computeSurface(float iso)
Computes the surface mesh for the given volumetric data and iso value. |
toxi.geom.mesh.TriangleMesh |
computeSurfaceMesh(toxi.geom.mesh.TriangleMesh mesh,
float iso)
|
toxi.geom.Vec3D |
getNormalForFace(int faceID)
|
int |
getNumFaces()
|
int |
getNumVertices()
|
toxi.geom.Vec3D[] |
getVerticesForFace(int faceID,
toxi.geom.Vec3D[] vertices)
Retrieves vertices for the requested mesh face/triangle. |
void |
reset()
Resets mesh vertices to default positions and clears face index. |
void |
saveAsOBJ(java.lang.String fn)
Saves the surface mesh as Wavefront OBJ format and automatically merges shared vertices. |
void |
saveAsSTL(java.lang.String fn)
Saves surface mesh as binary STL file. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float isoValue
public toxi.geom.Vec3D[] faceNormals
Constructor Detail |
---|
public IsoSurface(VolumetricSpace volume)
Method Detail |
---|
public void computeFaceNormals()
public void computeSurface(float iso)
public toxi.geom.mesh.TriangleMesh computeSurfaceMesh(toxi.geom.mesh.TriangleMesh mesh, float iso)
public toxi.geom.Vec3D getNormalForFace(int faceID)
public int getNumFaces()
public int getNumVertices()
public toxi.geom.Vec3D[] getVerticesForFace(int faceID, toxi.geom.Vec3D[] vertices)
faceID
- face indexvertices
- Vec3D array to place vertices in or null to create a new array
automatically
public void reset()
computeSurface(float)
.
public void saveAsOBJ(java.lang.String fn)
fn
- absolute path/filename to write mesh topublic void saveAsSTL(java.lang.String fn)
fn
- absolute path/filename to save to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |