Class Texture3D

    • Field Detail

      • texID

        protected int texID
        The GL texture ID.
      • buffer

        protected Buffer buffer
      • shape

        protected int[] shape
      • mounted

        protected boolean mounted
      • min

        protected float min
      • max

        protected float max
      • disposed

        protected boolean disposed
    • Constructor Detail

      • Texture3D

        public Texture3D​(Buffer buffer,
                         int[] shape,
                         float min,
                         float max,
                         ColorMapper mapper,
                         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
        min - the minimum V value provided in the input buffer which must be set consistently with the colormapper
        max - the maximum V value provided in the input buffer which must be set consistently with the colormapper
        mapper - the colormap handler that will apply a colormap to a value range
        bbox - the real world range of each axis, since the input buffer provide tuples with index and not coordinates
    • Method Detail

      • setMin

        public void setMin​(Number min)
      • setMax

        public void setMax​(Number max)
      • bind

        public void bind​(com.jogamp.opengl.GL gl)
                  throws com.jogamp.opengl.GLException
        Throws:
        com.jogamp.opengl.GLException
      • unbind

        public void unbind​(com.jogamp.opengl.GL gl)
      • setTextureData

        public void setTextureData​(com.jogamp.opengl.GL gl,
                                   Buffer buffer,
                                   int[] shape)
        Load buffer data into memory
        Parameters:
        gl -
        buffer - texture data
        shape - the dimensions of 3d texture.
      • validateTexID

        protected boolean validateTexID​(com.jogamp.opengl.GL gl,
                                        boolean throwException)
      • 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
      • dispose

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