org.jzy3d.plot3d.primitives.vbo
Class DrawableVBO
java.lang.Object
org.jzy3d.plot3d.primitives.AbstractDrawable
org.jzy3d.plot3d.primitives.vbo.DrawableVBO
- All Implemented Interfaces:
- IGLBindedResource, IGLRenderer, ISortableDraw
public class DrawableVBO
- extends AbstractDrawable
- implements IGLBindedResource
A DrawableVBO
is able to efficiently large collection of geometries.
- Author:
- Martin Pernollet
Method Summary |
void |
applyGeometryTransform(Transform transform)
|
protected void |
configure(javax.media.opengl.GL gl)
|
void |
doConfigure(int pointer,
int size)
|
void |
doConfigure(int pointer,
int size,
int byteOffset,
int normalOffset,
int dimensions)
|
protected void |
doDrawElements(javax.media.opengl.GL gl)
|
void |
doLoadArrayBuffer(javax.media.opengl.GL gl,
FloatBuffer vertices)
|
void |
doLoadArrayBuffer(javax.media.opengl.GL gl,
int vertexSize,
FloatBuffer vertices)
|
void |
doLoadElementBuffer(javax.media.opengl.GL gl,
IntBuffer indices)
|
void |
doLoadElementBuffer(javax.media.opengl.GL gl,
int indexSize,
IntBuffer indices)
|
void |
doSetBoundingBox(BoundingBox3d bounds)
|
void |
draw(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu,
Camera cam)
Call OpenGL2 routines for rendering the object. |
Color |
getColor()
|
protected int |
getGeometry()
|
boolean |
hasMountedOnce()
Return true if mount(...) has been called at least one time |
void |
mount(javax.media.opengl.GL gl)
Mount resources to gl context |
void |
setColor(Color color)
|
void |
setData(javax.media.opengl.GL2 gl,
IntBuffer indices,
FloatBuffer vertices,
BoundingBox3d bounds,
int pointer)
|
void |
setData(javax.media.opengl.GL gl,
IntBuffer indices,
FloatBuffer vertices,
BoundingBox3d bounds)
|
void |
updateBounds()
|
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable |
addDrawableListener, call, call, callWithAlphaFactor, dispose, doDrawBounds, doTransform, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBoundingBoxColor, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, negative, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setTransform, setTransformBefore, toString, toString |
loader
protected IGLLoader<DrawableVBO> loader
byteOffset
protected int byteOffset
normalOffset
protected int normalOffset
dimensions
protected int dimensions
size
protected int size
pointer
protected int pointer
arrayName
protected int[] arrayName
elementName
protected int[] elementName
hasMountedOnce
protected boolean hasMountedOnce
color
protected Color color
DrawableVBO
public DrawableVBO(IGLLoader<DrawableVBO> loader)
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
draw
public void draw(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu,
Camera cam)
- Description copied from class:
AbstractDrawable
- Call OpenGL2 routines for rendering the object.
- Specified by:
draw
in interface IGLRenderer
- Specified by:
draw
in class AbstractDrawable
- Parameters:
gl
- GL2 contextglu
- GLU contextcam
- a reference to a shooting Camera.
configure
protected void configure(javax.media.opengl.GL gl)
doDrawElements
protected void doDrawElements(javax.media.opengl.GL gl)
getGeometry
protected int getGeometry()
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransform
in class AbstractDrawable
updateBounds
public void updateBounds()
- Specified by:
updateBounds
in class AbstractDrawable
mount
public void mount(javax.media.opengl.GL gl)
- Description copied from interface:
IGLBindedResource
- Mount resources to gl context
- Specified by:
mount
in interface IGLBindedResource
setData
public void setData(javax.media.opengl.GL gl,
IntBuffer indices,
FloatBuffer vertices,
BoundingBox3d bounds)
setData
public void setData(javax.media.opengl.GL2 gl,
IntBuffer indices,
FloatBuffer vertices,
BoundingBox3d bounds,
int pointer)
doConfigure
public void doConfigure(int pointer,
int size)
doConfigure
public void doConfigure(int pointer,
int size,
int byteOffset,
int normalOffset,
int dimensions)
doLoadArrayBuffer
public void doLoadArrayBuffer(javax.media.opengl.GL gl,
FloatBuffer vertices)
doLoadArrayBuffer
public void doLoadArrayBuffer(javax.media.opengl.GL gl,
int vertexSize,
FloatBuffer vertices)
doLoadElementBuffer
public void doLoadElementBuffer(javax.media.opengl.GL gl,
IntBuffer indices)
doLoadElementBuffer
public void doLoadElementBuffer(javax.media.opengl.GL gl,
int indexSize,
IntBuffer indices)
doSetBoundingBox
public void doSetBoundingBox(BoundingBox3d bounds)
getColor
public Color getColor()
setColor
public void setColor(Color color)
Copyright © 2013. All rights reserved.