Class BaseIndexedTriangleSet
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.BaseComponentGeometryNode
org.web3d.vrml.renderer.common.nodes.BaseIndexedTriangleGeometryNode
org.web3d.vrml.renderer.common.nodes.render.BaseIndexedTriangleSet
- All Implemented Interfaces:
VRMLNode
,FrameStateListener
,VRMLComponentGeometryNodeType
,VRMLGeometryNodeType
,VRMLNodeComponentListener
,VRMLNodeType
- Direct Known Subclasses:
NRIndexedTriangleSet
,OGLIndexedTriangleSet
An abstract implementation of an IndexedTriangleSet
The node is defined by X3D as:
IndexedTriangleSet : X3DComposedGeometryNode { MFInt32 [in] set_index [] [0,∞) or -1 SFNode [in,out] color NULL [X3DColorNode] SFNode [in,out] coord NULL [X3DCoordinateNode] SFFloat [in,out] creaseAngle 0 [0,∞) SFNode [in,out] metadata NULL [X3DMetadataObject] SFNode [in,out] normal NULL [X3DNormalNode] SFNode [in,out] texCoord NULL [X3DTextureCoordinateNode] SFBool [] ccw TRUE SFBool [] normalPerVertex TRUE SFBool [] solid TRUE MFInt32 [] index [] [0,∞) }
- Version:
- $Revision: 1.12 $
- Author:
- Justin Couch, Alan Hudson
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.common.nodes.BaseIndexedTriangleGeometryNode
FIELD_INDEX, FIELD_SET_INDEX, geomData, LAST_INDEXEDTRIANGLEGEOMETRY_INDEX, NORMAL_NODE_MSG, NORMAL_PROTO_MSG, numIndex, TEXCOORD_NODE_MSG, TEXCOORD_PROTO_MSG, vfIndex
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
ConstructorsModifierConstructorDescriptionprotected
Construct a default instance of this class with the bind flag set to false and no time information set (effective value of zero).protected
Construct a new instance of this node based on the details from the given node. -
Method Summary
Modifier and TypeMethodDescriptiongetFieldDeclaration
(int index) Get the declaration of the field at the given index.int
getFieldIndex
(String fieldName) Get the index of the given field name.int[]
Get the list of indices that correspond to fields that contain nodes ie MFNode and SFNode).int
Get the number of fields.protected void
Update the index listing for the faces.Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseIndexedTriangleGeometryNode
allEventsComplete, buildImpl, copy, fieldChanged, getFieldValue, notifyExternProtoLoaded, sendRoute, setColorNode, setCoordinateNode, setIndex, setNormalNode, setTextureCoordinateNode, setupFinished, setValue, setValue, updateColorArray, updateCoordinateArray, updateNormalArray
Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseComponentGeometryNode
addLocalColorsListener, addTexCoordGenModeChanged, fireLocalColorsChanged, getComponents, getNumSets, getPrimaryType, getTexCoordGenMode, hasColorPerVertex, hasLocalColorAlpha, hasLocalColors, hasNormalPerVertex, isCCW, isLightingEnabled, isSolid, removeLocalColorsListener, removeTexCoordGenModeChanged, requiresUnlitColor, setComponent, setComponents, setFogCoordinateNode, setTexCoordNode, setTextureCount, setUnlitColor, setValue
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, 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.lang.VRMLNode
getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion
Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, clearRemovedLayerIds, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, hasFieldChanged, isSetupFinished, removeNodeListener, setDEF, setFrameStateManager, setMetadataObject, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
-
Constructor Details
-
BaseIndexedTriangleSet
protected BaseIndexedTriangleSet()Construct a default instance of this class with the bind flag set to false and no time information set (effective value of zero). -
BaseIndexedTriangleSet
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
-
getFieldIndex
Get the index of the given field name. If the name does not exist for this node then return a value of -1.- Parameters:
fieldName
- The name of the field we want the index from- Returns:
- The index of the field name or -1
-
getNodeFieldIndices
public int[] getNodeFieldIndices()Get the list of indices that correspond to fields that contain nodes ie MFNode and SFNode). Used for blind scene graph traversal without needing to spend time querying for all fields etc. If a node does not have any fields that contain nodes, this shall return null. The field list covers all field types, regardless of whether they are readable or not at the VRML-level.- Returns:
- The list of field indices that correspond to SF/MFnode fields or null if none
-
getNumFields
public int getNumFields()Get the number of fields.- Returns:
- The number of fields.
-
getFieldDeclaration
Get the declaration of the field at the given index. This allows for reverse lookup if needed. If the field does not exist, this will give a value of null.- Parameters:
index
- The index of the field to get information- Returns:
- A representation of this field's information
-
updateIndexMaps
protected void updateIndexMaps()Update the index listing for the faces. This should only be called when the index list has changed. It sets up all the internal mappings for faces to index lists if normalPerVertex is false.
-