Class Volume

java.lang.Object
org.jzy3d.plot3d.primitives.Drawable
org.jzy3d.plot3d.primitives.volume.Volume
All Implemented Interfaces:
IGLBindedResource, IGLRenderer, ISortableDraw

public class Volume extends Drawable implements IGLBindedResource
https://developer.nvidia.com/gpugems/gpugems/part-vi-beyond-triangles/chapter-39-volume-rendering-techniques https://www.codeproject.com/Articles/352270/Getting-Started-with-Volume-Rendering-using-OpenGL https://community.khronos.org/t/volume-rendering-with-3d-textures/73681
  • Field Details

    • texID

      protected int texID
      The GL texture ID.
    • buffer

      protected Buffer buffer
    • shape

      protected int[] shape
    • mounted

      protected boolean mounted
    • disposed

      protected boolean disposed
  • Constructor Details

    • Volume

      public Volume(FloatBuffer buffer, int[] shape, BoundingBox3d bbox)
      Instanciate a drawable volume.
      Parameters:
      buffer - provides (x,y,z,V) tuples where (x,y,z) are voxel index in the volume and V the value used for coloring voxels
      shape - a 3 element array indicating the number of voxels for each dimension
      bbox - the real world range of each axis, since the input buffer provide tuples with index and not coordinates
      mapper - the colormap handler that will apply a colormap to a value range
  • Method Details

    • mount

      public void mount(IPainter painter)
      Description copied from interface: IGLBindedResource
      Mount resources to gl context
      Specified by:
      mount in interface IGLBindedResource
    • hasMountedOnce

      public boolean hasMountedOnce()
      Description copied from interface: IGLBindedResource
      Return true if mount(...) has been called at least one time
      Specified by:
      hasMountedOnce in interface IGLBindedResource
    • bind

      public void bind(com.jogamp.opengl.GL2 gl) throws com.jogamp.opengl.GLException
      Throws:
      com.jogamp.opengl.GLException
    • draw

      public void draw(IPainter painter)
      Description copied from class: Drawable
      Call OpenGL2 routines for rendering the object.
      Specified by:
      draw in interface IGLRenderer
      Specified by:
      draw in class Drawable
    • applyGeometryTransform

      public void applyGeometryTransform(Transform transform)
      Specified by:
      applyGeometryTransform in class Drawable
    • dispose

      public void dispose()
      Description copied from class: Drawable
      Performs all required operation to cleanup the Drawable.
      Overrides:
      dispose in class Drawable
    • updateBounds

      public void updateBounds()
      Specified by:
      updateBounds in class Drawable