Class Texture3D
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.Drawable
-
- org.jzy3d.plot3d.primitives.volume.Texture3D
-
- All Implemented Interfaces:
IMultiColorable
,IGLBindedResource
,IGLRenderer
,ISortableDraw
public class Texture3D extends Drawable implements IGLBindedResource, IMultiColorable
-
-
Field Summary
-
Fields inherited from class org.jzy3d.plot3d.primitives.Drawable
bbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, spaceTransformer, transform, transformBefore
-
-
Constructor Summary
Constructors Constructor Description Texture3D(Buffer buffer, int[] shape, float min, float max, ColorMapper mapper, BoundingBox3d bbox)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyGeometryTransform(Transform transform)
void
bind(com.jogamp.opengl.GL gl)
void
dispose()
Performs all required operation to cleanup the Drawable.void
draw(IPainter painter)
Call OpenGL2 routines for rendering the object.ColorMapper
getColorMapper()
Get the colormapper.boolean
hasMountedOnce()
Return true if mount(...) has been called at least one timevoid
mount(IPainter painter)
Mount resources to gl contextvoid
setColorMapper(ColorMapper mapper)
Set the colormapper that will be used by the Drawable, instead of using precomputed colors.void
setMax(Number max)
void
setMin(Number min)
void
setTextureData(com.jogamp.opengl.GL gl, Buffer buffer, int[] shape)
void
updateBounds()
-
Methods inherited from class org.jzy3d.plot3d.primitives.Drawable
addDrawableListener, doDrawBoundsIfDisplayed, doTransform, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBoundingBoxColor, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, negative, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString, toString
-
-
-
-
Constructor Detail
-
Texture3D
public Texture3D(Buffer buffer, int[] shape, float min, float max, ColorMapper mapper, BoundingBox3d bbox)
-
-
Method Detail
-
mount
public void mount(IPainter painter)
Description copied from interface:IGLBindedResource
Mount resources to gl context- Specified by:
mount
in interfaceIGLBindedResource
-
setMin
public void setMin(Number min)
-
setMax
public void setMax(Number max)
-
hasMountedOnce
public boolean hasMountedOnce()
Description copied from interface:IGLBindedResource
Return true if mount(...) has been called at least one time- Specified by:
hasMountedOnce
in interfaceIGLBindedResource
-
bind
public void bind(com.jogamp.opengl.GL gl) throws com.jogamp.opengl.GLException
- Throws:
com.jogamp.opengl.GLException
-
setTextureData
public void setTextureData(com.jogamp.opengl.GL gl, Buffer buffer, int[] shape)
- Parameters:
gl
-buffer
- texture datashape
- the dimensions of 3d texture.
-
draw
public void draw(IPainter painter)
Description copied from class:Drawable
Call OpenGL2 routines for rendering the object.- Specified by:
draw
in interfaceIGLRenderer
- Specified by:
draw
in classDrawable
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransform
in classDrawable
-
dispose
public void dispose()
Description copied from class:Drawable
Performs all required operation to cleanup the Drawable.
-
updateBounds
public void updateBounds()
- Specified by:
updateBounds
in classDrawable
-
getColorMapper
public ColorMapper getColorMapper()
Description copied from interface:IMultiColorable
Get the colormapper.- Specified by:
getColorMapper
in interfaceIMultiColorable
-
setColorMapper
public void setColorMapper(ColorMapper mapper)
Description copied from interface:IMultiColorable
Set the colormapper that will be used by the Drawable, instead of using precomputed colors.- Specified by:
setColorMapper
in interfaceIMultiColorable
-
-