Class BasePointSetGeometryNode
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.BaseComponentGeometryNode
org.web3d.vrml.renderer.common.nodes.BasePointSetGeometryNode
- All Implemented Interfaces:
VRMLNode,FrameStateListener,VRMLComponentGeometryNodeType,VRMLGeometryNodeType,VRMLNodeComponentListener,VRMLNodeType
- Direct Known Subclasses:
BasePointSet
An abstract implementation of the PointSet nodes.
- Version:
- $Revision: 1.1 $
- Author:
- Russell Dodds
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.j3d.geom.GeometryDataUserdata kept in the triangle geometryFields 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, vfTexCoordFields 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
ConstructorsModifierConstructorDescriptionprotectedConstruct a default instance of this class with the bind flag set to false and no time information set (effective value of zero). -
Method Summary
Modifier and TypeMethodDescriptionvoidNotification that the rendering of the event model is complete and that rendering is about to begin.protected abstract voidBuild the render specific implementation.voidfieldChanged(VRMLNodeType node, int index) Notification that the field from the node has changed.voidnotifyExternProtoLoaded(int index, VRMLNodeType node) Notify a node that an ExternProto has resolved.protected voidNotification of the color node being set.protected voidNotification of the coordinate node being set.voidNotification that the construction phase of this node has finished.voidsetValue(int index, VRMLNodeType child) Set the value of the field at the given index as a node.protected voidUpdate the color array in geomData based on the color node and colorPerVertex flag.protected voidUpdate the coordinate array in geomData based on the coordinate data.Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseComponentGeometryNode
addLocalColorsListener, addTexCoordGenModeChanged, copy, fireLocalColorsChanged, getComponents, getFieldValue, getNumSets, getPrimaryType, getTexCoordGenMode, hasColorPerVertex, hasLocalColorAlpha, hasLocalColors, hasNormalPerVertex, isCCW, isLightingEnabled, isSolid, removeLocalColorsListener, removeTexCoordGenModeChanged, requiresUnlitColor, sendRoute, setComponent, setComponents, setFogCoordinateNode, setNormalNode, setTexCoordNode, setTextureCount, setUnlitColor, setValueMethods 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, setValue, setVersion, throwInitOnlyWriteException, throwInputOnlyWriteException, throwInvalidNodeException, throwInvalidProtoException, throwOutputOnlyWriteException, updateRefCount, updateRefsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.web3d.vrml.lang.VRMLNode
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersionMethods 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, setValue, updateRefCount
-
Field Details
-
geomData
protected org.j3d.geom.GeometryData geomDataUserdata kept in the triangle geometry
-
-
Constructor Details
-
BasePointSetGeometryNode
Construct a default instance of this class with the bind flag set to false and no time information set (effective value of zero).- Parameters:
name- The name of the type of node
-
-
Method Details
-
buildImpl
protected abstract void buildImpl()Build the render specific implementation. -
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 transformation matrix only once per frame. If the derived class needs to propagate the changes then it should override the updateMatrix() method or this and make sure this method is called first.- Specified by:
allEventsCompletein interfaceFrameStateListener- Overrides:
allEventsCompletein classAbstractNode
-
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:
setupFinishedin interfaceVRMLNodeType- Overrides:
setupFinishedin classBaseComponentGeometryNode
-
notifyExternProtoLoaded
Description copied from interface:VRMLNodeTypeNotify a node that an ExternProto has resolved. This will verify the objects type and add it to the render sceneGraph.- Specified by:
notifyExternProtoLoadedin interfaceVRMLNodeType- Overrides:
notifyExternProtoLoadedin classAbstractNode- Parameters:
index- The field indexnode- The node resolved- Throws:
InvalidFieldValueException- If the proto contains he wrong type
-
setValue
public void setValue(int index, VRMLNodeType child) throws InvalidFieldException, InvalidFieldValueException Set the value of the field at the given index as a node. This would be used to set SFNode field types.- Specified by:
setValuein interfaceVRMLNodeType- Overrides:
setValuein classBaseComponentGeometryNode- Parameters:
index- The index of destination field to setchild- The new value to use for the node- Throws:
InvalidFieldException- The field index is not knownInvalidFieldValueException- The node does not match the required type.
-
setCoordinateNode
Notification of the coordinate node being set. If the passed value is null then that clears the node. The node passed is the actual geometry, not any proto wrapper, that will have been previously stripped. The default implementation does nothing.- Overrides:
setCoordinateNodein classBaseComponentGeometryNode- Parameters:
node- The node to use
-
setColorNode
Notification of the color node being set. If the passed value is null then that clears the node. The node passed is the actual color, not any proto wrapper, that will have been previously stripped. The default implementation does nothing.- Overrides:
setColorNodein classBaseComponentGeometryNode- Parameters:
node- The node to use
-
fieldChanged
Notification that the field from the node has changed.- Parameters:
node- The component node that changedindex- The index of the field that has changed
-
updateCoordinateArray
protected void updateCoordinateArray()Update the coordinate array in geomData based on the coordinate data. -
updateColorArray
protected void updateColorArray()Update the color array in geomData based on the color node and colorPerVertex flag.
-