Class BaseGeoSRFParametersInfoNode
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.geospatial.BaseGeoSRFParametersInfoNode
- All Implemented Interfaces:
VRMLNode
,FrameStateListener
,VRMLNodeType
- Direct Known Subclasses:
BaseGeoSRFParametersInfo
Common base implementation of the abstract node type X3DSRFParametersInfoNode node.
- Version:
- $Revision: 1.2 $
- Author:
- Justin Couch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final int
Index of the rtCode fieldprotected static final int
The last index of the nodes used by the SRFParametersInfoNodeprotected int
field SFInt32 rtCodeFields 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 node type. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Construct a new instance of this node based on the details from the given node.getFieldValue
(int index) Get the value of a field.int
Get the primary type of this node.int
Get the value of the rtCode field.void
setValue
(int index, int value) Set the value of the field at the given index as a single int value.Methods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
addNodeListener, allEventsComplete, checkNodeType, checkSecondaryType, checkSecondaryType, clearRemovedLayerIds, fireFieldChanged, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, getSecondaryType, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setupFinished, setUserData, setValue, setValue, 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
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields
-
Field Details
-
FIELD_RTCODE
protected static final int FIELD_RTCODEIndex of the rtCode field- See Also:
-
LAST_SRF_PARAM_INFO_INDEX
protected static final int LAST_SRF_PARAM_INFO_INDEXThe last index of the nodes used by the SRFParametersInfoNode- See Also:
-
vfRtCode
protected int vfRtCodefield SFInt32 rtCode
-
-
Constructor Details
-
BaseGeoSRFParametersInfoNode
Construct a default instance of this node type. The defaults are set by the X3D specification.- Parameters:
name
- The name of the type of node
-
-
Method Details
-
copy
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
-
getPrimaryType
public int getPrimaryType()Get the primary type of this node. Replaces the instanceof mechanism for use in switch statements.- Returns:
- The primary type
-
getFieldValue
Get the value of a field. If the field is a primitive type, it will return a class representing the value. For arrays or nodes it will return the instance directly.- Specified by:
getFieldValue
in interfaceVRMLNodeType
- Overrides:
getFieldValue
in classAbstractNode
- Parameters:
index
- The index of the field to change.- Returns:
- The class representing the field value
- Throws:
InvalidFieldException
- The field index is not known
-
setValue
Set the value of the field at the given index as a single int value. This would be used to set SFInt32 field types.- Specified by:
setValue
in interfaceVRMLNodeType
- Overrides:
setValue
in classAbstractNode
- Parameters:
index
- The index of destination field to setvalue
- The new value to use for the node- Throws:
InvalidFieldException
- The field index is not knownInvalidFieldValueException
- The value provided is out of range for the field type.
-
getRtCode
public int getRtCode()Get the value of the rtCode field. The value is specified by section 11.2.7.6 of ISO/IEC 18026- Returns:
- A value RT code value.
-