Package toxi.volume
Class HashIsoSurface
java.lang.Object
toxi.volume.HashIsoSurface
- All Implemented Interfaces:
IsoSurface
HashMap based implementation of the IsoSurface interface. More memory
efficient than
ArrayIsoSurface and so better suited for very
high-resolution volumes.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHashIsoSurface(VolumetricSpace volume) Creates a new instance using the expected default vertex density of 50%.HashIsoSurface(VolumetricSpace volume, float density) Creates a new instance using the given expected vertex density. -
Method Summary
Modifier and TypeMethodDescriptioncomputeSurfaceMesh(Mesh3D mesh, float iso) Computes the surface mesh for the given iso value.voidreset()Resets mesh vertices to default positions and clears face index.voidsetExpectedDensity(float density)
-
Field Details
-
isoValue
public float isoValue
-
-
Constructor Details
-
HashIsoSurface
Creates a new instance using the expected default vertex density of 50%.- Parameters:
volume-- See Also:
-
HashIsoSurface
Creates a new instance using the given expected vertex density.- Parameters:
volume-- See Also:
-
-
Method Details
-
computeSurfaceMesh
Description copied from interface:IsoSurfaceComputes the surface mesh for the given iso value. An existing mesh container can be reused (will be cleared) or created automatically (if null). In the latter case a simpleTriangleMeshinstance is created.- Specified by:
computeSurfaceMeshin interfaceIsoSurface- Parameters:
mesh- existing mesh container or nulliso- surface iso value- Returns:
- Mesh3D instance
-
reset
public void reset()Resets mesh vertices to default positions and clears face index. Needs to be called inbetween successive calls tocomputeSurfaceMesh(Mesh3D, float).- Specified by:
resetin interfaceIsoSurface
-
setExpectedDensity
public void setExpectedDensity(float density)
-