<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile='Immersive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' http://www.web3d.org/specifications/x3d-3.0.xsd '>
<head>
<component level='1name='DIS'/>
<meta name='titlecontent='NancyTeamAddRoutes.x3d'/>
<meta name='creatorcontent='Thomas E. Miller'/>
<meta name='createdcontent='7 December 2000'/>
<meta name='modifiedcontent='6 May 2017'/>
<meta name='descriptioncontent='Human team aggregation for Capture the Flag.'/>
<meta name=' warning content=' Incomplete translation, work in progress '/>
<meta name='identifiercontent=' https://savage.nps.edu/Savage/Scenarios/CaptureTheFlag/NancyTeamAddRoutes.x3d '/>
<meta name='identifiercontent=' https://savage.nps.edu/Savage/Scenarios/CaptureTheFlag/.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!-- -->
<Scene>
<Group>
<!-- ROUTE information for NancyTeamAddRoutes_EspduTransform node:  [from articulationParameterValue0 to NancyTeamVisible.set_Visible ] [from articulationParameterValue1 to MountLeader.mountedState ] [from translation_changed to LeaderTransform.translation ] [from articulationParameterValue2 to MountRifle1.mountedState ] [from translation_changed to Rifle1Transform.translation ] [from articulationParameterValue3 to MountRifle2.mountedState ] [from translation_changed to Rifle2Transform.translation ] [from articulationParameterValue4 to MountAutogun.mountedState ] [from translation_changed to AutogunTransform.translation ] [from articulationParameterValue5 to MountGrenadier.mountedState ] [from translation_changed to GrenadierTransform.translation ] [from articulationParameterValue6 to MountHuey.mountedState ] [from translation_changed to HueyTransform.translation ] -->
<EspduTransform DEF='NancyTeamAddRoutes_EspduTransformaddress='224.2.181.145entityID='40marking='NancyTeam 40port='62040readInterval='0.25translation='-10 -200 2240'>
<!-- traceColor='0 0 1' traceJava='false' traceOffset='0 3 0' traceSize='1 1 1' -->
<Viewpoint description='NancyTeam 40 *** Trailorientation='0 1 0 -1.571position='-10 0.2 0'/>
<LOD range='30'>
<Group>
<Viewpoint description='Blue 40 Frontorientation='0 1 0 1.571position='20 0 0'/>
<Viewpoint description='Blue 40 Right Side Viewposition='0 0 15'/>
</Group>
<WorldInfo info='"null node for LOD to switch out the Viewpoint when distant"'/>
</LOD>
<!-- ROUTE information for NancyTeamSwap node:  [from NancyTeamVisible.Visible_changed to set_whichChoice ] -->
<Switch DEF='NancyTeamSwapwhichChoice='0'>
<Transform translation='0 1 0'>
<Shape>
<Appearance DEF='BLUE'>
<Material diffuseColor='0 0 1'/>
</Appearance>
<Box size='2 0.25 0.25'/>
</Shape>
<Shape>
<Appearance USE='BLUE'/>
<Box size='0.25 2 0.25'/>
</Shape>
<Shape>
<Appearance USE='BLUE'/>
<Box size='0.25 0.25 2'/>
</Shape>
<Transform rotation='0 0 -1 1.571translation='1 0 0'>
<Shape>
<Appearance USE='BLUE'/>
<Cone bottomRadius='0.375height='1'/>
</Shape>
</Transform>
<!-- ROUTE information for LeaderTransform node:  [from NancyTeamAddRoutes_EspduTransform.translation_changed to translation ] -->
<Transform DEF='LeaderTransform'> </Transform>
<!-- ROUTE information for Rifle1Transform node:  [from NancyTeamAddRoutes_EspduTransform.translation_changed to translation ] -->
<Transform DEF='Rifle1Transform'> </Transform>
<!-- ROUTE information for Rifle2Transform node:  [from NancyTeamAddRoutes_EspduTransform.translation_changed to translation ] -->
<Transform DEF='Rifle2Transform'> </Transform>
<!-- ROUTE information for AutogunTransform node:  [from NancyTeamAddRoutes_EspduTransform.translation_changed to translation ] -->
<Transform DEF='AutogunTransform'> </Transform>
<!-- ROUTE information for GrenadierTransform node:  [from NancyTeamAddRoutes_EspduTransform.translation_changed to translation ] -->
<Transform DEF='GrenadierTransform'> </Transform>
<!-- ROUTE information for HueyTransform node:  [from NancyTeamAddRoutes_EspduTransform.translation_changed to translation ] -->
<Transform DEF='HueyTransform'> </Transform>
<!-- ROUTE information for NancyTeamVisible node:  [from NancyTeamAddRoutes_EspduTransform.articulationParameterValue0 to set_Visible ] [from Visible_changed to NancyTeamSwap.set_whichChoice ] -->
<Script DEF='NancyTeamVisiblemustEvaluate='true'>
<field name='set_Visibletype='SFFloataccessType='inputOnly'/>
<field name='Visible_changedtype='SFInt32accessType='outputOnly'/>
<![CDATA[
              
ecmascript:
function set_Visible ( Visible, timeStamp )
{
	Browser.print ('Visible = ' + Visible);
	if ( Visible == -1 )
		Visible_changed = -1;
	else	Visible_changed = 0;
}

            
]]>
</Script>
<!-- ROUTE information for MountLeader node:  [from NancyTeamAddRoutes_EspduTransform.articulationParameterValue1 to mountedState ] -->
<Script DEF='MountLeaderdirectOutput='truemustEvaluate='true'>
<field name='mountedStatetype='SFFloataccessType='inputOnly'/>
<field name='translationtype='SFVec3faccessType='inputOnly'/>
<field name='zeroTranslationtype='SFVec3faccessType='outputOnly'/>
<field name='routeLoadedtype='SFBoolvalue='trueaccessType='initializeOnly'/>
<field name='routeUnloadedtype='SFBoolvalue='trueaccessType='initializeOnly'/>
<field name='thisNodetype='SFNodeaccessType='initializeOnly'>
<Script USE='MountLeader'>
</Script>
</field>
<field name='fromNodetype='SFNodeaccessType='initializeOnly'>
<EspduTransform USE='NancyTeamAddRoutes_EspduTransform'/>
</field>
<field name='toNodetype='SFNodeaccessType='initializeOnly'>
<Transform USE='LeaderTransform'/>
</field>
<![CDATA[
              
ecmascript:

function mountedState (mState, timeStamp)
{
	// 0=unmounted, 1=mounted
	if (mState == 0)
	{
		if (!routeUnloaded)
		{
			Browser.deleteRoute (fromNode, 'translation_changed', thisNode, 'translation');
			Browser.deleteRoute (thisNode, 'zeroTranslation',     toNode, 'set_translation');
			routeUnloaded = true;
			Browser.print ('Just deleted Local Translation Routes. routeUnloaded = ' + routeUnloaded);
		}
		if (!routeLoaded)
		{
			Browser.addRoute ( fromNode, 'translation_changed', toNode, 'set_translation');
			routeLoaded = true;
			Browser.print ('Just added Espdu Translation Routes. routeLoaded =' + routeLoaded);
		}
	}
	else
	{
		if (routeLoaded)
		{
			Browser.deleteRoute (fromNode, 'translation_changed', toNode, 'set_translation');
			routeLoaded = false;
			Browser.print ('Just deleted Espdu Translation Routes. routeLoaded = ' + routeLoaded);
		}
		if (routeUnloaded)
		{
			Browser.addRoute (fromNode, 'translation_changed', thisNode, 'translation');
			Browser.addRoute (thisNode, 'zeroTranslation', toNode, 'set_translation');
			routeUnloaded = false;
			Browser.print ('Just added Local Translation Routes. routeUnloaded = ' + routeUnloaded);
		}
	}
}

function translation (trans, timeStamp)
{
	 zeroTranslation.x = 0.0;
	 zeroTranslation.y = 0.0;
	 zeroTranslation.z = 0.0;
}

            
]]>
</Script>
<!-- ROUTE information for MountRifle1 node:  [from NancyTeamAddRoutes_EspduTransform.articulationParameterValue2 to mountedState ] -->
<Script DEF='MountRifle1directOutput='truemustEvaluate='true'>
<field name='mountedStatetype='SFFloataccessType='inputOnly'/>
<field name='translationtype='SFVec3faccessType='inputOnly'/>
<field name='zeroTranslationtype='SFVec3faccessType='outputOnly'/>
<field name='routeLoadedtype='SFBoolvalue='trueaccessType='initializeOnly'/>
<field name='routeUnloadedtype='SFBoolvalue='trueaccessType='initializeOnly'/>
<field name='thisNodetype='SFNodeaccessType='initializeOnly'>
<Script USE='MountRifle1'>
</Script>
</field>
<field name='fromNodetype='SFNodeaccessType='initializeOnly'>
<EspduTransform USE='NancyTeamAddRoutes_EspduTransform'/>
</field>
<field name='toNodetype='SFNodeaccessType='initializeOnly'>
<Script USE='MountRifle1'>
</Script>
</field>
<![CDATA[
              
ecmascript:

function mountedState ( mState, timeStamp )
{
	// 0=unmounted, 1=mounted
	if (mState == 0)
	{
		if (!routeUnloaded)
		{
			Browser.deleteRoute ( fromNode, 'translation_changed', thisNode, 'translation' );
			Browser.deleteRoute ( thisNode, 'zeroTranslation', toNode, 'set_translation' );
			routeUnloaded = true;
			Browser.print ('Just deleted Local Translation Routes. routeUnloaded = ' + routeUnloaded);
		}
		if (!routeLoaded)
		{
			Browser.addRoute ( fromNode, 'translation_changed', toNode, 'set_translation' );
			routeLoaded = true;
			Browser.print ('Just added Espdu Translation Routes. routeLoaded =' + routeLoaded);
		}
	}
	else
	{
		if (routeLoaded)
		{
			Browser.deleteRoute ( fromNode, 'translation_changed', toNode, 'set_translation' );
			routeLoaded = false;
			Browser.print ('Just deleted Espdu Translation Routes. routeLoaded = ' + routeLoaded);
		}
		if (routeUnloaded)
		{
			Browser.addRoute ( fromNode, 'translation_changed', thisNode, 'translation' );
			Browser.addRoute ( thisNode, 'zeroTranslation', toNode, 'set_translation' );
			routeUnloaded = false;
			Browser.print ('Just added Local Translation Routes. routeUnloaded = ' + routeUnloaded);
		}
	}
}
function translation (trans, timeStamp)
{
	zeroTranslation.x = 0.0;
	zeroTranslation.y = 0.0;
	zeroTranslation.z = 0.0;
}

            
]]>
</Script>
<!-- ROUTE information for MountRifle2 node:  [from NancyTeamAddRoutes_EspduTransform.articulationParameterValue3 to mountedState ] -->
<Script DEF='MountRifle2directOutput='truemustEvaluate='true'>
<field name='mountedStatetype='SFFloataccessType='inputOnly'/>
<field name='translationtype='SFVec3faccessType='inputOnly'/>
<field name='zeroTranslationtype='SFVec3faccessType='outputOnly'/>
<field name='routeLoadedtype='SFBoolvalue='trueaccessType='initializeOnly'/>
<field name='routeUnloadedtype='SFBoolvalue='trueaccessType='initializeOnly'/>
<field name='thisNodetype='SFNodeaccessType='initializeOnly'>
<Script USE='MountRifle2'>
</Script>
</field>
<field name='fromNodetype='SFNodeaccessType='initializeOnly'>
<EspduTransform USE='NancyTeamAddRoutes_EspduTransform'/>
</field>
<field name='toNodetype='SFNodeaccessType='initializeOnly'>
<Transform USE='Rifle2Transform'/>
</field>
<![CDATA[
              
ecmascript:

function mountedState ( mState, timeStamp )
{
	// 0=unmounted, 1=mounted
	if (mState == 0)
	{
		if (!routeUnloaded)
		{
			Browser.deleteRoute ( fromNode, 'translation_changed', thisNode, 'translation' );
			Browser.deleteRoute ( thisNode, 'zeroTranslation', toNode, 'set_translation' );
			routeUnloaded = true;
			Browser.print ('Just deleted Local Translation Routes. routeUnloaded = ' + routeUnloaded);
		}
		if (!routeLoaded)
		{
			Browser.addRoute ( fromNode, 'translation_changed', toNode, 'set_translation' );
			routeLoaded = true;
			Browser.print ('Just added Espdu Translation Routes. routeLoaded =' + routeLoaded);
		}
	}
	else
	{
		if (routeLoaded)
		{
			Browser.deleteRoute ( fromNode, 'translation_changed', toNode, 'set_translation' );
			routeLoaded = false;
			Browser.print ('Just deleted Espdu Translation Routes. routeLoaded = ' + routeLoaded);
		}
		if (routeUnloaded)
		{
			Browser.addRoute ( fromNode, 'translation_changed', thisNode, 'translation' );
			Browser.addRoute ( thisNode, 'zeroTranslation', toNode, 'set_translation' );
			routeUnloaded = false;
			Browser.print ('Just added Local Translation Routes. routeUnloaded = ' + routeUnloaded);
		}
	}
}
function translation (trans, timeStamp)
{
	zeroTranslation.x = 0.0;
	zeroTranslation.y = 0.0;
	zeroTranslation.z = 0.0;
}

            
]]>
</Script>
<!-- ROUTE information for MountAutogun node:  [from NancyTeamAddRoutes_EspduTransform.articulationParameterValue4 to mountedState ] -->
<Script DEF='MountAutogundirectOutput='truemustEvaluate='true'>
<field name='mountedStatetype='SFFloataccessType='inputOnly'/>
<field name='translationtype='SFVec3faccessType='inputOnly'/>
<field name='zeroTranslationtype='SFVec3faccessType='outputOnly'/>
<field name='routeLoadedtype='SFBoolvalue='trueaccessType='initializeOnly'/>
<field name='routeUnloadedtype='SFBoolvalue='trueaccessType='initializeOnly'/>
<field name='thisNodetype='SFNodeaccessType='initializeOnly'>
<Script USE='MountAutogun'>
</Script>
</field>
<field name='fromNodetype='SFNodeaccessType='initializeOnly'>
<EspduTransform USE='NancyTeamAddRoutes_EspduTransform'/>
</field>
<field name='toNodetype='SFNodeaccessType='initializeOnly'>
<Transform USE='AutogunTransform'/>
</field>
<![CDATA[
              
ecmascript:

function mountedState ( mState, timeStamp )
{
	// 0=unmounted, 1=mounted
	if (mState == 0)
	{
		if (!routeUnloaded)
		{
			Browser.deleteRoute ( fromNode, 'translation_changed', thisNode, 'translation' );
			Browser.deleteRoute ( thisNode, 'zeroTranslation', toNode, 'set_translation' );
			routeUnloaded = true;
			Browser.print ('Just deleted Local Translation Routes. routeUnloaded = ' + routeUnloaded);
		}
		if (!routeLoaded)
		{
			Browser.addRoute ( fromNode, 'translation_changed', toNode, 'set_translation' );
			routeLoaded = true;
			Browser.print ('Just added Espdu Translation Routes. routeLoaded =' + routeLoaded);
		}
	}
	else
	{
		if (routeLoaded)
		{
			Browser.deleteRoute ( fromNode, 'translation_changed', toNode, 'set_translation' );
			routeLoaded = false;
			Browser.print ('Just deleted Espdu Translation Routes. routeLoaded = ' + routeLoaded);
		}
		if (routeUnloaded)
		{
			Browser.addRoute ( fromNode, 'translation_changed', thisNode, 'translation' );
			Browser.addRoute ( thisNode, 'zeroTranslation', toNode, 'set_translation' );
			routeUnloaded = false;
			Browser.print ('Just added Local Translation Routes. routeUnloaded = ' + routeUnloaded);
		}
	}
}
function translation (trans, timeStamp)
{
	zeroTranslation.x = 0.0;
	zeroTranslation.y = 0.0;
	zeroTranslation.z = 0.0;
}

            
]]>
</Script>
<!-- ROUTE information for MountGrenadier node:  [from NancyTeamAddRoutes_EspduTransform.articulationParameterValue5 to mountedState ] -->
<Script DEF='MountGrenadierdirectOutput='truemustEvaluate='true'>
<field name='mountedStatetype='SFFloataccessType='inputOnly'/>
<field name='translationtype='SFVec3faccessType='inputOnly'/>
<field name='zeroTranslationtype='SFVec3faccessType='outputOnly'/>
<field name='routeLoadedtype='SFBoolvalue='trueaccessType='initializeOnly'/>
<field name='routeUnloadedtype='SFBoolvalue='trueaccessType='initializeOnly'/>
<field name='thisNodetype='SFNodeaccessType='initializeOnly'>
<Script USE='MountGrenadier'>
</Script>
</field>
<field name='fromNodetype='SFNodeaccessType='initializeOnly'>
<EspduTransform USE='NancyTeamAddRoutes_EspduTransform'/>
</field>
<field name='toNodetype='SFNodeaccessType='initializeOnly'>
<Transform USE='GrenadierTransform'/>
</field>
<![CDATA[
              
ecmascript:

function mountedState ( mState, timeStamp )
{
	// 0=unmounted, 1=mounted
	if (mState == 0)
	{
		if (!routeUnloaded)
		{
			Browser.deleteRoute ( fromNode, 'translation_changed', thisNode, 'translation' );
			Browser.deleteRoute ( thisNode, 'zeroTranslation', toNode, 'set_translation' );
			routeUnloaded = true;
			Browser.print ('Just deleted Local Translation Routes. routeUnloaded = ' + routeUnloaded);
		}
		if (!routeLoaded)
		{
			Browser.addRoute ( fromNode, 'translation_changed', toNode, 'set_translation' );
			routeLoaded = true;
			Browser.print ('Just added Espdu Translation Routes. routeLoaded =' + routeLoaded);
		}
	}
	else
	{
		if (routeLoaded)
		{
			Browser.deleteRoute ( fromNode, 'translation_changed', toNode, 'set_translation' );
			routeLoaded = false;
			Browser.print ('Just deleted Espdu Translation Routes. routeLoaded = ' + routeLoaded);
		}
		if (routeUnloaded)
		{
			Browser.addRoute ( fromNode, 'translation_changed', thisNode, 'translation' );
			Browser.addRoute ( thisNode, 'zeroTranslation', toNode, 'set_translation' );
			routeUnloaded = false;
			Browser.print ('Just added Local Translation Routes. routeUnloaded = ' + routeUnloaded);
		}
	}
}
function translation (trans, timeStamp)
{
	zeroTranslation.x = 0.0;
	zeroTranslation.y = 0.0;
	zeroTranslation.z = 0.0;
}

            
]]>
</Script>
<!-- ROUTE information for MountHuey node:  [from NancyTeamAddRoutes_EspduTransform.articulationParameterValue6 to mountedState ] -->
<Script DEF='MountHueydirectOutput='truemustEvaluate='true'>
<field name='mountedStatetype='SFFloataccessType='inputOnly'/>
<field name='translationtype='SFVec3faccessType='inputOnly'/>
<field name='zeroTranslationtype='SFVec3faccessType='outputOnly'/>
<field name='routeLoadedtype='SFBoolvalue='trueaccessType='initializeOnly'/>
<field name='routeUnloadedtype='SFBoolvalue='trueaccessType='initializeOnly'/>
<field name='thisNodetype='SFNodeaccessType='initializeOnly'>
<Script USE='MountHuey'>
</Script>
</field>
<field name='fromNodetype='SFNodeaccessType='initializeOnly'>
<EspduTransform USE='NancyTeamAddRoutes_EspduTransform'/>
</field>
<field name='toNodetype='SFNodeaccessType='initializeOnly'>
<Transform USE='HueyTransform'/>
</field>
<![CDATA[
              
ecmascript:

function mountedState ( mState, timeStamp )
{
	// 0=unmounted, 1=mounted
	if (mState == 0)
	{
		if (!routeUnloaded)
		{
			Browser.deleteRoute ( fromNode, 'translation_changed', thisNode, 'translation' );
			Browser.deleteRoute ( thisNode, 'zeroTranslation', toNode, 'set_translation' );
			routeUnloaded = true;
			Browser.print ('Just deleted Local Translation Routes. routeUnloaded = ' + routeUnloaded);
		}
		if (!routeLoaded)
		{
			Browser.addRoute ( fromNode, 'translation_changed', toNode, 'set_translation' );
			routeLoaded = true;
			Browser.print ('Just added Espdu Translation Routes. routeLoaded =' + routeLoaded);
		}
	}
	else
	{
		if (routeLoaded)
		{
			Browser.deleteRoute ( fromNode, 'translation_changed', toNode, 'set_translation' );
			routeLoaded = false;
			Browser.print ('Just deleted Espdu Translation Routes. routeLoaded = ' + routeLoaded);
		}
		if (routeUnloaded)
		{
			Browser.addRoute ( fromNode, 'translation_changed', thisNode, 'translation' );
			Browser.addRoute ( thisNode, 'zeroTranslation', toNode, 'set_translation' );
			routeUnloaded = false;
			Browser.print ('Just added Local Translation Routes. routeUnloaded = ' + routeUnloaded);
		}
	}
}
function translation (trans, timeStamp)
{
	zeroTranslation.x = 0.0;
	zeroTranslation.y = 0.0;
	zeroTranslation.z = 0.0;
}

            
]]>
</Script>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='articulationParameterValue0toNode='NancyTeamVisibletoField='set_Visible'/>
<ROUTE fromNode='NancyTeamVisiblefromField='Visible_changedtoNode='NancyTeamSwaptoField='set_whichChoice'/>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='articulationParameterValue1toNode='MountLeadertoField='mountedState'/>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='translation_changedtoNode='LeaderTransformtoField='translation'/>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='articulationParameterValue2toNode='MountRifle1toField='mountedState'/>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='translation_changedtoNode='Rifle1TransformtoField='translation'/>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='articulationParameterValue3toNode='MountRifle2toField='mountedState'/>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='translation_changedtoNode='Rifle2TransformtoField='translation'/>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='articulationParameterValue4toNode='MountAutoguntoField='mountedState'/>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='translation_changedtoNode='AutogunTransformtoField='translation'/>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='articulationParameterValue5toNode='MountGrenadiertoField='mountedState'/>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='translation_changedtoNode='GrenadierTransformtoField='translation'/>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='articulationParameterValue6toNode='MountHueytoField='mountedState'/>
<ROUTE fromNode='NancyTeamAddRoutes_EspduTransformfromField='translation_changedtoNode='HueyTransformtoField='translation'/>
</Transform>
</Switch>
</EspduTransform>
</Group>
</Scene>
</X3D>
<!-- -->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
-->

<!-- Additional help information about X3D scenes: X3D Resources, X3D Scene Authoring Hints and X3D Tooltips -->