org.j3d.aviatrix3d
Class IndexedTriangleFanArray
java.lang.Object
org.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.NodeComponent
org.j3d.aviatrix3d.Geometry
org.j3d.aviatrix3d.VertexGeometry
org.j3d.aviatrix3d.IndexedVertexGeometry
org.j3d.aviatrix3d.IndexedTriangleFanArray
- All Implemented Interfaces:
- PickableObject
- public class IndexedTriangleFanArray
- extends IndexedVertexGeometry
An OpenGL IndexedTriangleFanArray.
- Version:
- $Revision: 1.4 $
- Author:
- Justin Couch
Fields inherited from class org.j3d.aviatrix3d.VertexGeometry |
COLOR_3, COLOR_4, COLOR_CLEAR, COLOR_MASK, COLOR2, COLOR2_CLEAR, COLOR2_MASK, color2Buffer, color2s, colorBuffer, colors, COORDINATE_2, COORDINATE_3, COORDINATE_4, COORDINATE_CLEAR, COORDINATE_MASK, coordinates, EDGE_CLEAR, EDGE_MASK, EDGES, FOG, FOG_CLEAR, FOG_MASK, fogBuffer, fogCoords, NORMAL_CLEAR, normalBuffer, normals, NORMALS, numCoords, numTextureArrays, numTextureSets, TEXTURE_CLEAR, TEXTURE_COORDINATE_1, TEXTURE_COORDINATE_2, TEXTURE_COORDINATE_3, TEXTURE_COORDINATE_4, TEXTURE_COORDINATE_MULTI, TEXTURE_COORDINATE_SINGLE, TEXTURE_MASK, TEXTURE_SET_AVAILABLE, TEXTURE_SET_CLEAR, textureBuffer, textures, textureSets, textureTypes, vertexBuffer, vertexFormat, wkPolygon |
Method Summary |
void |
getFanCount(int[] values)
Get the sizes of the valid fans. |
int |
getValidFanCount()
Get the number of valid fans that are defined for this geometry. |
boolean |
pickLineRay(float[] origin,
float[] direction,
boolean findAny,
float[] dataOut,
int dataOutFlags)
Check for all intersections against this geometry using a line ray and
return the exact distance away of the closest picking point. |
boolean |
pickLineSegment(float[] start,
float[] end,
boolean findAny,
float[] dataOut,
int dataOutFlags)
Check for all intersections against this geometry using a line segment and
return the exact distance away of the closest picking point. |
void |
renderState(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Issue ogl commands needed for this renderable object. |
void |
restoreState(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Restore all openGL state. |
void |
setFanCount(int[] counts,
int num)
Set the number of valid fans to use. |
Methods inherited from class org.j3d.aviatrix3d.VertexGeometry |
getValidVertexCount, getVertexType, getVertices, initPolygonDetails, markBoundsDirty, ray3DQuadChecked, ray3DTriangleChecked, recomputeBounds, setColors, setFogCoordinates, setLive, setNormals, setSecondaryColors, setTextureCoordinates, setTextureCoordinates, setTextureCoordinates, setTextureSetMap, setTextureSetMap, setValidVertexCount, setVertices, setVertices, updateBounds |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndexedTriangleFanArray
public IndexedTriangleFanArray()
- Constructs a IndexedTriangleFanArray with default values.
setFanCount
public void setFanCount(int[] counts,
int num)
throws InvalidWriteTimingException
- Set the number of valid fans to use. A check is performed to make
sure that the number of vertices high enough to support the total
of all the fan counts so make sure to call setVertex() with the
required array length before calling this method. Each fan must be
a minumum length of three.
- Parameters:
counts
- The array of countsnum
- The number of valid items to read from the array
- Throws:
java.lang.IllegalArgumentException
- Invalid total fan count or
individual fan count < 3
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback method
getValidFanCount
public int getValidFanCount()
- Get the number of valid fans that are defined for this geometry.
- Returns:
- a positive number
getFanCount
public void getFanCount(int[] values)
- Get the sizes of the valid fans. The passed array must be big enough
to contain all the fan counts.
- Parameters:
values
- An array to copy the strip values into
renderState
public void renderState(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
- Issue ogl commands needed for this renderable object.
- Overrides:
renderState
in class NodeComponent
- Parameters:
gl
- The gl context to draw withglu
- The utility context to draw with
restoreState
public void restoreState(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
- Restore all openGL state.
- Overrides:
restoreState
in class NodeComponent
- Parameters:
gl
- The gl context to draw withglu
- The utility context to draw with
pickLineSegment
public boolean pickLineSegment(float[] start,
float[] end,
boolean findAny,
float[] dataOut,
int dataOutFlags)
throws NotPickableException
- Check for all intersections against this geometry using a line segment and
return the exact distance away of the closest picking point. Default
implementation always returns false indicating that nothing was found.
Derived classes should override and provide a real implementation.
- Overrides:
pickLineSegment
in class VertexGeometry
- Parameters:
start
- The start point of the segmentend
- The end point of the segmentfindAny
- True if it only has to find a single intersection and can
exit as soon as it finds the first intersection. False if it must find
the closest polygondataOut
- An array to put the data in for the intersection. Exact
format is described by the flagsdataOutFlags
- A set of derived-class specific flags describing what
data should be included in the output array
- Returns:
- True if an intersection was found according to the input request
- Throws:
NotPickableException
- This object has been marked as non pickable,
but you decided to try to call the method anyway
pickLineRay
public boolean pickLineRay(float[] origin,
float[] direction,
boolean findAny,
float[] dataOut,
int dataOutFlags)
throws NotPickableException
- Check for all intersections against this geometry using a line ray and
return the exact distance away of the closest picking point. Default
implementation always returns false indicating that nothing was found.
Derived classes should override and provide a real implementation.
- Overrides:
pickLineRay
in class VertexGeometry
- Parameters:
origin
- The start point of the raydirection
- The direction vector of the rayfindAny
- True if it only has to find a single intersection and can
exit as soon as it finds the first intersection. False if it must find
the closest polygondataOut
- An array to put the data in for the intersection. Exact
format is described by the flagsdataOutFlags
- A set of derived-class specific flags describing what
data should be included in the output array
- Returns:
- True if an intersection was found according to the input request
- Throws:
NotPickableException
- This object has been marked as non pickable,
but you decided to try to call the method anyway
Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - j3d.org