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 int
Current mode as integer constantprotected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
Field Indexprotected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected boolean
Should we ignore espdus.protected static final int
The last field index used by this classprotected double
When did we last write a valueprotected static final int
Network modes, readerprotected static final int
Network modes, standaloneprotected static final int
Network modes, writerprotected boolean
Do we have new values to writenetworkMode string to int conversion, String to Integerprotected static final int
Number of fields constantprotected int
Number of valid values in vfArticulationParameterArrayprotected VRMLProtoInstance
Proto version of the geoOriginprotected static final String
Protocol implementedprotected List
<NetworkRoleListener> List of those who want to know about role changes, likely 1protected javax.vecmath.Matrix4f
protected String
address SFString "localhost"protected int
appearance SFInt32 0protected int
applicationID SFInt32 0protected float[]
articulationParameterArray MFFloat []protected int
articulationParameterCount SFInt32 0protected float
articulationParameterValueChanged0_changed SFFloatprotected float
articulationParameterValueChanged1_changed SFFloatprotected float
articulationParameterValueChanged2_changed SFFloatprotected float
articulationParameterValueChanged3_changed SFFloatprotected float
articulationParameterValueChanged4_changed SFFloatprotected float
articulationParameterValueChanged5_changed SFFloatprotected float
articulationParameterValueChanged6_changed SFFloatprotected float
articulationParameterValueChanged7_changed SFFloatprotected float[]
SFVec3f centerprotected double
detonationResult SFTimeprotected float[]
detonationLocation SFVec3f 0 0 0protected float[]
detonationRelativeLocation SFVec3f 0 0 0protected int
detonationResult SFInt32 0protected int
entityCategory SFInt32 0protected int
entityCountry SFInt32 0protected int
entityDomain SFInt32 0protected int
entityExtra SFInt32 0protected int
entityID SFInt32 0protected int
entityKind SFInt32 0protected int
entitySpecific SFInt32 0protected int
entitySubcategory SFInt32 0protected int
eventApplicationID SFInt32protected int
eventEntityID SFInt32protected int
eventSiteID SFInt32protected boolean
fired1 SFBoolprotected boolean
fired2 SFBoolprotected double
firedTime SFTimeprotected int
fireMissionIndex SFInt32protected float
firingRange SFFloatprotected int
firingRate SFInt32protected int
forceID SFInt32 0protected VRMLLocalOriginNodeType
field SFNode geoOriginprotected String[]
geoSystem MFString ["GD","WE"]protected boolean
isActive SFBoolprotected boolean
detonationResult SFBoolprotected float[]
linearAcceleration SFVec3fprotected float[]
linearVelocity SFVec3fprotected String
marking SFString ""protected int
munitionApplicationID SFInt32protected float[]
munitionEndPoint SFVec3f 0 0 0protected int
munitionEntityID SFInt32protected int
munitionSiteID SFInt32protected float[]
munitionStartPoint SFVec3f 0 0 0protected String
networkMode SFString "standAlone"protected int
port SFInt32 0protected double
readInterval SFTime 0.1protected float[]
SFRotation rotationprotected float[]
SFVec3f scaleprotected float[]
SFRotation scaleOrientationprotected int
siteID SFInt32 0protected double
timestamp SFTimeprotected float[]
SFVec3f translationprotected double
writeInterval SFTime 1protected String[]
xmppParams MFString []protected VRMLClock
The 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, 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 TypeMethodDescriptionvoid
Add a NetworkRoleListener.void
Notification that the rendering of the event model is complete and that rendering is about to begin.protected void
Send a notification to the registered listeners the role has been changed.Get the network address to listen to.int
getAppID()
Get the applicationID specified for this node.String[]
Get the chat room auth server's.float[]
Get the current center component of the transform.int
Get the entityID specified for this node.getFieldDeclaration
(int index) Get the declaration of the field at the given index.int
getFieldIndex
(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).int
Get the number of fields defined for this node.Get the chat room password.int
getPort()
Get the network port to listen to.int
Get the primary type of this node.Get the protocol this node supports.int
getRole()
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.int
Get the siteID specified for this node.edu.nps.moves.dis7.pdus.Pdu
getState()
Get the nodes current state.float[]
Get the current translation component of the transform.Get the chat room username.void
packetArrived
(edu.nps.moves.dis7.pdus.Pdu pdu) Tell the DIS node that a packet arrived.void
regenID()
Regenerate the ID used for writing values to the network.void
Remove a NetworkRoleListener.void
sendRoute
(double time, int srcIndex, VRMLNodeType destNode, int destIndex) Send a routed value from this node to the given destination node.void
setCenter
(float[] center) Set the center component of the of transform.void
setIsActive
(boolean active) Set the isActive state for a DIS node.void
setRotation
(float[] rot) Set the rotation component of the of transform.void
setScale
(float[] scale) Set the scale component of the of transform.void
setScaleOrientation
(float[] so) Set the scale orientation component of the of transform.void
setTranslation
(float[] tx) TODO: Shouldn't this perform the X3D -> DIS conversion of (x, y, z) -> (x, z, -y) as per the spec?void
Notification that the construction phase of this node has finished.void
setValue
(int index, boolean value) Set the value of the field at the given index as an boolean.void
setValue
(int index, double value) Set the value of the field at the given index as an double.void
setValue
(int index, float value) Set the value of the field at the given index as a float.void
setValue
(int index, float[] value, int numValid) Set the value of the field at the given index as an array of floats.void
setValue
(int index, int value) Set the value of the field at the given index as an integer.void
Set the value of the field at the given index as a string.void
Set the value of the field at the given index as an array of strings.void
setValue
(int index, VRMLNodeType child) Set the value of the field at the given index as an array of nodes.void
setVRMLClock
(VRMLClock clock) Set the clock that this time dependent node will be running with.protected void
Calculate transforms needed to handle VRML semantics and place the results in the matrix variable of this class.boolean
Does 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, 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, notifyExternProtoLoaded, 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
getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion
Methods 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: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 classAbstractNode
-
getPrimaryType
public int getPrimaryType()Description copied from class:BaseGroupingNode
Get the primary type of this node. Replaces the instanceof mechanism for use in switch statements.- Specified by:
getPrimaryType
in interfaceVRMLNode
- Overrides:
getPrimaryType
in classBaseGroupingNode
- Returns:
- The primary type
-
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 classBaseGroupingNode
-
getProtocol
Description copied from interface:VRMLNetworkInterfaceNodeType
Get the protocol this node supports.- Specified by:
getProtocol
in interfaceVRMLNetworkInterfaceNodeType
- Returns:
- The protocol.
-
getRole
public int getRole()Description copied from interface:VRMLNetworkInterfaceNodeType
Get the role of this node.- Specified by:
getRole
in interfaceVRMLNetworkInterfaceNodeType
- Returns:
- One of the role constants, ROLE_*.
-
addNetworkRoleListener
Description copied from interface:VRMLNetworkInterfaceNodeType
Add a NetworkRoleListener.- Specified by:
addNetworkRoleListener
in interfaceVRMLNetworkInterfaceNodeType
- Parameters:
l
- The listener. Duplicates and nulls are ignored.
-
removeNetworkRoleListener
Description copied from interface:VRMLNetworkInterfaceNodeType
Remove a NetworkRoleListener.- Specified by:
removeNetworkRoleListener
in interfaceVRMLNetworkInterfaceNodeType
- Parameters:
l
- The listener
-
setVRMLClock
Description copied from interface:VRMLTimeDependentNodeType
Set 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:
setVRMLClock
in interfaceVRMLTimeDependentNodeType
- Parameters:
clock
- The clock to use for this node
-
getFieldIndex
Description copied from interface:VRMLNode
Get the index of the given field name. If the name does not exist for this node then return a value of -1.- Specified by:
getFieldIndex
in 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:VRMLNode
Get 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:
getSecondaryType
in interfaceVRMLNode
- Overrides:
getSecondaryType
in classAbstractNode
- Returns:
- The secondary type
-
getNodeFieldIndices
public int[] getNodeFieldIndices()Description copied from interface:VRMLNode
Get 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:
getNodeFieldIndices
in interfaceVRMLNode
- Returns:
- The list of field indices that correspond to SF/MFnode fields or null if none
-
getFieldDeclaration
Description copied from interface:VRMLNode
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.- Specified by:
getFieldDeclaration
in 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:VRMLNode
Get the number of fields defined for this node.- Specified by:
getNumFields
in interfaceVRMLNode
- Returns:
- The number of fields.
-
getFieldValue
Description copied from class:BaseGroupingNode
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 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:BaseGroupingNode
Send 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:
sendRoute
in interfaceVRMLNodeType
- Overrides:
sendRoute
in 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:VRMLNodeType
Set 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:
setValue
in interfaceVRMLNodeType
- Overrides:
setValue
in 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:BaseGroupingNode
Set 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:
setValue
in interfaceVRMLNodeType
- Overrides:
setValue
in 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:VRMLNodeType
Set the value of the field at the given index as an boolean. This would be used to set SFBool field types.- Specified by:
setValue
in interfaceVRMLNodeType
- Overrides:
setValue
in 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:VRMLNodeType
Set the value of the field at the given index as an integer. 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 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:VRMLNodeType
Set 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:
setValue
in interfaceVRMLNodeType
- Overrides:
setValue
in 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:VRMLNodeType
Set the value of the field at the given index as a float. This would be used to set SFFloat 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 not in range or not appropriate for this field
-
setValue
public void setValue(int index, double value) throws InvalidFieldException, InvalidFieldValueException Description copied from interface:VRMLNodeType
Set the value of the field at the given index as an double. This would be used to set SFDouble 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 not in range or not appropriate for this field
-
setValue
public void setValue(int index, String value) throws InvalidFieldException, InvalidFieldValueException Description copied from interface:VRMLNodeType
Set the value of the field at the given index as a string. This would be used to set SFString 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 not in range or not appropriate for this field
-
getSiteID
public int getSiteID()Description copied from interface:VRMLDISNodeType
Get the siteID specified for this node.- Specified by:
getSiteID
in interfaceVRMLDISNodeType
- Returns:
- the siteID.
-
getAppID
public int getAppID()Description copied from interface:VRMLDISNodeType
Get the applicationID specified for this node.- Specified by:
getAppID
in interfaceVRMLDISNodeType
- Returns:
- the applicationID.
-
getEntityID
public int getEntityID()Description copied from interface:VRMLDISNodeType
Get the entityID specified for this node.- Specified by:
getEntityID
in interfaceVRMLDISNodeType
- Returns:
- the entityID.
-
getAddress
Description copied from interface:VRMLDISNodeType
Get the network address to listen to.- Specified by:
getAddress
in interfaceVRMLDISNodeType
- Returns:
- The address.
-
getPort
public int getPort()Description copied from interface:VRMLDISNodeType
Get the network port to listen to.- Specified by:
getPort
in interfaceVRMLDISNodeType
- Returns:
- The port.
-
getUsername
Description copied from interface:VRMLDISNodeType
Get the chat room username.- Specified by:
getUsername
in interfaceVRMLDISNodeType
- Returns:
- The username. null if none provided
-
getPassword
Description copied from interface:VRMLDISNodeType
Get the chat room password.- Specified by:
getPassword
in interfaceVRMLDISNodeType
- Returns:
- The password. null if none provided
-
getAuthServer
Description copied from interface:VRMLDISNodeType
Get the chat room auth server's.- Specified by:
getAuthServer
in interfaceVRMLDISNodeType
- Returns:
- The auth servers. null if none provided
-
getMucServer
Description copied from interface:VRMLDISNodeType
Get the chat room mucServer.- Specified by:
getMucServer
in interfaceVRMLDISNodeType
- Returns:
- The mucServer. null if none provided
-
getMucRoom
Description copied from interface:VRMLDISNodeType
Get the chat room mucRoom.- Specified by:
getMucRoom
in interfaceVRMLDISNodeType
- Returns:
- The mucRoom. null if none provided
-
setIsActive
public void setIsActive(boolean active) Description copied from interface:VRMLDISNodeType
Set the isActive state for a DIS node.- Specified by:
setIsActive
in interfaceVRMLDISNodeType
- Parameters:
active
- Whether the node is active(traffic within 5 seconds).
-
valuesToWrite
public boolean valuesToWrite()Description copied from interface:VRMLDISNodeType
Does the this node have new information to write. This only accounts for local values, not required DIS heartbeat rules.- Specified by:
valuesToWrite
in interfaceVRMLDISNodeType
- Returns:
- TRUE if values have changed.
-
getState
public edu.nps.moves.dis7.pdus.Pdu getState()Description copied from interface:VRMLDISNodeType
Get the nodes current state. Assume that a single local scratch var can be reused each time.- Specified by:
getState
in interfaceVRMLDISNodeType
- Returns:
- The DIS state.
-
packetArrived
public void packetArrived(edu.nps.moves.dis7.pdus.Pdu pdu) Description copied from interface:VRMLDISNodeType
Tell the DIS node that a packet arrived. Used to update timestamp information and update local fields.- Specified by:
packetArrived
in 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.
-