Class BaseEspduTransform
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
- All Implemented Interfaces:
VRMLNode,FrameStateListener,VRMLBoundedNodeType,VRMLChildNodeType,VRMLDISNodeType,VRMLGroupingNodeType,VRMLNetworkInterfaceNodeType,VRMLNodeType,VRMLTimeDependentNodeType,VRMLWorldRootChildNodeType
- Direct Known Subclasses:
NREspduTransform,OGLEspduTransform
public class BaseEspduTransform
extends BaseGroupingNode
implements VRMLNetworkInterfaceNodeType, VRMLDISNodeType, VRMLTimeDependentNodeType
Common implementation of a EspuTransform node functionality.
This base class does not automatically update the underlying transform
with each set() call. These calls only update the local field values,
but not the transform that would be used in the rendering code. To make
sure this is updated, call the updateMatrix() method and then
use the updated matrix in your rendering code.
Filter on: siteID, AppID, EntityID to know who to deliver a packet to
Don't worry about dynamic changes to siteID,AppID,EntityID on first impl
Two prototype fields have been added:
geoSystem and geoOrigin
Spec notes:
Why do we need read and writeInterval?
isActive feels weird. Does it turn itself off, or just reflect network state.
- Version:
- $Revision: 1.39 $
- Author:
- Alan Hudson
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intCurrent mode as integer constantprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intField Indexprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected booleanShould we ignore espdus.protected static final intThe last field index used by this classprotected doubleWhen did we last write a valueprotected static final intNetwork modes, readerprotected static final intNetwork modes, standaloneprotected static final intNetwork modes, writerprotected booleanDo we have new values to writenetworkMode string to int conversion, String to Integerprotected static final intNumber of fields constantprotected intNumber of valid values in vfArticulationParameterArrayprotected VRMLProtoInstanceProto version of the geoOriginprotected static final StringProtocol implementedprotected List<NetworkRoleListener> List of those who want to know about role changes, likely 1protected javax.vecmath.Matrix4fprotected Stringaddress SFString "localhost"protected intappearance SFInt32 0protected intapplicationID SFInt32 0protected float[]articulationParameterArray MFFloat []protected intarticulationParameterCount SFInt32 0protected floatarticulationParameterValueChanged0_changed SFFloatprotected floatarticulationParameterValueChanged1_changed SFFloatprotected floatarticulationParameterValueChanged2_changed SFFloatprotected floatarticulationParameterValueChanged3_changed SFFloatprotected floatarticulationParameterValueChanged4_changed SFFloatprotected floatarticulationParameterValueChanged5_changed SFFloatprotected floatarticulationParameterValueChanged6_changed SFFloatprotected floatarticulationParameterValueChanged7_changed SFFloatprotected float[]SFVec3f centerprotected doubledetonationResult SFTimeprotected float[]detonationLocation SFVec3f 0 0 0protected float[]detonationRelativeLocation SFVec3f 0 0 0protected intdetonationResult SFInt32 0protected intentityCategory SFInt32 0protected intentityCountry SFInt32 0protected intentityDomain SFInt32 0protected intentityExtra SFInt32 0protected intentityID SFInt32 0protected intentityKind SFInt32 0protected intentitySpecific SFInt32 0protected intentitySubcategory SFInt32 0protected inteventApplicationID SFInt32protected inteventEntityID SFInt32protected inteventSiteID SFInt32protected booleanfired1 SFBoolprotected booleanfired2 SFBoolprotected doublefiredTime SFTimeprotected intfireMissionIndex SFInt32protected floatfiringRange SFFloatprotected intfiringRate SFInt32protected intforceID SFInt32 0protected VRMLLocalOriginNodeTypefield SFNode geoOriginprotected String[]geoSystem MFString ["GD","WE"]protected booleanisActive SFBoolprotected booleandetonationResult SFBoolprotected float[]linearAcceleration SFVec3fprotected float[]linearVelocity SFVec3fprotected Stringmarking SFString ""protected intmunitionApplicationID SFInt32protected float[]munitionEndPoint SFVec3f 0 0 0protected intmunitionEntityID SFInt32protected intmunitionSiteID SFInt32protected float[]munitionStartPoint SFVec3f 0 0 0protected StringnetworkMode SFString "standAlone"protected intport SFInt32 0protected doublereadInterval SFTime 0.1protected float[]SFRotation rotationprotected float[]SFVec3f scaleprotected float[]SFRotation scaleOrientationprotected intsiteID SFInt32 0protected doubletimestamp SFTimeprotected float[]SFVec3f translationprotected doublewriteInterval SFTime 1protected String[]xmppParams MFString []protected VRMLClockThe clock used to drive collide time eventOutsFields 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, vfVisibleFields 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, vrmlMinorVersionFields 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 TypeMethodDescriptionvoidAdd a NetworkRoleListener.voidNotification that the rendering of the event model is complete and that rendering is about to begin.protected voidSend a notification to the registered listeners the role has been changed.Get the network address to listen to.intgetAppID()Get the applicationID specified for this node.String[]Get the chat room auth server's.float[]Get the current center component of the transform.intGet the entityID specified for this node.getFieldDeclaration(int index) Get the declaration of the field at the given index.intgetFieldIndex(String fieldName) Get the index of the given field name.getFieldValue(int index) Get the value of a field.Get the chat room mucRoom.Get the chat room mucServer.int[]Get the list of indices that correspond to fields that contain nodes i.e. MFNode and SFNode).intGet the number of fields defined for this node.Get the chat room password.intgetPort()Get the network port to listen to.intGet the primary type of this node.Get the protocol this node supports.intgetRole()Get the role of this node.float[]Get the current rotation component of the transform.float[]getScale()Get the current scale component of the transform.float[]Get the current scale orientation component of the transform.int[]Get the secondary types of this node.intGet the siteID specified for this node.edu.nps.moves.dis7.pdus.PdugetState()Get the nodes current state.float[]Get the current translation component of the transform.Get the chat room username.voidpacketArrived(edu.nps.moves.dis7.pdus.Pdu pdu) Tell the DIS node that a packet arrived.voidregenID()Regenerate the ID used for writing values to the network.voidRemove a NetworkRoleListener.voidsendRoute(double time, int srcIndex, VRMLNodeType destNode, int destIndex) Send a routed value from this node to the given destination node.voidsetCenter(float[] center) Set the center component of the of transform.voidsetIsActive(boolean active) Set the isActive state for a DIS node.voidsetRotation(float[] rot) Set the rotation component of the of transform.voidsetScale(float[] scale) Set the scale component of the of transform.voidsetScaleOrientation(float[] so) Set the scale orientation component of the of transform.voidsetTranslation(float[] tx) TODO: Shouldn't this perform the X3D -> DIS conversion of (x, y, z) -> (x, z, -y) as per the spec?voidNotification that the construction phase of this node has finished.voidsetValue(int index, boolean value) Set the value of the field at the given index as an boolean.voidsetValue(int index, double value) Set the value of the field at the given index as an double.voidsetValue(int index, float value) Set the value of the field at the given index as a float.voidsetValue(int index, float[] value, int numValid) Set the value of the field at the given index as an array of floats.voidsetValue(int index, int value) Set the value of the field at the given index as an integer.voidSet the value of the field at the given index as a string.voidSet the value of the field at the given index as an array of strings.voidsetValue(int index, VRMLNodeType child) Set the value of the field at the given index as an array of nodes.voidsetVRMLClock(VRMLClock clock) Set the clock that this time dependent node will be running with.protected voidCalculate transforms needed to handle VRML semantics and place the results in the matrix variable of this class.booleanDoes the this node have new information to write.Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseGroupingNode
addChild, addChildNode, clearChildren, containsBindableNodes, copy, getBboxCenter, getBboxDisplay, getBboxSize, getChildren, getChildrenSize, getVisible, isShared, removeChildNode, setBboxCenter, setBboxDisplay, setBboxSize, setChildren, setChildren, setDEF, setShared, setValue, setVisible, updateRefCountMethods 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, notifyExternProtoLoaded, removeNodeListener, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, setValue, setValue, setValue, setValue, setValue, setVersion, throwInitOnlyWriteException, throwInputOnlyWriteException, throwInvalidNodeException, throwInvalidProtoException, throwOutputOnlyWriteException, 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
getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersionMethods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, clearRemovedLayerIds, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setDEF, setFrameStateManager, setMetadataObject, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
-
Field Details
-
MODE_STANDALONE
protected static final int MODE_STANDALONENetwork modes, standalone- See Also:
-
MODE_WRITER
protected static final int MODE_WRITERNetwork modes, writer- See Also:
-
MODE_READER
protected static final int MODE_READERNetwork modes, reader- See Also:
-
PROTOCOL
-
FIELD_CENTER
protected static final int FIELD_CENTERField Index- See Also:
-
FIELD_ROTATION
protected static final int FIELD_ROTATION- See Also:
-
FIELD_SCALE
protected static final int FIELD_SCALE- See Also:
-
FIELD_SCALE_ORIENTATION
protected static final int FIELD_SCALE_ORIENTATION- See Also:
-
FIELD_TRANSLATION
protected static final int FIELD_TRANSLATION- See Also:
-
FIELD_MARKING
protected static final int FIELD_MARKING- See Also:
-
FIELD_SITE_ID
protected static final int FIELD_SITE_ID- See Also:
-
FIELD_APPLICATION_ID
protected static final int FIELD_APPLICATION_ID- See Also:
-
FIELD_ENTITY_ID
protected static final int FIELD_ENTITY_ID- See Also:
-
FIELD_READ_INTERVAL
protected static final int FIELD_READ_INTERVAL- See Also:
-
FIELD_WRITE_INTERVAL
protected static final int FIELD_WRITE_INTERVAL- See Also:
-
FIELD_NETWORK_MODE
protected static final int FIELD_NETWORK_MODE- See Also:
-
FIELD_ADDRESS
protected static final int FIELD_ADDRESS- See Also:
-
FIELD_PORT
protected static final int FIELD_PORT- See Also:
-
FIELD_ARTICULATION_PARAMETER_COUNT
protected static final int FIELD_ARTICULATION_PARAMETER_COUNT- See Also:
-
FIELD_ARTICULATION_PARAMETER_ARRAY
protected static final int FIELD_ARTICULATION_PARAMETER_ARRAY- See Also:
-
FIELD_ARTICULATION_PARAMETER_VALUE0_CHANGED
protected static final int FIELD_ARTICULATION_PARAMETER_VALUE0_CHANGED- See Also:
-
FIELD_ARTICULATION_PARAMETER_VALUE1_CHANGED
protected static final int FIELD_ARTICULATION_PARAMETER_VALUE1_CHANGED- See Also:
-
FIELD_ARTICULATION_PARAMETER_VALUE2_CHANGED
protected static final int FIELD_ARTICULATION_PARAMETER_VALUE2_CHANGED- See Also:
-
FIELD_ARTICULATION_PARAMETER_VALUE3_CHANGED
protected static final int FIELD_ARTICULATION_PARAMETER_VALUE3_CHANGED- See Also:
-
FIELD_ARTICULATION_PARAMETER_VALUE4_CHANGED
protected static final int FIELD_ARTICULATION_PARAMETER_VALUE4_CHANGED- See Also:
-
FIELD_ARTICULATION_PARAMETER_VALUE5_CHANGED
protected static final int FIELD_ARTICULATION_PARAMETER_VALUE5_CHANGED- See Also:
-
FIELD_ARTICULATION_PARAMETER_VALUE6_CHANGED
protected static final int FIELD_ARTICULATION_PARAMETER_VALUE6_CHANGED- See Also:
-
FIELD_ARTICULATION_PARAMETER_VALUE7_CHANGED
protected static final int FIELD_ARTICULATION_PARAMETER_VALUE7_CHANGED- See Also:
-
FIELD_IS_ACTIVE
protected static final int FIELD_IS_ACTIVE- See Also:
-
FIELD_SET_ARTICULATION_PARAMETER_VALUE0
protected static final int FIELD_SET_ARTICULATION_PARAMETER_VALUE0- See Also:
-
FIELD_SET_ARTICULATION_PARAMETER_VALUE1
protected static final int FIELD_SET_ARTICULATION_PARAMETER_VALUE1- See Also:
-
FIELD_SET_ARTICULATION_PARAMETER_VALUE2
protected static final int FIELD_SET_ARTICULATION_PARAMETER_VALUE2- See Also:
-
FIELD_SET_ARTICULATION_PARAMETER_VALUE3
protected static final int FIELD_SET_ARTICULATION_PARAMETER_VALUE3- See Also:
-
FIELD_SET_ARTICULATION_PARAMETER_VALUE4
protected static final int FIELD_SET_ARTICULATION_PARAMETER_VALUE4- See Also:
-
FIELD_SET_ARTICULATION_PARAMETER_VALUE5
protected static final int FIELD_SET_ARTICULATION_PARAMETER_VALUE5- See Also:
-
FIELD_SET_ARTICULATION_PARAMETER_VALUE6
protected static final int FIELD_SET_ARTICULATION_PARAMETER_VALUE6- See Also:
-
FIELD_SET_ARTICULATION_PARAMETER_VALUE7
protected static final int FIELD_SET_ARTICULATION_PARAMETER_VALUE7- See Also:
-
FIELD_TIMESTAMP
protected static final int FIELD_TIMESTAMP- See Also:
-
FIELD_DETONATION_RESULT
protected static final int FIELD_DETONATION_RESULT- See Also:
-
FIELD_DETONATION_LOCATION
protected static final int FIELD_DETONATION_LOCATION- See Also:
-
FIELD_DETONATION_RELATIVE_LOCATION
protected static final int FIELD_DETONATION_RELATIVE_LOCATION- See Also:
-
FIELD_IS_DETONATED
protected static final int FIELD_IS_DETONATED- See Also:
-
FIELD_DETONATE_TIME
protected static final int FIELD_DETONATE_TIME- See Also:
-
FIELD_EVENT_APPLICATION_ID
protected static final int FIELD_EVENT_APPLICATION_ID- See Also:
-
FIELD_EVENT_ENTITY_ID
protected static final int FIELD_EVENT_ENTITY_ID- See Also:
-
FIELD_EVENT_SITE_ID
protected static final int FIELD_EVENT_SITE_ID- See Also:
-
FIELD_FIRED_1
protected static final int FIELD_FIRED_1- See Also:
-
FIELD_FIRED_2
protected static final int FIELD_FIRED_2- See Also:
-
FIELD_FIRE_MISSION_INDEX
protected static final int FIELD_FIRE_MISSION_INDEX- See Also:
-
FIELD_FIRING_RANGE
protected static final int FIELD_FIRING_RANGE- See Also:
-
FIELD_FIRING_RATE
protected static final int FIELD_FIRING_RATE- See Also:
-
FIELD_MUNITION_APPLICATION_ID
protected static final int FIELD_MUNITION_APPLICATION_ID- See Also:
-
FIELD_MUNITION_END_POINT
protected static final int FIELD_MUNITION_END_POINT- See Also:
-
FIELD_MUNITION_ENTITY_ID
protected static final int FIELD_MUNITION_ENTITY_ID- See Also:
-
FIELD_MUNITION_SITE_ID
protected static final int FIELD_MUNITION_SITE_ID- See Also:
-
FIELD_MUNITION_START_POINT
protected static final int FIELD_MUNITION_START_POINT- See Also:
-
FIELD_FIRED_TIME
protected static final int FIELD_FIRED_TIME- See Also:
-
FIELD_GEO_SYSTEM
protected static final int FIELD_GEO_SYSTEM- See Also:
-
FIELD_GEO_ORIGIN
protected static final int FIELD_GEO_ORIGIN- See Also:
-
FIELD_ENTITY_CATEGORY
protected static final int FIELD_ENTITY_CATEGORY- See Also:
-
FIELD_ENTITY_DOMAIN
protected static final int FIELD_ENTITY_DOMAIN- See Also:
-
FIELD_ENTITY_EXTRA
protected static final int FIELD_ENTITY_EXTRA- See Also:
-
FIELD_ENTITY_KIND
protected static final int FIELD_ENTITY_KIND- See Also:
-
FIELD_ENTITY_SPECIFIC
protected static final int FIELD_ENTITY_SPECIFIC- See Also:
-
FIELD_ENTITY_COUNTRY
protected static final int FIELD_ENTITY_COUNTRY- See Also:
-
FIELD_ENTITY_SUBCATEGORY
protected static final int FIELD_ENTITY_SUBCATEGORY- See Also:
-
FIELD_APPEARANCE
protected static final int FIELD_APPEARANCE- See Also:
-
FIELD_LINEAR_VELOCITY
protected static final int FIELD_LINEAR_VELOCITY- See Also:
-
FIELD_LINEAR_ACCELERATION
protected static final int FIELD_LINEAR_ACCELERATION- See Also:
-
FIELD_FORCE_ID
protected static final int FIELD_FORCE_ID- See Also:
-
FIELD_XMPP_PARAMS
protected static final int FIELD_XMPP_PARAMS- See Also:
-
FIELD_NOT_IMPL
protected static final int FIELD_NOT_IMPL- See Also:
-
LAST_TRANSFORM_INDEX
protected static final int LAST_TRANSFORM_INDEXThe last field index used by this class- See Also:
-
NUM_FIELDS
protected static final int NUM_FIELDSNumber of fields constant- See Also:
-
vfCenter
protected float[] vfCenterSFVec3f center -
vfRotation
protected float[] vfRotationSFRotation rotation -
vfScale
protected float[] vfScaleSFVec3f scale -
vfScaleOrientation
protected float[] vfScaleOrientationSFRotation scaleOrientation -
vfTranslation
protected float[] vfTranslationSFVec3f translation -
vfMarking
marking SFString "" -
vfSiteID
protected int vfSiteIDsiteID SFInt32 0 -
vfApplicationID
protected int vfApplicationIDapplicationID SFInt32 0 -
vfEntityID
protected int vfEntityIDentityID SFInt32 0 -
vfEntityCategory
protected int vfEntityCategoryentityCategory SFInt32 0 -
vfAppearance
protected int vfAppearanceappearance SFInt32 0 -
vfEntityDomain
protected int vfEntityDomainentityDomain SFInt32 0 -
vfEntityExtra
protected int vfEntityExtraentityExtra SFInt32 0 -
vfEntityKind
protected int vfEntityKindentityKind SFInt32 0 -
vfEntitySpecific
protected int vfEntitySpecificentitySpecific SFInt32 0 -
vfEntitySubcategory
protected int vfEntitySubcategoryentitySubcategory SFInt32 0 -
vfEntityCountry
protected int vfEntityCountryentityCountry SFInt32 0 -
vfReadInterval
protected double vfReadIntervalreadInterval SFTime 0.1 -
vfWriteInterval
protected double vfWriteIntervalwriteInterval SFTime 1 -
vfNetworkMode
networkMode SFString "standAlone" -
vfXMPPParams
xmppParams MFString [] -
networkModes
-
currentMode
protected int currentModeCurrent mode as integer constant -
vfAddress
address SFString "localhost" -
vfPort
protected int vfPortport SFInt32 0 -
vfEventApplicationID
protected int vfEventApplicationIDeventApplicationID SFInt32 -
vfEventEntityID
protected int vfEventEntityIDeventEntityID SFInt32 -
vfEventSiteID
protected int vfEventSiteIDeventSiteID SFInt32 -
vfFired1
protected boolean vfFired1fired1 SFBool -
vfFired2
protected boolean vfFired2fired2 SFBool -
vfFireMissionIndex
protected int vfFireMissionIndexfireMissionIndex SFInt32 -
vfFiringRange
protected float vfFiringRangefiringRange SFFloat -
vfFiringRate
protected int vfFiringRatefiringRate SFInt32 -
vfMunitionApplicationID
protected int vfMunitionApplicationIDmunitionApplicationID SFInt32 -
vfMunitionEntityID
protected int vfMunitionEntityIDmunitionEntityID SFInt32 -
vfMunitionSiteID
protected int vfMunitionSiteIDmunitionSiteID SFInt32 -
vfMunitionEndPoint
protected float[] vfMunitionEndPointmunitionEndPoint SFVec3f 0 0 0 -
vfMunitionStartPoint
protected float[] vfMunitionStartPointmunitionStartPoint SFVec3f 0 0 0 -
vfFiredTime
protected double vfFiredTimefiredTime SFTime -
vfIsDetonated
protected boolean vfIsDetonateddetonationResult SFBool -
vfDetonateTime
protected double vfDetonateTimedetonationResult SFTime -
vfDetonationResult
protected int vfDetonationResultdetonationResult SFInt32 0 -
vfDetonationLocation
protected float[] vfDetonationLocationdetonationLocation SFVec3f 0 0 0 -
vfDetonationRelativeLocation
protected float[] vfDetonationRelativeLocationdetonationRelativeLocation SFVec3f 0 0 0 -
vfArticulationParameterCount
protected int vfArticulationParameterCountarticulationParameterCount SFInt32 0 -
vfArticulationParameterArray
protected float[] vfArticulationParameterArrayarticulationParameterArray MFFloat [] -
numArticulationParameterArray
protected int numArticulationParameterArrayNumber of valid values in vfArticulationParameterArray -
vfArticulationParameterValue0
protected float vfArticulationParameterValue0articulationParameterValueChanged0_changed SFFloat -
vfArticulationParameterValue1
protected float vfArticulationParameterValue1articulationParameterValueChanged1_changed SFFloat -
vfArticulationParameterValue2
protected float vfArticulationParameterValue2articulationParameterValueChanged2_changed SFFloat -
vfArticulationParameterValue3
protected float vfArticulationParameterValue3articulationParameterValueChanged3_changed SFFloat -
vfArticulationParameterValue4
protected float vfArticulationParameterValue4articulationParameterValueChanged4_changed SFFloat -
vfArticulationParameterValue5
protected float vfArticulationParameterValue5articulationParameterValueChanged5_changed SFFloat -
vfArticulationParameterValue6
protected float vfArticulationParameterValue6articulationParameterValueChanged6_changed SFFloat -
vfArticulationParameterValue7
protected float vfArticulationParameterValue7articulationParameterValueChanged7_changed SFFloat -
vfForceID
protected int vfForceIDforceID SFInt32 0 -
vfIsActive
protected boolean vfIsActiveisActive SFBool -
vfLinearVelocity
protected float[] vfLinearVelocitylinearVelocity SFVec3f -
vfLinearAcceleration
protected float[] vfLinearAccelerationlinearAcceleration SFVec3f -
vfGeoSystem
geoSystem MFString ["GD","WE"] -
pGeoOrigin
Proto version of the geoOrigin -
vfGeoOrigin
field SFNode geoOrigin -
vfTimestamp
protected double vfTimestamptimestamp SFTime -
needToWrite
protected boolean needToWriteDo we have new values to write -
lastWrite
protected double lastWriteWhen did we last write a value -
roleListeners
List of those who want to know about role changes, likely 1 -
tmatrix
protected javax.vecmath.Matrix4f tmatrix -
vrmlClock
The clock used to drive collide time eventOuts -
ignoreEspdu
protected boolean ignoreEspduShould we ignore espdus. Only allow 1 per frame
-
-
Constructor Details
-
BaseEspduTransform
public BaseEspduTransform()Construct a default instance of this node. The defaults are set by the VRML specification. -
BaseEspduTransform
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
-
setRotation
Set the rotation component of the of transform. Setting a value of null is an error- Parameters:
rot- The new rotation component- Throws:
InvalidFieldValueException- The rotation was null
-
getRotation
public float[] getRotation()Get the current rotation component of the transform.- Returns:
- The current rotation
-
setTranslation
TODO: Shouldn't this perform the X3D -> DIS conversion of (x, y, z) -> (x, z, -y) as per the spec? Set the translation component of the transform. Setting a value of null is an error- Parameters:
tx- The new translation component- Throws:
InvalidFieldValueException- The translation was null
-
getTranslation
public float[] getTranslation()Get the current translation component of the transform.- Returns:
- The current translation
-
setScale
Set the scale component of the of transform. Setting a value of null is an error- Parameters:
scale- The new scale component- Throws:
InvalidFieldValueException- The scale was null
-
getScale
public float[] getScale()Get the current scale component of the transform.- Returns:
- The current scale
-
setScaleOrientation
Set the scale orientation component of the of transform. Setting a value of null is an error- Parameters:
so- The new scale orientation component- Throws:
InvalidFieldValueException- The scale orientation was null
-
getScaleOrientation
public float[] getScaleOrientation()Get the current scale orientation component of the transform.- Returns:
- The current scale orientation
-
setCenter
Set the center component of the of transform. Setting a value of null is an error- Parameters:
center- The new center component- Throws:
InvalidFieldValueException- The center was null
-
getCenter
public float[] getCenter()Get the current center component of the transform.- Returns:
- The current center
-
allEventsComplete
public void allEventsComplete()Description copied from interface:FrameStateListenerNotification 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:
allEventsCompletein interfaceFrameStateListener- Overrides:
allEventsCompletein classAbstractNode
-
getPrimaryType
public int getPrimaryType()Description copied from class:BaseGroupingNodeGet the primary type of this node. Replaces the instanceof mechanism for use in switch statements.- Specified by:
getPrimaryTypein interfaceVRMLNode- Overrides:
getPrimaryTypein classBaseGroupingNode- Returns:
- The primary type
-
setupFinished
public void setupFinished()Description copied from class:BaseGroupingNodeNotification 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:
setupFinishedin interfaceVRMLNodeType- Overrides:
setupFinishedin classBaseGroupingNode
-
getProtocol
Description copied from interface:VRMLNetworkInterfaceNodeTypeGet the protocol this node supports.- Specified by:
getProtocolin interfaceVRMLNetworkInterfaceNodeType- Returns:
- The protocol.
-
getRole
public int getRole()Description copied from interface:VRMLNetworkInterfaceNodeTypeGet the role of this node.- Specified by:
getRolein interfaceVRMLNetworkInterfaceNodeType- Returns:
- One of the role constants, ROLE_*.
-
addNetworkRoleListener
Description copied from interface:VRMLNetworkInterfaceNodeTypeAdd a NetworkRoleListener.- Specified by:
addNetworkRoleListenerin interfaceVRMLNetworkInterfaceNodeType- Parameters:
l- The listener. Duplicates and nulls are ignored.
-
removeNetworkRoleListener
Description copied from interface:VRMLNetworkInterfaceNodeTypeRemove a NetworkRoleListener.- Specified by:
removeNetworkRoleListenerin interfaceVRMLNetworkInterfaceNodeType- Parameters:
l- The listener
-
setVRMLClock
Description copied from interface:VRMLTimeDependentNodeTypeSet the clock that this time dependent node will be running with. The clock provides all the information and listeners for keeping track of time. Setting a value of null will ask the node to remove the clock from it's use so that the node may be removed from the scene.- Specified by:
setVRMLClockin interfaceVRMLTimeDependentNodeType- Parameters:
clock- The clock to use for this node
-
getFieldIndex
Description copied from interface:VRMLNodeGet the index of the given field name. If the name does not exist for this node then return a value of -1.- Specified by:
getFieldIndexin interfaceVRMLNode- Parameters:
fieldName- The name of the field we want the index from- Returns:
- The index of the field name or -1
-
getSecondaryType
public int[] getSecondaryType()Description copied from interface:VRMLNodeGet the secondary types of this node. Replaces the instanceof mechanism for use in switch statements. If there are no secondary types, it will return a zero-length array.- Specified by:
getSecondaryTypein interfaceVRMLNode- Overrides:
getSecondaryTypein classAbstractNode- Returns:
- The secondary type
-
getNodeFieldIndices
public int[] getNodeFieldIndices()Description copied from interface:VRMLNodeGet the list of indices that correspond to fields that contain nodes i.e. 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.- Specified by:
getNodeFieldIndicesin interfaceVRMLNode- Returns:
- The list of field indices that correspond to SF/MFnode fields or null if none
-
getFieldDeclaration
Description copied from interface:VRMLNodeGet 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.- Specified by:
getFieldDeclarationin interfaceVRMLNode- Parameters:
index- The index of the field to get information- Returns:
- A representation of this field's information
-
getNumFields
public int getNumFields()Description copied from interface:VRMLNodeGet the number of fields defined for this node.- Specified by:
getNumFieldsin interfaceVRMLNode- Returns:
- The number of fields.
-
getFieldValue
Description copied from class:BaseGroupingNodeGet 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:
getFieldValuein interfaceVRMLNodeType- Overrides:
getFieldValuein classBaseGroupingNode- Parameters:
index- The index of the field to change.- Returns:
- The class representing the field value
- Throws:
InvalidFieldException- The field index is not known
-
sendRoute
Description copied from class:BaseGroupingNodeSend a routed value from this node to the given destination node. The route should use the appropriate setValue() method of the destination node. It should not attempt to cast the node up to a higher level. Routing should also follow the standard rules for the loop breaking and other appropriate rules for the specification.- Specified by:
sendRoutein interfaceVRMLNodeType- Overrides:
sendRoutein classBaseGroupingNode- Parameters:
time- The time that this route occurred (not necessarily epoch time. Should be treated as a relative value only)srcIndex- The index of the field in this node that the value should be sent fromdestNode- The node reference that we will be sending the value todestIndex- The index of the field in the destination node that the value should be sent to.
-
setValue
public void setValue(int index, String[] value, int numValid) throws InvalidFieldException, InvalidFieldValueException Description copied from interface:VRMLNodeTypeSet the value of the field at the given index as an array of strings. This would be used to set MFString field types.- Specified by:
setValuein interfaceVRMLNodeType- Overrides:
setValuein classAbstractNode- Parameters:
index- The index of destination field to setvalue- The new value to use for the nodenumValid- The number of valid values to copy from the array- Throws:
InvalidFieldException- The field index is not knownInvalidFieldValueException- The value provided is not in range or not appropriate for this field
-
setValue
public void setValue(int index, VRMLNodeType child) throws InvalidFieldException, InvalidFieldValueException Description copied from class:BaseGroupingNodeSet the value of the field at the given index as an array of nodes. This would be used to set MFNode field types.- Specified by:
setValuein interfaceVRMLNodeType- Overrides:
setValuein classBaseGroupingNode- 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 value provided is out of range for the field type.
-
setValue
public void setValue(int index, boolean value) throws InvalidFieldException, InvalidFieldValueException Description copied from interface:VRMLNodeTypeSet the value of the field at the given index as an boolean. This would be used to set SFBool field types.- Specified by:
setValuein interfaceVRMLNodeType- Overrides:
setValuein classBaseGroupingNode- 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 not in range or not appropriate for this field
-
setValue
Description copied from interface:VRMLNodeTypeSet the value of the field at the given index as an integer. This would be used to set SFInt32 field types.- Specified by:
setValuein interfaceVRMLNodeType- Overrides:
setValuein 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 not in range or not appropriate for this field
-
setValue
public void setValue(int index, float[] value, int numValid) throws InvalidFieldException, InvalidFieldValueException Description copied from interface:VRMLNodeTypeSet the value of the field at the given index as an array of floats. This would be used to set MFFloat, SFVec2f, SFVec3f and SFRotation field types.- Specified by:
setValuein interfaceVRMLNodeType- Overrides:
setValuein classBaseGroupingNode- Parameters:
index- The index of destination field to setvalue- The new value to use for the nodenumValid- The number of valid values to copy from the array- Throws:
InvalidFieldException- The field index is not knownInvalidFieldValueException- The value provided is not in range or not appropriate for this field
-
setValue
public void setValue(int index, float value) throws InvalidFieldException, InvalidFieldValueException Description copied from interface:VRMLNodeTypeSet the value of the field at the given index as a float. This would be used to set SFFloat field types.- Specified by:
setValuein interfaceVRMLNodeType- Overrides:
setValuein 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 not in range or not appropriate for this field
-
setValue
public void setValue(int index, double value) throws InvalidFieldException, InvalidFieldValueException Description copied from interface:VRMLNodeTypeSet the value of the field at the given index as an double. This would be used to set SFDouble field types.- Specified by:
setValuein interfaceVRMLNodeType- Overrides:
setValuein 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 not in range or not appropriate for this field
-
setValue
public void setValue(int index, String value) throws InvalidFieldException, InvalidFieldValueException Description copied from interface:VRMLNodeTypeSet the value of the field at the given index as a string. This would be used to set SFString field types.- Specified by:
setValuein interfaceVRMLNodeType- Overrides:
setValuein 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 not in range or not appropriate for this field
-
getSiteID
public int getSiteID()Description copied from interface:VRMLDISNodeTypeGet the siteID specified for this node.- Specified by:
getSiteIDin interfaceVRMLDISNodeType- Returns:
- the siteID.
-
getAppID
public int getAppID()Description copied from interface:VRMLDISNodeTypeGet the applicationID specified for this node.- Specified by:
getAppIDin interfaceVRMLDISNodeType- Returns:
- the applicationID.
-
getEntityID
public int getEntityID()Description copied from interface:VRMLDISNodeTypeGet the entityID specified for this node.- Specified by:
getEntityIDin interfaceVRMLDISNodeType- Returns:
- the entityID.
-
getAddress
Description copied from interface:VRMLDISNodeTypeGet the network address to listen to.- Specified by:
getAddressin interfaceVRMLDISNodeType- Returns:
- The address.
-
getPort
public int getPort()Description copied from interface:VRMLDISNodeTypeGet the network port to listen to.- Specified by:
getPortin interfaceVRMLDISNodeType- Returns:
- The port.
-
getUsername
Description copied from interface:VRMLDISNodeTypeGet the chat room username.- Specified by:
getUsernamein interfaceVRMLDISNodeType- Returns:
- The username. null if none provided
-
getPassword
Description copied from interface:VRMLDISNodeTypeGet the chat room password.- Specified by:
getPasswordin interfaceVRMLDISNodeType- Returns:
- The password. null if none provided
-
getAuthServer
Description copied from interface:VRMLDISNodeTypeGet the chat room auth server's.- Specified by:
getAuthServerin interfaceVRMLDISNodeType- Returns:
- The auth servers. null if none provided
-
getMucServer
Description copied from interface:VRMLDISNodeTypeGet the chat room mucServer.- Specified by:
getMucServerin interfaceVRMLDISNodeType- Returns:
- The mucServer. null if none provided
-
getMucRoom
Description copied from interface:VRMLDISNodeTypeGet the chat room mucRoom.- Specified by:
getMucRoomin interfaceVRMLDISNodeType- Returns:
- The mucRoom. null if none provided
-
setIsActive
public void setIsActive(boolean active) Description copied from interface:VRMLDISNodeTypeSet the isActive state for a DIS node.- Specified by:
setIsActivein interfaceVRMLDISNodeType- Parameters:
active- Whether the node is active(traffic within 5 seconds).
-
valuesToWrite
public boolean valuesToWrite()Description copied from interface:VRMLDISNodeTypeDoes the this node have new information to write. This only accounts for local values, not required DIS heartbeat rules.- Specified by:
valuesToWritein interfaceVRMLDISNodeType- Returns:
- TRUE if values have changed.
-
getState
public edu.nps.moves.dis7.pdus.Pdu getState()Description copied from interface:VRMLDISNodeTypeGet the nodes current state. Assume that a single local scratch var can be reused each time.- Specified by:
getStatein interfaceVRMLDISNodeType- Returns:
- The DIS state.
-
packetArrived
public void packetArrived(edu.nps.moves.dis7.pdus.Pdu pdu) Description copied from interface:VRMLDISNodeTypeTell the DIS node that a packet arrived. Used to update timestamp information and update local fields.- Specified by:
packetArrivedin interfaceVRMLDISNodeType- Parameters:
pdu-
-
updateMatrix
protected void updateMatrix()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 -
fireRoleChanged
protected void fireRoleChanged()Send a notification to the registered listeners the role has been changed. If no listeners have been registered, then this does nothing, so always call it regardless. -
regenID
public void regenID()Regenerate the ID used for writing values to the network.
-