Class OGLEspduTransform
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.BaseGroupingNode
org.web3d.vrml.renderer.common.nodes.dis.BaseEspduTransform
org.web3d.vrml.renderer.ogl.nodes.dis.OGLEspduTransform
- All Implemented Interfaces:
org.j3d.aviatrix3d.NodeUpdateListener
,VRMLNode
,FrameStateListener
,VRMLBoundedNodeType
,VRMLChildNodeType
,VRMLDISNodeType
,VRMLGroupingNodeType
,VRMLNetworkInterfaceNodeType
,VRMLNodeType
,VRMLTimeDependentNodeType
,VRMLWorldRootChildNodeType
,OGLTransformNodeType
,OGLVRMLNode
public class OGLEspduTransform
extends BaseEspduTransform
implements OGLVRMLNode, org.j3d.aviatrix3d.NodeUpdateListener, OGLTransformNodeType
OpenGL implementation of a EspduTransform node.
- Version:
- $Revision: 1.8 $
- Author:
- Alan Hudson
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List
<VRMLPointingDeviceSensorNodeType> A sensor node if we have one set.Fields inherited from class org.web3d.vrml.renderer.common.nodes.dis.BaseEspduTransform
currentMode, FIELD_ADDRESS, FIELD_APPEARANCE, FIELD_APPLICATION_ID, FIELD_ARTICULATION_PARAMETER_ARRAY, FIELD_ARTICULATION_PARAMETER_COUNT, FIELD_ARTICULATION_PARAMETER_VALUE0_CHANGED, FIELD_ARTICULATION_PARAMETER_VALUE1_CHANGED, FIELD_ARTICULATION_PARAMETER_VALUE2_CHANGED, FIELD_ARTICULATION_PARAMETER_VALUE3_CHANGED, FIELD_ARTICULATION_PARAMETER_VALUE4_CHANGED, FIELD_ARTICULATION_PARAMETER_VALUE5_CHANGED, FIELD_ARTICULATION_PARAMETER_VALUE6_CHANGED, FIELD_ARTICULATION_PARAMETER_VALUE7_CHANGED, FIELD_CENTER, FIELD_DETONATE_TIME, FIELD_DETONATION_LOCATION, FIELD_DETONATION_RELATIVE_LOCATION, FIELD_DETONATION_RESULT, FIELD_ENTITY_CATEGORY, FIELD_ENTITY_COUNTRY, FIELD_ENTITY_DOMAIN, FIELD_ENTITY_EXTRA, FIELD_ENTITY_ID, FIELD_ENTITY_KIND, FIELD_ENTITY_SPECIFIC, FIELD_ENTITY_SUBCATEGORY, FIELD_EVENT_APPLICATION_ID, FIELD_EVENT_ENTITY_ID, FIELD_EVENT_SITE_ID, FIELD_FIRE_MISSION_INDEX, FIELD_FIRED_1, FIELD_FIRED_2, FIELD_FIRED_TIME, FIELD_FIRING_RANGE, FIELD_FIRING_RATE, FIELD_FORCE_ID, FIELD_GEO_ORIGIN, FIELD_GEO_SYSTEM, FIELD_IS_ACTIVE, FIELD_IS_DETONATED, FIELD_LINEAR_ACCELERATION, FIELD_LINEAR_VELOCITY, FIELD_MARKING, FIELD_MUNITION_APPLICATION_ID, FIELD_MUNITION_END_POINT, FIELD_MUNITION_ENTITY_ID, FIELD_MUNITION_SITE_ID, FIELD_MUNITION_START_POINT, FIELD_NETWORK_MODE, FIELD_NOT_IMPL, FIELD_PORT, FIELD_READ_INTERVAL, FIELD_ROTATION, FIELD_SCALE, FIELD_SCALE_ORIENTATION, FIELD_SET_ARTICULATION_PARAMETER_VALUE0, FIELD_SET_ARTICULATION_PARAMETER_VALUE1, FIELD_SET_ARTICULATION_PARAMETER_VALUE2, FIELD_SET_ARTICULATION_PARAMETER_VALUE3, FIELD_SET_ARTICULATION_PARAMETER_VALUE4, FIELD_SET_ARTICULATION_PARAMETER_VALUE5, FIELD_SET_ARTICULATION_PARAMETER_VALUE6, FIELD_SET_ARTICULATION_PARAMETER_VALUE7, FIELD_SITE_ID, FIELD_TIMESTAMP, FIELD_TRANSLATION, FIELD_WRITE_INTERVAL, FIELD_XMPP_PARAMS, ignoreEspdu, LAST_TRANSFORM_INDEX, lastWrite, MODE_READER, MODE_STANDALONE, MODE_WRITER, needToWrite, networkModes, NUM_FIELDS, numArticulationParameterArray, pGeoOrigin, PROTOCOL, roleListeners, tmatrix, vfAddress, vfAppearance, vfApplicationID, vfArticulationParameterArray, vfArticulationParameterCount, vfArticulationParameterValue0, vfArticulationParameterValue1, vfArticulationParameterValue2, vfArticulationParameterValue3, vfArticulationParameterValue4, vfArticulationParameterValue5, vfArticulationParameterValue6, vfArticulationParameterValue7, vfCenter, vfDetonateTime, vfDetonationLocation, vfDetonationRelativeLocation, vfDetonationResult, vfEntityCategory, vfEntityCountry, vfEntityDomain, vfEntityExtra, vfEntityID, vfEntityKind, vfEntitySpecific, vfEntitySubcategory, vfEventApplicationID, vfEventEntityID, vfEventSiteID, vfFired1, vfFired2, vfFiredTime, vfFireMissionIndex, vfFiringRange, vfFiringRate, vfForceID, vfGeoOrigin, vfGeoSystem, vfIsActive, vfIsDetonated, vfLinearAcceleration, vfLinearVelocity, vfMarking, vfMunitionApplicationID, vfMunitionEndPoint, vfMunitionEntityID, vfMunitionSiteID, vfMunitionStartPoint, vfNetworkMode, vfPort, vfReadInterval, vfRotation, vfScale, vfScaleOrientation, vfSiteID, vfTimestamp, vfTranslation, vfWriteInterval, vfXMPPParams, vrmlClock
Fields inherited from class org.web3d.vrml.renderer.common.nodes.BaseGroupingNode
childCount, FIELD_ADDCHILDREN, FIELD_BBOX_CENTER, FIELD_BBOX_DISPLAY, FIELD_BBOX_SIZE, FIELD_CHILDREN, FIELD_REMOVECHILDREN, FIELD_VISIBLE, hasBindables, LAST_GROUP_INDEX, shareCount, USE_BIND_MSG, vfBboxCenter, vfBboxDisplay, vfBboxSize, vfChildren, vfVisible
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
Fields inherited from interface org.web3d.vrml.nodes.VRMLNetworkInterfaceNodeType
ROLE_INACTIVE, ROLE_MANAGER, ROLE_READER, ROLE_WRITER
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a default instance of this node.Construct a new instance of this node based on the details from the given node. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addChildNode
(VRMLNodeType node) Add a single child node to the list of available children.void
Notification that the rendering of the event model is complete and that rendering is about to begin.protected void
Clear the child node list of all children in the VRML node.org.j3d.aviatrix3d.SceneGraphObject
Get the OpenGL scene graph object representation of this node.javax.vecmath.Matrix4f
Get the transform matrix for this node.void
notifyExternProtoLoaded
(int index, VRMLNodeType node) Notify a node that an ExternProto has resolved.protected void
removeChildNode
(VRMLNodeType node) Remove the given node from this grouping node.void
Notification that the construction phase of this node has finished.protected void
Calculate transforms needed to handle VRML semantics and place the results in the matrix variable of this class.void
void
Methods inherited from class org.web3d.vrml.renderer.common.nodes.dis.BaseEspduTransform
addNetworkRoleListener, fireRoleChanged, getAddress, getAppID, getAuthServer, getCenter, getEntityID, getFieldDeclaration, getFieldIndex, getFieldValue, getMucRoom, getMucServer, getNodeFieldIndices, getNumFields, getPassword, getPort, getPrimaryType, getProtocol, getRole, getRotation, getScale, getScaleOrientation, getSecondaryType, getSiteID, getState, getTranslation, getUsername, packetArrived, regenID, removeNetworkRoleListener, sendRoute, setCenter, setIsActive, setRotation, setScale, setScaleOrientation, setTranslation, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVRMLClock, valuesToWrite
Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseGroupingNode
addChild, containsBindableNodes, copy, getBboxCenter, getBboxDisplay, getBboxSize, getChildren, getChildrenSize, getVisible, isShared, setBboxCenter, setBboxDisplay, setBboxSize, setChildren, setChildren, setDEF, setShared, setValue, setVisible, updateRefCount
Methods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
addNodeListener, checkNodeType, checkSecondaryType, checkSecondaryType, clearRemovedLayerIds, fireFieldChanged, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, removeNodeListener, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, setValue, setValue, setValue, setValue, setValue, setVersion, throwInitOnlyWriteException, throwInputOnlyWriteException, throwInvalidNodeException, throwInvalidProtoException, throwOutputOnlyWriteException, 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, 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, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
-
Field Details
-
sensorList
A sensor node if we have one set. Only valid during construction
-
-
Constructor Details
-
OGLEspduTransform
public OGLEspduTransform()Construct a default instance of this node. The defaults are set by the VRML specification. -
OGLEspduTransform
Construct a new instance of this node based on the details from the given node. If the node is not a group node, an exception will be thrown. It does not copy the children nodes, just this node.- Parameters:
node
- The node to copy- Throws:
IllegalArgumentException
- The node is not a Group node
-
-
Method Details
-
allEventsComplete
public void allEventsComplete()Description copied from interface:FrameStateListener
Notification that the rendering of the event model is complete and that rendering is about to begin. If the node needs to update itself for this frame, it should do so now before the render pass takes place.- Specified by:
allEventsComplete
in interfaceFrameStateListener
- Overrides:
allEventsComplete
in classBaseEspduTransform
-
updateNodeBoundsChanges
- Specified by:
updateNodeBoundsChanges
in interfaceorg.j3d.aviatrix3d.NodeUpdateListener
-
updateNodeDataChanges
- Specified by:
updateNodeDataChanges
in interfaceorg.j3d.aviatrix3d.NodeUpdateListener
-
setupFinished
public void setupFinished()Description copied from class:BaseGroupingNode
Notification that the construction phase of this node has finished. This will call setupFinished() on the child nodes. Derived classes that do not like this behaviour should override this method or ensure that the implGroup has a parent before this method is called.- Specified by:
setupFinished
in interfaceVRMLNodeType
- Overrides:
setupFinished
in classBaseEspduTransform
-
notifyExternProtoLoaded
Description copied from interface:VRMLNodeType
Notify a node that an ExternProto has resolved. This will verify the objects type and add it to the render sceneGraph.- Specified by:
notifyExternProtoLoaded
in interfaceVRMLNodeType
- Overrides:
notifyExternProtoLoaded
in classAbstractNode
- Parameters:
index
- The field indexnode
- The node resolved
-
getSceneGraphObject
public org.j3d.aviatrix3d.SceneGraphObject getSceneGraphObject()Description copied from interface:OGLVRMLNode
Get the OpenGL 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 OpenGL representation.
-
getTransform
public javax.vecmath.Matrix4f getTransform()Description copied from interface:OGLTransformNodeType
Get the transform matrix for this node. A reference is ok as the users of this method will not modify the matrix. This should be the X3D level value, not pulled from Aviatrix3D.- Specified by:
getTransform
in interfaceOGLTransformNodeType
- Returns:
- The matrix.
-
clearChildren
protected void clearChildren()Description copied from class:BaseGroupingNode
Clear the child node list of all children in the VRML node. Override to provide renderer-specific behaviour, but remember to also call this implementation too.- Overrides:
clearChildren
in classBaseGroupingNode
-
addChildNode
Description copied from class:BaseGroupingNode
Add a single child node to the list of available children. Override to provide renderer-specific behaviour, but remember to also call this implementation too.- Overrides:
addChildNode
in classBaseGroupingNode
- Parameters:
node
- The node to add- Throws:
InvalidFieldValueException
- This is a bindable node shared
-
removeChildNode
Description copied from class:BaseGroupingNode
Remove the given node from this grouping node. If the node is not a child of this node, the request is silently ignored.- Overrides:
removeChildNode
in classBaseGroupingNode
- Parameters:
node
- The node to remove
-
updateMatrix
protected void updateMatrix()Description copied from class:BaseEspduTransform
Calculate transforms needed to handle VRML semantics and place the results in the matrix variable of this class. formula: T x C x R x SR x S x -SR x -C- Overrides:
updateMatrix
in classBaseEspduTransform
-