| 
Aviatrix3D 2.1.0  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.NodeComponent
org.j3d.aviatrix3d.Geometry
org.j3d.aviatrix3d.VertexGeometry
org.j3d.aviatrix3d.IndexedVertexGeometry
public abstract class IndexedVertexGeometry
Base class that defines indexed geometry types.
The implementation assumes a single index is used to describe all the information needed for rendering. An index will grab the same index from vertex, normal, colour and texture arrays.
Part of the optimisation we make is to only copy into the underlying structures the exact number of coordinates, normals etc that are needed. To know this number, we need to know how many coordinates exist before attempting to set anything else. When constructing, or updating, geometry, you should always make sure that you first set the vertex list, then the sizing information for the strip or fan counts, and then set normals as needed.
Internationalisation Resource Names
| Field Summary | |
|---|---|
protected  java.nio.IntBuffer | 
indexBuffer
Buffer holding the current index list  | 
protected  int[] | 
indices
The indices defining the geometry types.  | 
protected  int | 
numIndices
The number of valid values in the indices array  | 
protected  int | 
numIndicesUsed
The number of values in the indices array that are used for a geometry  | 
protected  java.util.HashMap<javax.media.opengl.GL,java.lang.Integer> | 
vboElementIdMap
Map of VBO IDs  | 
| Fields inherited from class org.j3d.aviatrix3d.Geometry | 
|---|
bounds, implicitBounds, internalUpdater, INVALID_BOUNDS, lastParentList, parentList, pickFlags, validAlpha | 
| Fields inherited from class org.j3d.aviatrix3d.NodeComponent | 
|---|
lastParent, liveCount | 
| Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject | 
|---|
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler | 
| Fields inherited from interface org.j3d.aviatrix3d.picking.PickableObject | 
|---|
COLLIDABLE_OBJECT, GENERAL_OBJECT, PROXIMITY_OBJECT, VISIBLE_OBJECT | 
| Fields inherited from interface org.j3d.aviatrix3d.picking.PickTarget | 
|---|
CUSTOM_PICK_TYPE, GROUP_PICK_TYPE, LEAF_PICK_TYPE, SINGLE_PICK_TYPE | 
| Constructor Summary | |
|---|---|
protected  | 
IndexedVertexGeometry()
Constructs an instance.  | 
protected  | 
IndexedVertexGeometry(boolean useVbo,
                      int vboHint)
Constructs an instance.  | 
| Method Summary | |
|---|---|
 void | 
cleanup(javax.media.opengl.GL gl)
Cleanup the object now for the given GL context.  | 
protected  java.nio.IntBuffer | 
createBuffer(int size)
Convenience method to allocate a NIO buffer for the vertex handling that handles floats.  | 
protected  int | 
fillBufferData(javax.media.opengl.GL gl)
Fill VBOs with vertex buffer data.  | 
 void | 
getIndices(int[] values)
Get the sizes of the valid indexs.  | 
 int | 
getValidIndexCount()
Get the number of valid indexs that are defined for this geometry.  | 
protected  boolean | 
isVisible()
Check to see if this geometry is making the geometry visible or not.  | 
protected  void | 
recomputeBounds()
Internal method to recalculate the implicit bounds of this Node.  | 
 void | 
setIndices(int[] indexList,
           int num)
Set the number of valid indexs to use.  | 
 void | 
setVBOEnabled(boolean enabled)
Set whether Vertex Buffer Objects are used.  | 
protected  void | 
setVertexStateVBO(javax.media.opengl.GL gl)
Handles state setting when VBOs are used.  | 
| Methods inherited from class org.j3d.aviatrix3d.Geometry | 
|---|
addParent, boundsChanged, checkPickMask, getBounds, getPickableBounds, getPickMask, getPickTargetType, hasTransparency, markBoundsDirty, pickBatch, pickLineRay, pickLineSegment, pickSingle, removeParent, setBounds, setPickMask | 
| Methods inherited from class org.j3d.aviatrix3d.NodeComponent | 
|---|
addParent, getParents, numParents, removeParent | 
| Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject | 
|---|
checkForCyclicChild, checkForCyclicParent, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setUpdateHandler, setUserData | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.j3d.aviatrix3d.rendering.GeometryRenderable | 
|---|
hasTransparency, render | 
| Methods inherited from interface org.j3d.aviatrix3d.rendering.Renderable | 
|---|
equals | 
| Methods inherited from interface java.lang.Comparable | 
|---|
compareTo | 
| Field Detail | 
|---|
protected int[] indices
protected int numIndices
protected int numIndicesUsed
protected java.nio.IntBuffer indexBuffer
protected java.util.HashMap<javax.media.opengl.GL,java.lang.Integer> vboElementIdMap
| Constructor Detail | 
|---|
protected IndexedVertexGeometry()
protected IndexedVertexGeometry(boolean useVbo,
                                int vboHint)
useVbo - Should we use vertex buffer objectsvboHint - Hints for how to setup VBO.  Valid values are VBO_HINT_*| Method Detail | 
|---|
protected boolean isVisible()
isVisible in class VertexGeometryprotected void recomputeBounds()
recomputeBounds in class VertexGeometryprotected void setVertexStateVBO(javax.media.opengl.GL gl)
VertexGeometrysetVertexState(GL gl) only!
setVertexStateVBO in class VertexGeometryprotected int fillBufferData(javax.media.opengl.GL gl)
setVertexStateVBO, and should not be called
 other places. 
 Must be overridden in subclasses that has vertex data in addition to what
 is in VertexGeometry. See TriangleArray for
 examples.
fillBufferData in class VertexGeometrypublic void cleanup(javax.media.opengl.GL gl)
cleanup in interface DeletableRenderablecleanup in class VertexGeometrygl - The gl context to draw with
public void setIndices(int[] indexList,
                       int num)
                throws InvalidWriteTimingException,
                       java.lang.IllegalArgumentException
indexList - The array of indices to setnum - The number of valid items to read from the array
java.lang.IllegalArgumentException - Invalid total index count or
   individual index count < 3
InvalidWriteTimingException - An attempt was made to write outside
   of the NodeUpdateListener bounds changed callback methodpublic int getValidIndexCount()
public void getIndices(int[] values)
values - An array to copy the index values into
public void setVBOEnabled(boolean enabled)
                   throws InvalidWriteTimingException
setVBOEnabled in class VertexGeometryenabled - Should VBO's be used.
InvalidWriteTimingException - An attempt was made to write outside
   of the NodeUpdateListener data changed callback methodprotected java.nio.IntBuffer createBuffer(int size)
size - The number of floats to have in the array
  | 
Aviatrix3D 2.1.0  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||