<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
<![CDATA[
ecmascript: function initialize () { tracePrint('TraceScript initialize() start...'); tracePrint('traceColor=' + traceColor); tracePrint('traceOffset=' + traceOffset); tracePrint('traceFontSize=' + traceFontSize); tracePrint('traceJava=' + traceJava); tracePrint('marking=' + espduTransformNode.marking); tracePrint('address=' + espduTransformNode.address); tracePrint(' port=' + espduTransformNode.port); tracePrint('networkMode=' + espduTransformNode.networkMode); if (espduTransformNode.networkMode == 'networkReader') { readInterval = espduTransformNode.readInterval; writeInterval = 0; } if (espduTransformNode.networkMode == 'networkWriter') { readInterval = 0; writeInterval = espduTransformNode.writeInterval; } tracePrint('readInterval=' + espduTransformNode.readInterval); tracePrint('writeInterval=' + espduTransformNode.writeInterval); prior_marking = espduTransformNode.marking; prior_readInterval = espduTransformNode.readInterval; prior_writeInterval = espduTransformNode.writeInterval; prior_translation = espduTransformNode.translation; prior_geoCoords_changed = espduTransformNode.geoCoords_changed; prior_fired1 = espduTransformNode.fired1; prior_fired2 = espduTransformNode.fired2; outputString1 = espduTransformNode.marking + ' (' + espduTransformNode.siteID + ', ' + espduTransformNode.applicationID + ', ' + espduTransformNode.entityID + ')'; outputString2 = 'awaiting PDUs...'; traceString = new MFString (outputString1, outputString2); tracePrint ('traceString=' + traceString); // if (offsetFollowsEspduTransform) // { // // create ROUTEs to connect parent EspduTransform // } tracePrint('TraceScript initialize() finish.'); } function touched (isActiveValue, timestamp) { tracePrint ('touched=' + isActiveValue + ', no action'); } function update (value, timestamp) { // tracePrint('begin update() ...'); changed = false; // only send output events when changed if (prior_marking != espduTransformNode.marking) { tracePrint('update() changed marking'); marking = espduTransformNode.marking; prior_marking = marking; changed = true; } if (prior_readInterval != espduTransformNode.readInterval) { tracePrint('update() changed readInterval'); readInterval = espduTransformNode.readInterval; prior_readInterval = espduTransformNode.readInterval; changed = true; } if (prior_writeInterval != espduTransformNode.writeInterval) { tracePrint('update() changed writeInterval'); writeInterval = espduTransformNode.writeInterval; prior_writeInterval = espduTransformNode.writeInterval; changed = true; } if ( (prior_translation.x != espduTransformNode.translation.x) || (prior_translation.y != espduTransformNode.translation.y) || (prior_translation.z != espduTransformNode.translation.z)) { tracePrint('update() changed translation'); prior_translation = espduTransformNode.translation; changed = true; } if (prior_geoCoords_changed != espduTransformNode.geoCoords_changed) { tracePrint('update() changed geoCoords_changed'); prior_geoCoords_changed = espduTransformNode.geoCoords_changed; changed = true; } // tracePrint('espduTransformNode.translation=' + espduTransformNode.translation); // tracePrint('prior_translation=' + prior_translation); // tracePrint('prior_geoCoords_changed=' + prior_geoCoords_changed); if (prior_fired1 != espduTransformNode.fired1) { tracePrint('update() changed fired1'); fired1 = espduTransformNode.fired1; fireTime = timestamp; prior_fired1 = espduTransformNode.fired1; changed = true; } if (prior_fired2 != espduTransformNode.fired2) { tracePrint('update() changed fired2'); fired2 = espduTransformNode.fired2; fireTime = timestamp; prior_fired2 = espduTransformNode.fired2; changed = true; } if (changed == true) // produce, then send trace text { tracePrint('update() changed == true'); outputString1 = espduTransformNode.marking + ' (' + espduTransformNode.siteID + ', ' + espduTransformNode.applicationID + ', ' + espduTransformNode.entityID + ')'; outputString2 = prior_geoCoords_changed; traceString = new MFString (outputString1, outputString2); } tracePrint('end update() changed=' + changed); } function roundoff (x) { return Math.round(x * 10) / 10; } function tracePrint(outputString) { if (localTraceEnabled) Browser.println ('[EspduTransformTrace ' + espduTransformNode.marking + '] ' + outputString); } function alwaysPrint(outputString) { Browser.println ('[EspduTransformTrace ' + espduTransformNode.marking + '] ' + outputString); }
]]>
<![CDATA[
ecmascript: function initialize ( ) { tracePrint ('DEBUG_JAVASCRIPT initialize() start...'); translation_text[0] = espduTransformNode.marking + ' awaiting DIS'; // rotation_text [0] = 'translation and rotation updates'; // marking_address_text[0] = 'multicast group: ' + address +'/' + port + ', ID:'// + siteID + ',' + applicationID + ',' + entityID; MFmarking[0] = espduTransformNode.marking; tracePrint ('DEBUG_JAVASCRIPT initialize() finish.'); } function set_translation ( translation, ts ) { if (active) { // round to nearest tenth translation.x = Math.round (translation.x * 10.0) / 10.0; translation.y = Math.round (translation.y * 10.0) / 10.0; translation.z = Math.round (translation.z * 10.0) / 10.0; translation_text[0] = marking + ' translation ' + translation; } } function set_rotation ( rotation, ts ) { if (active) { // round terms to nearest thousandth rotation.x = Math.round (rotation.x * 1000.0) / 1000.0; rotation.y = Math.round (rotation.y * 1000.0) / 1000.0; rotation.z = Math.round (rotation.z * 1000.0) / 1000.0; rotation.angle = (rotation.angle * 180.0) / 3.141592653; rotation.angle = Math.round (rotation.angle * 10.0) / 10.0; // rotation_text [0] = 'rotation ' + rotation + ' axis/degrees'; } } function touch (value, time) { active = !active; result = active; if (result) { translation_text[0] = marking + ' awaiting DIS'; // rotation_text [0] = 'translation and rotation updates'; // marking_address_text[0] = 'multicast group: ' + address +'/' + port + ', ID:'// + siteID + ',' + applicationID + ',' + entityID; MFmarking[0] = marking; } else { translation_text[0] = ''; rotation_text [0] = ''; marking_address_text[0] = ''; MFmarking[0] = ''; } } function timestamp ( value, ts ) { tracePrint ('DIS timestamp=' + value + ', event timestamp=' + ts); } function collided ( value, ts ) { tracePrint ('collided=' + value); } function detonated ( value, ts ) { tracePrint ('detonated=' + value); } function articulationParameterCount ( value, ts ) { tracePrint ('articulationParameterCount=' + value); } function articulationParameterValue0 ( value, ts ) { tracePrint ('articulationParameterValue0=' + value); } function articulationParameterValue1 ( value, ts ) { tracePrint ('articulationParameterValue1=' + value); } function articulationParameterValue2 ( value, ts ) { tracePrint ('articulationParameterValue2=' + value); } function articulationParameterValue3 ( value, ts ) { tracePrint ('articulationParameterValue3=' + value); } function articulationParameterValue4 ( value, ts ) { tracePrint ('articulationParameterValue4=' + value); } function articulationParameterValue5 ( value, ts ) { tracePrint ('articulationParameterValue5=' + value); } function articulationParameterValue6 ( value, ts ) { tracePrint ('articulationParameterValue6=' + value); } function articulationParameterValue7 ( value, ts ) { tracePrint ('articulationParameterValue7=' + value); } function articulationParameterValue8 ( value, ts ) { tracePrint ('articulationParameterValue8=' + value); } function articulationParameterValue9 ( value, ts ) { tracePrint ('articulationParameterValue9=' + value); } function articulationParameterValue10 ( value, ts ) { tracePrint ('articulationParameterValue10=' + value); } function articulationParameterValue11 ( value, ts ) { tracePrint ('articulationParameterValue11=' + value); } function articulationParameterValue12 ( value, ts ) { tracePrint ('articulationParameterValue12=' + value); } function articulationParameterValue13 ( value, ts ) { tracePrint ('articulationParameterValue13=' + value); } function articulationParameterValue14 ( value, ts ) { tracePrint ('articulationParameterValue14=' + value); } function munitionStartPoint ( value, ts ) { tracePrint ('munitionStartPoint=' + value); } function munitionEndPoint ( value, ts ) { tracePrint ('munitionEndPoint=' + value); } function rtpHeaderHeard ( value, ts ) { tracePrint ('unexpected RTP header status, rtpHeaderHeard=' + value); } function tracePrint(outputString) { if (localTraceEnabled) Browser.println ('[EspduTransformTrace ' + espduTransformNode.marking + '] ' + outputString); } function alwaysPrint(outputString) { Browser.println ('[EspduTransformTrace ' + espduTransformNode.marking + '] ' + outputString); }
]]>
<![CDATA[
ecmascript: function initialize ( ) { tracePrint ('SetFireLineEndpoints initialize() start...'); holdArray [0] = new SFVec3f (0.0, 0.0, 0.0); holdArray [1] = new SFVec3f (0.0, 0.0, 0.0); pointArray = holdArray; tracePrint ('SetFireLineEndpoints initialize() start...'); } function set_munitionStartPoint ( value, timestamp ) { holdArray [0] = value; } function set_munitionEndPoint ( value, timestamp ) { holdArray [1] = value; pointArray = holdArray; // tracePrint ('fire line endpoints=' + holdArray); } function tracePrint(outputString) { if (localTraceEnabled) Browser.println ('[EspduTransformTrace SetFireLineEndpoints] ' + outputString); } function alwaysPrint(outputString) { Browser.println ('[EspduTransformTrace SetFireLineEndpoints] ' + outputString); }
]]>
<![CDATA[
ecmascript: function initialize ( ) { tracePrint ('FireSequenceScript initialize() start...'); firstFired1 = false; firstFired2 = false; tracePrint ('FireSequenceScript initialize() finish.'); } function fireTime (value, timestamp) { // no action } function set_fired1 (value, timestamp) { if ((value == true) && (firstFired1 == false)) { firstFired1 = true; tracePrint ('EspduTransformPROTO.wrl: fired1 FIRE_SEQUENCE_SCRIPT timestamp ' + fireTime); } } function set_fired2 (value, timestamp) { if ((value == true) && (firstFired1 == false)) { firstFired2 = true; tracePrint ('EspduTransformPROTO.wrl: fired2 FIRE_SEQUENCE_SCRIPT timestamp ' + fireTime); } } function tracePrint(outputString) { if (localTraceEnabled) Browser.println ('[EspduTransformTrace FireSequenceScript] ' + outputString); } function alwaysPrint(outputString) { Browser.println ('[EspduTransformTrace FireSequenceScript] ' + outputString); }
]]>
Event Graph ROUTE Table entries with 14 ROUTE connections total, showing X3D event-model relationships for this scene.
Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.
ReadIntervalClock
TimeSensor cycleTime SFTime |
EspduScriptNode
Script update SFTime |
WriteIntervalClock
TimeSensor cycleTime SFTime |
EspduScriptNode
Script update SFTime |
SetFireLineEndpoints
Script pointArray MFVec3f |
LineOfFireCoordinateNode
Coordinate set_point MFVec3f |
ProtoInstance EspduTransformTrace |
No ROUTE connection found for output from this node. Contains SFNode/MFNode field with indirect access to other nodes. |
EspduTrans
EspduTransform translation SFVec3f |
TraceTransform
Transform set_translation SFVec3f |
|
EspduTrans
EspduTransform rotation SFRotation |
TraceTransform
Transform set_rotation SFRotation |
<!--
Online at
https://www.web3d.org/x3d/content/examples/Basic/DistributedInteractiveSimulation/EspduTransformPrototypesIndex.html
-->
<!--
Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/DistributedInteractiveSimulation/EspduTransformPrototypes.x3d
-->
<!--
Color legend: X3D terminology
<X3dNode
DEF='idName' field='value'/>
matches XML terminology
<XmlElement
DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement)
(Grey background inside box: inserted documentation)
(Magenta background: X3D Extensibility)
<ProtoInstance
name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->