|
Aviatrix3D 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.LineArray
An OpenGL LineArray.
Lines cannot be picked in the traditional manner using geometry-based picking. The only way to pick them is based on their bounds.
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.
Field Summary |
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_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG |
Fields inherited from interface org.j3d.aviatrix3d.PickableObject |
COLLIDABLE_OBJECT, GENERAL_OBJECT, PROXIMITY_OBJECT, VISIBLE_OBJECT |
Constructor Summary | |
LineArray()
Constructs a LineArray with default values. |
Method Summary | |
void |
postRender(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Restore all openGL state. |
void |
render(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Issue ogl commands needed for this renderable object. |
void |
setValidVertexCount(int count)
Set the number of vertices to the new number. |
void |
setVertices(int type,
float[] vertices,
int numValid)
Set the vertex array reference to the new array. |
Methods inherited from class org.j3d.aviatrix3d.Geometry |
addParent, boundsChanged, getBounds, getPickMask, hasTransparency, markBoundsDirty, pickBatch, pickLineRay, pickLineSegment, pickSingle, removeParent, setBounds, setPickMask |
Methods inherited from class org.j3d.aviatrix3d.NodeComponent |
addParent, getParents, hasChanged, numParents, removeParent |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
checkForCyclicChild, checkForCyclicParent, dataChanged, getUserData, isLive, setUpdateHandler, setUserData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LineArray()
Method Detail |
public void setValidVertexCount(int count) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException, InvalidWriteTimingException
In a live scene graph, can only be called during the bounds changed callback.
setValidVertexCount
in class VertexGeometry
count
- The new number, must be >= 0
java.lang.IllegalStateException
- This call was not made during the update
callback if the node is live
java.lang.IllegalArgumentException
- The number is negative
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void setVertices(int type, float[] vertices, int numValid) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException, InvalidWriteTimingException
In a live scene graph, can only be called during the bounds changed callback.
setVertices
in class VertexGeometry
type
- The number of dimensions to the coordinates - 2D, 3D or 4Dvertices
- The new array reference to use for vertex informationnumValid
- The number of valid values to use in the array
java.lang.IllegalStateException
- This call was not made during the update
callback if the node is live
java.lang.IllegalArgumentException
- The number is negative
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void render(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
gl
- The gl context to draw withglu
- The utility context to draw withpublic void postRender(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
gl
- The gl context to draw withglu
- The utility context to draw with
|
Aviatrix3D 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |