Class OGLIndexedFaceSet
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.BaseComponentGeometryNode
org.web3d.vrml.renderer.common.nodes.BaseIndexedGeometryNode
org.web3d.vrml.renderer.common.nodes.geom3d.BaseIndexedFaceSet
org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLIndexedFaceSet
- All Implemented Interfaces:
org.j3d.aviatrix3d.NodeUpdateListener
,VRMLNode
,FrameStateListener
,VRMLComponentGeometryNodeType
,VRMLGeometryNodeType
,VRMLNodeComponentListener
,VRMLNodeType
,OGLGeometryNodeType
,OGLVRMLNode
public class OGLIndexedFaceSet
extends BaseIndexedFaceSet
implements OGLGeometryNodeType, org.j3d.aviatrix3d.NodeUpdateListener
OpenGL implementation of an IndexedFaceSet.
- Version:
- $Revision: 1.37 $
- Author:
- Alan Hudson, Justin Couch
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.common.nodes.geom3d.BaseIndexedFaceSet
FIELD_CONVEX, FIELD_CREASEANGLE, geomData, vfConvex, vfCreaseAngle
Fields inherited from class org.web3d.vrml.renderer.common.nodes.BaseIndexedGeometryNode
FIELD_COLORINDEX, FIELD_COORDINDEX, FIELD_NORMALINDEX, FIELD_SET_COLORINDEX, FIELD_SET_COORDINDEX, FIELD_SET_NORMALINDEX, FIELD_SET_TEXCOORDINDEX, FIELD_TEXCOORDINDEX, LAST_INDEXEDGEOMETRY_INDEX, NORMAL_NODE_MSG, NORMAL_PROTO_MSG, numColorIndex, numCoordIndex, numNormalIndex, numTexCoordIndex, TEXCOORD_NODE_MSG, TEXCOORD_PROTO_MSG, vfColorIndex, vfCoordIndex, vfNormalIndex, vfTexCoordIndex
Fields inherited from class org.web3d.vrml.renderer.common.nodes.BaseComponentGeometryNode
ATTRIB_CHANGED, ATTRIB_INDEX_CHANGED, ATTRIB_NODE_MSG, ATTRIB_PROTO_MSG, BAD_NODE_MSG, BAD_PROTO_MSG, changeFlags, COLOR_NODE_MSG, COLOR_PROTO_MSG, COLORS_CHANGED, COLORS_INDEX_CHANGED, COORD_NODE_MSG, COORD_PROTO_MSG, COORDS_CHANGED, COORDS_INDEX_CHANGED, FIELD_ATTRIBS, FIELD_CCW, FIELD_COLOR, FIELD_COLORPERVERTEX, FIELD_COORD, FIELD_FOG_COORD, FIELD_NORMAL, FIELD_NORMALPERVERTEX, FIELD_SOLID, FIELD_TEXCOORD, FOG_CHANGED, FOG_INDEX_CHANGED, FOG_NODE_MSG, FOG_PROTO_MSG, LAST_GEOMETRY_INDEX, localColors, localColorsListeners, NORMALS_CHANGED, NORMALS_INDEX_CHANGED, pColor, pCoord, pFogCoord, pNormal, pTexCoord, TEXCOORDS_CHANGED, TEXCOORDS_INDEX_CHANGED, UNLIT_COLORS_CHANGED, VBO_MIN_VERTICES, vfAttribs, vfCcw, vfColor, vfColorPerVertex, vfCoord, vfFogCoord, vfNormal, vfNormalPerVertex, vfSolid, vfTexCoord
Fields inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
errorReporter, FIELD_METADATA, fieldLocalData, hasChanged, inSetup, isDEF, isStatic, LAST_NODE_INDEX, layerIds, nodeName, pMetadata, refCounts, removedLayerIds, stateManager, STATIC_SCENE_GRAPH, vfMetadata, vrmlMajorVersion, vrmlMinorVersion
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor to build an instance with default field values.Construct a new instance of this node based on the details from the given node. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Notification that the rendering of the event model is complete and that rendering is about to begin.org.j3d.aviatrix3d.Geometry
Returns a OGL Geometry node that represents this piece of geometry.org.j3d.aviatrix3d.SceneGraphObject
Get the Java3D scene graph object representation of this node.boolean
isCCW()
Get the value of the CCW field.void
setTextureCount
(int count) Set the number of textures that were found on the accompanying Appearance node.void
Notification that the construction phase of this node has finished.void
Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.void
Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.Methods inherited from class org.web3d.vrml.renderer.common.nodes.geom3d.BaseIndexedFaceSet
fieldChanged, getFieldDeclaration, getFieldIndex, getFieldValue, getNodeFieldIndices, getNumFields, notifyExternProtoLoaded, setValue, setValue, setValue
Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseIndexedGeometryNode
copy, sendRoute, setColorIndex, setCoordIndex, setNormalIndex, setTexCoordIndex, setValue
Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseComponentGeometryNode
addLocalColorsListener, addTexCoordGenModeChanged, fireLocalColorsChanged, getComponents, getNumSets, getPrimaryType, getTexCoordGenMode, hasColorPerVertex, hasLocalColorAlpha, hasLocalColors, hasNormalPerVertex, isLightingEnabled, isSolid, removeLocalColorsListener, removeTexCoordGenModeChanged, requiresUnlitColor, setColorNode, setComponent, setComponents, setCoordinateNode, setFogCoordinateNode, setNormalNode, setTexCoordNode, setUnlitColor
Methods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
addNodeListener, checkNodeType, checkSecondaryType, checkSecondaryType, clearRemovedLayerIds, fireFieldChanged, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, getSecondaryType, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, removeNodeListener, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVersion, throwInitOnlyWriteException, throwInputOnlyWriteException, throwInvalidNodeException, throwInvalidProtoException, throwOutputOnlyWriteException, updateRefCount, updateRefs
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.web3d.vrml.nodes.VRMLGeometryNodeType
addLocalColorsListener, addTexCoordGenModeChanged, getNumSets, getTexCoordGenMode, hasLocalColorAlpha, hasLocalColors, isLightingEnabled, isSolid, removeLocalColorsListener, removeTexCoordGenModeChanged
Methods inherited from interface org.web3d.vrml.lang.VRMLNode
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion
Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, clearRemovedLayerIds, getFieldValue, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
-
Constructor Details
-
OGLIndexedFaceSet
public OGLIndexedFaceSet()Default constructor to build an instance with default field values. -
OGLIndexedFaceSet
Construct a new instance of this node based on the details from the given node. If the node is not the same type, an exception will be thrown.- Parameters:
node
- The node to copy- Throws:
IllegalArgumentException
- Incorrect Node Type
-
-
Method Details
-
allEventsComplete
public void allEventsComplete()Notification that the rendering of the event model is complete and that rendering is about to begin. Used to update the j3d representation only once per frame.- Specified by:
allEventsComplete
in interfaceFrameStateListener
- Overrides:
allEventsComplete
in classAbstractNode
-
updateNodeBoundsChanges
Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.- Specified by:
updateNodeBoundsChanges
in interfaceorg.j3d.aviatrix3d.NodeUpdateListener
- Parameters:
src
- The node or Node Component that is to be updated.
-
updateNodeDataChanges
Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.- Specified by:
updateNodeDataChanges
in interfaceorg.j3d.aviatrix3d.NodeUpdateListener
- Parameters:
src
- The node or Node Component that is to be updated.
-
getGeometry
public org.j3d.aviatrix3d.Geometry getGeometry()Description copied from interface:OGLGeometryNodeType
Returns a OGL Geometry node that represents this piece of geometry. If no geometry is available, then return null.- Specified by:
getGeometry
in interfaceOGLGeometryNodeType
- Returns:
- The geometry needed to represent this object
-
setTextureCount
public void setTextureCount(int count) Set the number of textures that were found on the accompanying Appearance node. Used to set the number of texture coordinates that need to be passed in to the renderer when no explicit texture coordinates were given.- Specified by:
setTextureCount
in interfaceVRMLGeometryNodeType
- Overrides:
setTextureCount
in classBaseComponentGeometryNode
- Parameters:
count
- The number of texture coordinate sets to add
-
getSceneGraphObject
public org.j3d.aviatrix3d.SceneGraphObject getSceneGraphObject()Get the Java3D scene graph object representation of this node. This will need to be cast to the appropriate parent type when being used.- Specified by:
getSceneGraphObject
in interfaceOGLVRMLNode
- Returns:
- The J3D representation.
-
setupFinished
public void setupFinished()Notification that the construction phase of this node has finished. If the node would like to do any internal processing, such as setting up geometry, then go for it now.- Specified by:
setupFinished
in interfaceVRMLNodeType
- Overrides:
setupFinished
in classBaseComponentGeometryNode
-
isCCW
public boolean isCCW()Get the value of the CCW field.- Specified by:
isCCW
in interfaceVRMLGeometryNodeType
- Overrides:
isCCW
in classBaseComponentGeometryNode
- Returns:
- true Vertices are declared in counter-clockwise order
-