Class SphereVBO.VBOSphereMeshBuilder
java.lang.Object
org.jzy3d.plot3d.primitives.vbo.drawable.SphereVBO.VBOSphereMeshBuilder
- All Implemented Interfaces:
IGLLoader<DrawableVBO>
- Enclosing class:
SphereVBO
This load the definition of a VBO sphere object and set arrays for later rendering.
- Author:
- David Eck inspired this class with https://math.hws.edu/graphicsbook/source/jogl/ColorCubeOfSpheres.java, Martin Pernollet
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected intprotected FloatBufferprotected float[]protected FloatBufferVBO identifiers (vertex, normal) for each painter : a builder is shared by all spheres having the same geometry, which may be rendered by different charts, hence in different GL contexts.protected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint[]The vertex and normal VBO identifiers in the GL context of this painter, or null.booleanbooleanhasMountedOnce(IPainter painter) True if the VBOs have been loaded in the GL context of this painter.voidload(IPainter painter, DrawableVBO drawable)
-
Field Details
-
sphereVertexBuffer
-
sphereNormalBuffer
-
sphereVertexArray
protected float[] sphereVertexArray -
vertexVboId
protected int vertexVboId -
normalVboId
protected int normalVboId -
hasMountedOnce
protected boolean hasMountedOnce -
vboIds
-
-
Constructor Details
-
VBOSphereMeshBuilder
public VBOSphereMeshBuilder(double radius, int stacks, int slices)
-
-
Method Details
-
load
- Specified by:
loadin interfaceIGLLoader<DrawableVBO>- Throws:
Exception
-
hasMountedOnce
public boolean hasMountedOnce() -
hasMountedOnce
True if the VBOs have been loaded in the GL context of this painter. -
getVboIds
The vertex and normal VBO identifiers in the GL context of this painter, or null.
-