Package toxi.volume

Class HashIsoSurface

java.lang.Object
toxi.volume.HashIsoSurface
All Implemented Interfaces:
IsoSurface

public class HashIsoSurface extends Object implements IsoSurface
HashMap based implementation of the IsoSurface interface. More memory efficient than ArrayIsoSurface and so better suited for very high-resolution volumes.
  • Field Details

    • isoValue

      public float isoValue
  • Constructor Details

  • Method Details

    • computeSurfaceMesh

      public Mesh3D computeSurfaceMesh(Mesh3D mesh, float iso)
      Description copied from interface: IsoSurface
      Computes 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 simple TriangleMesh instance is created.
      Specified by:
      computeSurfaceMesh in interface IsoSurface
      Parameters:
      mesh - existing mesh container or null
      iso - 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 to computeSurfaceMesh(Mesh3D, float).
      Specified by:
      reset in interface IsoSurface
    • setExpectedDensity

      public void setExpectedDensity(float density)