package Savage.Scenarios.UssColeTerroristAttack;

import org.web3d.x3d.jsail.Core.*;
import org.web3d.x3d.jsail.EnvironmentalEffects.*;
import org.web3d.x3d.jsail.EventUtilities.*;
import org.web3d.x3d.jsail.fields.*;
import org.web3d.x3d.jsail.Grouping.*;
import org.web3d.x3d.jsail.Interpolation.*;
import org.web3d.x3d.jsail.Navigation.*;
import org.web3d.x3d.jsail.Networking.*;
import org.web3d.x3d.jsail.PointingDeviceSensor.*;
import org.web3d.x3d.jsail.Scripting.*;
import org.web3d.x3d.jsail.Time.*;

// Javadoc metadata annotations follow, see below for X3DJSAIL Java source code.
/**
 * <p> Unclassified physical based model of the Al-Qaida sponsored terrorist attack on the USS COLE on 12 October 2000. Click on the Terrorist boat to trigger the explosion. </p>
 <p> Related links: Catalog page <a href="../../../../Scenarios/UssColeTerroristAttack/UssColeTerroristAttackIndex.html" target="_blank">UssColeTerroristAttack</a>,  source <a href="../../../../Scenarios/UssColeTerroristAttack/UssColeTerroristAttack.java">UssColeTerroristAttack.java</a>, <a href="https://www.web3d.org/x3d/content/examples/X3dResources.html" target="_blank">X3D Resources</a>, <a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html" target="_blank">X3D Scene Authoring Hints</a>, and <a href="https://www.web3d.org/x3d/content/X3dTooltips.html" target="_blank">X3D Tooltips</a>. </p>
	<table style="color:black; border:0px solid; border-spacing:10px 0px;">
        <caption>Scene Meta Information</caption>
		<tr style="background-color:silver; border-color:silver;">
			<td style="text-align:center; padding:10px 0px;"><i>meta tags</i></td>
			<td style="text-align:left;   padding:10px 0px;">&nbsp; Document Metadata </td>
		</tr>

		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> title </i> </td>
			<td> <a href="../../../../Scenarios/UssColeTerroristAttack/UssColeTerroristAttack.x3d">UssColeTerroristAttack.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> description </i> </td>
			<td> Unclassified physical based model of the Al-Qaida sponsored terrorist attack on the USS COLE on 12 October 2000. Click on the Terrorist boat to trigger the explosion. </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> James Harney </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 7 October 2001 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> modified </i> </td>
			<td> 23 August 2023 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="http://en.wikipedia.org/wiki/USS_Cole_bombing" target="_blank">http://en.wikipedia.org/wiki/USS_Cole_bombing</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="http://www.foia.navy.mil/usscole/index.html" target="_blank">http://www.foia.navy.mil/usscole/index.html</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> UssColeTerroristAttack.ppt </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/UssColeTerroristAttack.ppt" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/UssColeTerroristAttack.ppt</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="http://www.pilotonline.com" target="_blank">http://www.pilotonline.com</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="http://www.prop1.org/nucnews/nucnews.htm" target="_blank">http://www.prop1.org/nucnews/nucnews.htm</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="http://www.jpost.com/Editions/2001/08/12/Features/Features.32382.html" target="_blank">http://www.jpost.com/Editions/2001/08/12/Features/Features.32382.html</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/Savage/Scenarios/CollisionUssGreenvilleEhimeMaru/CollisionCourses.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/Scenarios/CollisionUssGreenvilleEhimeMaru/CollisionCourses.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/Savage/Scenarios/CollisionUssGreenvilleEhimeMaru/CollisionCourses.wrl" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/Scenarios/CollisionUssGreenvilleEhimeMaru/CollisionCourses.wrl</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/WaypointInterpolatorPrototype.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/WaypointInterpolatorPrototype.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://www.fas.org/man/dod-101/navy/docs/swos/cmd/cp17/sld001.htm" target="_blank">https://www.fas.org/man/dod-101/navy/docs/swos/cmd/cp17/sld001.htm</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> NIMA Chart No. 62098 Banda at Tdwahi, 4th Ed. 30 Sep 1995 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> NIMA62098.jpg </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/NIMA62098.jpg" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/NIMA62098.jpg</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://www.fas.org/irp/doddir/dod/app-j_THREATCON.htm" target="_blank">https://www.fas.org/irp/doddir/dod/app-j_THREATCON.htm</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://www.fas.org/irp/program/core/dted.htm" target="_blank">https://www.fas.org/irp/program/core/dted.htm</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> subject </i> </td>
			<td> USS COLE, Al-Qaida sponsored Terrorist Attacks </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> identifier </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/UssColeTerroristAttack.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/UssColeTerroristAttack.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> generator </i> </td>
			<td> X3D-Edit 3.2, <a href="https://www.web3d.org/x3d/tools/X3D-Edit" target="_blank">https://www.web3d.org/x3d/tools/X3D-Edit</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> license </i> </td>
			<td> <a href="../../../../Scenarios/UssColeTerroristAttack/../../license.html">../../license.html</a> </td>
		</tr>
		<tr style="background-color:silver; border-color:silver;">
			<td style="text-align:center;" colspan="2">  &nbsp; </td>
		</tr>
	</table>

	<p>
		This program uses the
		<a href="https://www.web3d.org/specifications/java/X3DJSAIL.html" target="_blank">X3D Java Scene Access Interface Library (X3DJSAIL)</a>.
		It has been produced using the 
		<a href="https://www.web3d.org/x3d/stylesheets/X3dToJava.xslt" target="_blank">X3dToJava.xslt</a>
		stylesheet
	       (<a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3dToJava.xslt" target="_blank">version control</a>)
                which is used to create Java source code from an original <code>.x3d</code> model.
	</p>

	* @author James Harney
 */

public class UssColeTerroristAttack
{
	/** Default constructor to create this object. */
	public UssColeTerroristAttack ()
	{
	  initialize();
	}

	/** Create and initialize the X3D model for this object. */
	public final void initialize()
	{
            try { // catch-all
  x3dModel = new X3D().setProfile(X3D.PROFILE_IMMERSIVE).setVersion(X3D.VERSION_3_0)
  .setHead(new head()
    .addMeta(new meta().setName(meta.NAME_TITLE      ).setContent("UssColeTerroristAttack.x3d"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("Unclassified physical based model of the Al-Qaida sponsored terrorist attack on the USS COLE on 12 October 2000. Click on the Terrorist boat to trigger the explosion."))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("James Harney"))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("7 October 2001"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("23 August 2023"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("http://en.wikipedia.org/wiki/USS_Cole_bombing"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("http://www.foia.navy.mil/usscole/index.html"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("UssColeTerroristAttack.ppt"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/UssColeTerroristAttack.ppt"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("http://www.pilotonline.com"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("http://www.prop1.org/nucnews/nucnews.htm"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("http://www.jpost.com/Editions/2001/08/12/Features/Features.32382.html"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.web3d.org/x3d/content/examples/Savage/Scenarios/CollisionUssGreenvilleEhimeMaru/CollisionCourses.x3d"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.web3d.org/x3d/content/examples/Savage/Scenarios/CollisionUssGreenvilleEhimeMaru/CollisionCourses.wrl"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/WaypointInterpolatorPrototype.x3d"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.fas.org/man/dod-101/navy/docs/swos/cmd/cp17/sld001.htm"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("NIMA Chart No. 62098 Banda at Tdwahi, 4th Ed. 30 Sep 1995"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("NIMA62098.jpg"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/NIMA62098.jpg"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.fas.org/irp/doddir/dod/app-j_THREATCON.htm"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.fas.org/irp/program/core/dted.htm"))
    .addMeta(new meta().setName(meta.NAME_SUBJECT    ).setContent("USS COLE, Al-Qaida sponsored Terrorist Attacks"))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/UssColeTerroristAttack.x3d"))
    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit"))
    .addMeta(new meta().setName(meta.NAME_LICENSE    ).setContent("../../license.html")))
  .setScene(new Scene()
    .addComments(" <Group DEF='ExternProtoDeclareGroup'> </Group> ")
    .addComments(" This group holds ExternProtoDeclare statements to simplify editing ")
    .addChild(new WorldInfo().setTitle("UssColeTerroristAttack.x3d"))
    .addChild(new ExternProtoDeclare("WaypointInterpolator").setName("WaypointInterpolator").setAppinfo("Reads waypoints and legSpeeds/legDurations/defaultSpeed to provide a customizable position/orientation interpolator.").setUrl(new String[] {"../../../Savage/Tools/Animation/WaypointInterpolatorPrototype.x3d#WaypointInterpolator","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/WaypointInterpolatorPrototype.x3d#WaypointInterpolator","../../../Savage/Tools/Animation/WaypointInterpolatorPrototype.wrl#WaypointInterpolator","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/WaypointInterpolatorPrototype.wrl#WaypointInterpolator"})
      .addComments(" Priority of use: legSpeeds (m/sec), legDurations (seconds), defaultSpeed (m/sec) ")
      .addComments(" interpolation fields ")
      .addComments(" display-related fields ")
      .addField(new field().setName("description").setType(field.TYPE_SFSTRING).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Short description of what is animated by this WaypointInterpolator."))
      .addField(new field().setName("waypoints").setType(field.TYPE_MFVEC3F).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Waypoints being traversed with interpolation of intermediate positions and orientations."))
      .addField(new field().setName("add_waypoint").setType(field.TYPE_SFVEC3F).setAccessType(field.ACCESSTYPE_INPUTONLY).setAppinfo("Add another single waypoint to array of waypoints recalculate interpolator values."))
      .addField(new field().setName("set_waypoints").setType(field.TYPE_MFVEC3F).setAccessType(field.ACCESSTYPE_INPUTONLY).setAppinfo("Replace all waypoints recalculate interpolator values."))
      .addField(new field().setName("pitchUpDownForVerticalWaypoints").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Whether to pitch child geometry (such as a vehicle) up or down to match vertical slope"))
      .addField(new field().setName("legSpeeds").setType(field.TYPE_MFFLOAT).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Units m/sec. If used array lengths for legSpeeds and legDurations must be one less than number of waypoints."))
      .addField(new field().setName("legDurations").setType(field.TYPE_MFTIME).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Units in seconds. If used array lengths for legSpeeds and legDurations must be one less than number of waypoints."))
      .addField(new field().setName("defaultSpeed").setType(field.TYPE_SFFLOAT).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Units m/sec."))
      .addField(new field().setName("turningRate").setType(field.TYPE_SFFLOAT).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("turningRate (degrees/second) also determines standoff distance prior to waypoint where turn commences. If 0 turns are instantaneous."))
      .addField(new field().setName("totalDuration").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_OUTPUTONLY).setAppinfo("Output calculation summing all leg durations, useful for setting TimeSensor cycleInterval. Units in seconds."))
      .addField(new field().setName("set_fraction").setType(field.TYPE_SFFLOAT).setAccessType(field.ACCESSTYPE_INPUTONLY).setAppinfo("exposed PositionInterpolator and OrientationInterpolator setting"))
      .addField(new field().setName("position_changed").setType(field.TYPE_SFVEC3F).setAccessType(field.ACCESSTYPE_OUTPUTONLY).setAppinfo("exposed PositionInterpolator setting"))
      .addField(new field().setName("orientation_changed").setType(field.TYPE_SFROTATION).setAccessType(field.ACCESSTYPE_OUTPUTONLY).setAppinfo("exposed OrientationInterpolator setting"))
      .addField(new field().setName("lineColor").setType(field.TYPE_SFCOLOR).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setAppinfo("default color for non-active line segments"))
      .addField(new field().setName("highlightSegmentColor").setType(field.TYPE_SFCOLOR).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setAppinfo("active segment highlight color"))
      .addField(new field().setName("transparency").setType(field.TYPE_SFFLOAT).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setAppinfo("1.0 is completely transparent, 0.0 is completely opaque."))
      .addField(new field().setName("labelDisplayMode").setType(field.TYPE_SFSTRING).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("allowed values: none; waypoints (produce labels at each waypoint); or interpolation (produce single moving label at interpolator time course speed location)"))
      .addField(new field().setName("heightLabel").setType(field.TYPE_SFSTRING).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("allowed values: altitude depth (negate Y value) none"))
      .addField(new field().setName("labelOffset").setType(field.TYPE_SFVEC3F).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("heightLabel relative location"))
      .addField(new field().setName("labelFontSize").setType(field.TYPE_SFFLOAT).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("heightLabel text size"))
      .addField(new field().setName("labelColor").setType(field.TYPE_SFCOLOR).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("heightLabel text color"))
      .addField(new field().setName("traceEnabled").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("enable console output to trace script computations and prototype progress"))
      .addField(new field().setName("outputInitializationComputations").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Output the number of waypoints totalDistance and totalDuration to console upon initialization"))
      .addField(new field().setName("verticalDropLineColor").setType(field.TYPE_SFCOLOR).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setAppinfo("default color for vertical drop-line segments"))
      .addField(new field().setName("verticalDropLineTransparency").setType(field.TYPE_SFFLOAT).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setAppinfo("1.0 is completely transparent, 0.0 is completely opaque.")))
    .addChild(new ExternProtoDeclare("TNTBasedExplosion").setName("TNTBasedExplosion").setAppinfo("Physics-based explosion model").setUrl(new String[] {"PhysicsBasedExplosionPrototype.x3d#TNTBasedExplosion","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/PhysicsBasedExplosionPrototype.x3d#TNTBasedExplosion","PhysicsBasedExplosionPrototype.wrl#TNTBasedExplosion","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/PhysicsBasedExplosionPrototype.wrl#TNTBasedExplosion"})
      .addField(new field().setName("startExplosion").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_INPUTONLY)))
    .addChild(new ExternProtoDeclare("TerroristBoat").setName("TerroristBoat").setUrl(new String[] {"TerroristBoatPrototype.x3d#TerroristBoat","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/TerroristBoatPrototype.x3d#TerroristBoat","TerroristBoatPrototype.wrl#TerroristBoat","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/TerroristBoatPrototype.wrl#TerroristBoat"})
      .addField(new field().setName("startExplosion").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_INPUTONLY)))
    .addChild(new ExternProtoDeclare("ArleighBurke").setName("ArleighBurke").setAppinfo("Arleigh Burke class destroyer").setUrl(new String[] {"../../ShipsMilitary/DDGArleighBurkeUnitedStates/ArleighBurkePrototype.x3d#ArleighBurke","https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/DDGArleighBurkeUnitedStates/ArleighBurkePrototype.x3d#ArleighBurke","../../ShipsMilitary/DDGArleighBurkeUnitedStates/ArleighBurkePrototype.wrl#ArleighBurke","https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/DDGArleighBurkeUnitedStates/ArleighBurkePrototype.wrl#ArleighBurke"})
      .addField(new field().setName("startExplosion").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_INPUTONLY)))
    .addChild(new ExternProtoDeclare("CameraCompass12").setName("CameraCompass12").setAppinfo("Circular set of compass bearings that follow the active viewpoint set at 360/12 = 30 degree intervals. North = +X axis East = +Z axis up = +Y axis.").setUrl(new String[] {"../../../Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.x3d#CameraCompass12","https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.x3d#CameraCompass12","../../../Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.wrl#CameraCompass12","https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.wrl#CameraCompass12"})
      .addField(new field().setName("enabled").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTOUTPUT))
      .addField(new field().setName("positionOffsetFromCamera").setType(field.TYPE_SFVEC3F).setAccessType(field.ACCESSTYPE_INPUTOUTPUT))
      .addField(new field().setName("markerColor").setType(field.TYPE_SFCOLOR).setAccessType(field.ACCESSTYPE_INPUTOUTPUT))
      .addField(new field().setName("labelColor").setType(field.TYPE_SFCOLOR).setAccessType(field.ACCESSTYPE_INPUTOUTPUT)))
    .addChild(new ExternProtoDeclare("DvdController").setName("DvdController").setAppinfo("Digital Virtual Display (DVD) Controller Prototype is a heads-up display (HUD) to control animation timing").setUrl(new String[] {"../../Tools/HeadsUpDisplays/DvdControllerPrototype.x3d#DvdController","https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/DvdControllerPrototype.x3d#DvdController","../../Tools/HeadsUpDisplays/DvdControllerPrototype.wrl#DvdController","https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/DvdControllerPrototype.wrl#DvdController"})
      .addField(new field().setName("description").setType(field.TYPE_SFSTRING).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Short description of what is animated by this DvdController."))
      .addField(new field().setName("playEnabled").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Whether or not play mode is enabled including during startup."))
      .addField(new field().setName("displayMode").setType(field.TYPE_SFSTRING).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Initializes how control buttons and slider are displayed. The control buttons include DIS control (i.e. Master Ghost Local) and Playback control (i.e. Reset to Start Fast Rewind Rewind Pause Play Fast Forward Reset to End). Possible values are (case sensitive): ALL DIS_ONLY PLAYBACK_ONLY SLIDER_ONLY DIS_PLAYBACK DIS_SLIDER PLAYBACK_SLIDER and NONE."))
      .addField(new field().setName("setDisplayMode").setType(field.TYPE_SFSTRING).setAccessType(field.ACCESSTYPE_INPUTONLY).setAppinfo("Sets how control buttons and slider are displayed. The control buttons include DIS control (i.e. Master Ghost Local) and Playback control (i.e. Reset to Start Fast Rewind Rewind Pause Play Fast Forward Reset to End). Possible values are (case sensitive): ALL DIS_ONLY PLAYBACK_ONLY SLIDER_ONLY DIS_PLAYBACK DIS_SLIDER PLAYBACK_SLIDER and NONE."))
      .addField(new field().setName("buttonColor").setType(field.TYPE_SFCOLOR).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Default button color."))
      .addField(new field().setName("selectedButtonColor").setType(field.TYPE_SFCOLOR).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Button color when selected by user."))
      .addField(new field().setName("labelColor").setType(field.TYPE_SFCOLOR).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Default label color."))
      .addField(new field().setName("selectedLabelColor").setType(field.TYPE_SFCOLOR).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Label color when selected by user."))
      .addField(new field().setName("locationOffset").setType(field.TYPE_SFVEC3F).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Modified screen location and distance (for size)."))
      .addField(new field().setName("clockEnabled").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INITIALIZEONLY))
      .addField(new field().setName("cycleInterval").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Time for complete loop cycle in seconds."))
      .addField(new field().setName("set_cycleInterval").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_INPUTONLY))
      .addField(new field().setName("cycleInterval_changed").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_OUTPUTONLY))
      .addField(new field().setName("speedFactor").setType(field.TYPE_SFFLOAT).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Factor used to determine the speed increase/decrease for Fast Rewind and Fast Forward action."))
      .addField(new field().setName("isActive").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_OUTPUTONLY))
      .addField(new field().setName("startTime_changed").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_OUTPUTONLY))
      .addField(new field().setName("stopTime_changed").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_OUTPUTONLY))
      .addField(new field().setName("time_changed").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_OUTPUTONLY))
      .addField(new field().setName("fraction_changed").setType(field.TYPE_SFFLOAT).setAccessType(field.ACCESSTYPE_OUTPUTONLY))
      .addField(new field().setName("secondsElapsed").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_OUTPUTONLY))
      .addField(new field().setName("isMaster").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_OUTPUTONLY).setAppinfo("isMaster isRemote and isLocal are booleans represent a 3-way toggle. Only one of them can have a true value at any time."))
      .addField(new field().setName("isRemote").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_OUTPUTONLY).setAppinfo("isMaster isRemote and isLocal are booleans represent a 3-way toggle. Only one of them can have a true value at any time."))
      .addField(new field().setName("isLocal").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_OUTPUTONLY).setAppinfo("isMaster isRemote and isLocal are booleans represent a 3-way toggle. Only one of them can have a true value at any time."))
      .addField(new field().setName("isPaused").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_OUTPUTONLY).setAppinfo("isPaused and isRunning always have opposite values. When isPaused is true isRunning will be false and vice versa."))
      .addField(new field().setName("isRunning").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_OUTPUTONLY).setAppinfo("isPaused and isRunning always have opposite values. When isPaused is true isRunning will be false and vice versa."))
      .addField(new field().setName("traceEnabled").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Enable/disable console output for troubleshooting"))
      .addField(new field().setName("testTimeVal").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_INITIALIZEONLY)))
    .addChild(new ExternProtoDeclare("LineBoat").setName("LineBoat").setUrl(new String[] {"LineBoatPrototype.x3d#LineBoat","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/LineBoatPrototype.x3d#TerroristBoat","LineBoatPrototype.wrl#LineBoat","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/LineBoatPrototype.wrl#TerroristBoat"})
      .addField(new field().setName("startExplosion").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_INPUTONLY)))
    .addChild(new ExternProtoDeclare("GarbageBoat").setName("GarbageBoat").setUrl(new String[] {"GarbageBoatPrototype.x3d#GarbageBoat","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/GarbageBoatPrototype.x3d#GarbageBoat","GarbageBoatPrototype.wrl#GarbageBoat","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/GarbageBoatPrototype.wrl#GarbageBoat"})
      .addField(new field().setName("startExplosion").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_INPUTONLY)))
    .addChild(new Group()
      .addChild(new NavigationInfo().setSpeed(100).setType(new String[] {"EXAMINE","FLY","ANY"}).setVisibilityLimit(50000))
      .addChild(new Background().setGroundAngle(new double[] {1.309,1.570796}).setGroundColor(new MFColor(new double[] {0.1,0.1,0.0,0.4,0.25,0.2,0.6,0.6,0.6})).setSkyAngle(new double[] {1.309,1.571}).setSkyColor(new MFColor(new double[] {0.0,0.2,0.7,0.0,0.5,1.0,1.0,1.0,1.0})))
      .addComments(" *****************************Main Scene Viewpoints****************** ")
      .addChild(new Group("ViewPoints")
        .addChild(new Viewpoint("EntryView").setDescription("Aden Chart").setPosition(0.0,.1,4.0))
        .addChild(new Viewpoint().setDescription("Aden Chart Close Up").setPosition(0.0,.5,2.0))
        .addChild(new Viewpoint().setDescription("Harbor View").setOrientation(1.0,0.0,0.0,-.95).setPosition(17000.0,20000.0,40000.0))
        .addChild(new Viewpoint().setDescription("Overhead RefuelingDolphin Seven").setOrientation(1.0,0.0,0.0,-1.57).setPosition(27838.31,700.0,14166.67))
        .addChild(new Viewpoint().setDescription("Final View of Terrorist Attack").setPosition(27793.31,10.0,14330.0))
        .addComments(" ***************************Scene Compass********************** "))
      .addChild(new Transform("Compass")
        .addChild(new ProtoInstance("CameraCompass12").setContainerField("children")
          .addFieldValue(new fieldValue().setName("enabled").setValue(true))
          .addFieldValue(new fieldValue().setName("positionOffsetFromCamera").setValue(new SFVec3f(0.0,5.0,0.0)))
          .addFieldValue(new fieldValue().setName("markerColor").setValue(new SFColor(0.3,0.3,0.8)))
          .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(1.0,1.0,1.0)))))
      .addComments(" ************DVD Controller for Scene************ ")
      .addComments(" Looks like this must be instantiated before WaypointInterpolator in order to receive totalDuration value; this is a browser bug. ")
      .addComments(" initialilze cycleInterval to correct value as default, in case initialization ROUTE fails. cycleInterval should not need to be reset, so this is superfluous. ")
      .addChild(new ProtoInstance("DvdController", "ColeAnimationDvdController").setContainerField("children")
        .addFieldValue(new fieldValue().setName("description").setValue("ColeAnimationDvdController"))
        .addFieldValue(new fieldValue().setName("buttonColor").setValue(new SFColor(0.655,0.655,0.655)))
        .addFieldValue(new fieldValue().setName("selectedButtonColor").setValue(new SFColor(0.675,0.675,0.675)))
        .addFieldValue(new fieldValue().setName("selectedLabelColor").setValue(new SFColor(0.9,0.0,0.0)))
        .addFieldValue(new fieldValue().setName("locationOffset").setValue(new SFVec3f(-6.0,-3.0,-1.0)))
        .addFieldValue(new fieldValue().setName("cycleInterval").setValue(13416))
        .addFieldValue(new fieldValue().setName("speedFactor").setValue(25)))
      .addComments(" *************COLE Code************* ")
      .addChild(new Transform("ColeTransform")
        .addChild(new ProtoInstance("ArleighBurke", "DDG-51").setContainerField("children")))
      .addChild(new ProtoInstance("WaypointInterpolator", "ColeInterpolator").setContainerField("children")
        .addFieldValue(new fieldValue().setName("description").setValue("ColeInterpolator"))
        .addFieldValue(new fieldValue().setName("waypoints").setValue(new MFVec3f(new MFVec3f(new double[] {27000.0,0.0,34000.0,24000.0,0.0,29000.0,23000.0,0.0,22000.0,23000.0,0.0,18000.0,26500.0,0.0,15000.0,28950.0,0.0,14000.0,27838.31,0.0,14167.0,27838.31,0.0,14167.0}))))
        .addComments(" 1 knot = 0.514444444 meters/second, 11 knots = 5.66 meters/second ")
        .addFieldValue(new fieldValue().setName("legDurations").setValue(new double[] {700.0,723.0,754.0,811.0,819.0,849.0,8760.0}))
        .addFieldValue(new fieldValue().setName("turningRate").setValue(5))
        .addFieldValue(new fieldValue().setName("labelDisplayMode").setValue("interpolation"))
        .addFieldValue(new fieldValue().setName("lineColor").setValue(new SFColor(0.0,0.8,0.8)))
        .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(0.0,0.8,0.8)))
        .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,20.0,0.0)))
        .addFieldValue(new fieldValue().setName("labelFontSize").setValue(6))
        .addFieldValue(new fieldValue().setName("traceEnabled").setValue(false)))
      .addComments(" *************Terrorist Boat and Explosion Code*** ")
      .addChild(new Transform("TerroristBoatTransform").setRotation(0.0,1.0,0.0,-0.5)
        .addChild(new ProtoInstance("TerroristBoat", "Boat").setContainerField("children"))
        .addChild(new TouchSensor("TerroristTouch").setDescription("touch to trigger explosion"))
        .addChild(new ROUTE().setFromNode("TerroristTouch").setFromField("touchTime").setToNode("Boat").setToField("startExplosion"))
        .addComments(" ********************Explosion Code***************** ")
        .addChild(new Transform("TNTtransform").setTranslation(9.0,0.0,0.0)
          .addChild(new ProtoInstance("TNTBasedExplosion", "TerroristExplosion").setContainerField("children"))))
      .addChild(new ProtoInstance("WaypointInterpolator", "TerroristInterpolator").setContainerField("children")
        .addFieldValue(new fieldValue().setName("description").setValue("TerroristInterpolator"))
        .addFieldValue(new fieldValue().setName("waypoints").setValue(new MFVec3f(new MFVec3f(new double[] {25000.0,-9.5,14000.0,27000.0,-9.5,15000.0,27000.0,-9.5,14350.0,27793.31,-9.5,14300.0,27760.31,-9.5,14201.0,27760.31,-9.5,14201.0}))))
        .addComments(" 1 knot = 0.514444444 meters/second, 11 knots = 5.66 meters/second ")
        .addFieldValue(new fieldValue().setName("legDurations").setValue(new double[] {9068.0,811.0,819.0,2698.0,88.0}))
        .addFieldValue(new fieldValue().setName("turningRate").setValue(5))
        .addFieldValue(new fieldValue().setName("labelDisplayMode").setValue("interpolation"))
        .addFieldValue(new fieldValue().setName("lineColor").setValue(new SFColor(0.8,0.4,0.1)))
        .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(0.8,0.4,0.1)))
        .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,10.0,0.0)))
        .addFieldValue(new fieldValue().setName("labelFontSize").setValue(3))
        .addFieldValue(new fieldValue().setName("traceEnabled").setValue(false)))
      .addChild(new ROUTE().setFromNode("TerroristTouch").setFromField("touchTime").setToNode("TerroristExplosion").setToField("startExplosion"))
      .addChild(new ROUTE().setFromNode("TerroristTouch").setFromField("touchTime").setToNode("DDG-51").setToField("startExplosion"))
      .addComments(" *************Clock control************* ")
      .addComments(" TimeSensor cycleInterval is reset when each WaypointInterpolator is initialized ")
      .addChild(new TimeSensor("MasterClock"))
      .addChild(new TimeSensor("TerroristClock"))
      .addComments(" TODO: Delete if unneeded ")
      .addChild(new PositionInterpolator("DummyInterpolator").setKey(new double[] {0.0,1.0}).setKeyValue(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.0,0.0})))
      .addChild(new Group("InlineGroup")
        .addComments(" *************Geography and Entry Point Code*** ")
        .addComments(" <LOD center='27793.31 0 14159'/> ")
        .addChild(new Inline().setUrl(new String[] {"AdenHarbor.x3d","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/AdenHarbor.x3d","AdenHarbor.wrl","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/AdenHarbor.wrl"}))
        .addChild(new Inline().setUrl(new String[] {"AdenHarborChart.x3d","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/AdenHarborChart.x3d","AdenHarborChart.wrl","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/AdenHarborChart.wrl"}))
        .addComments(" *************Refueling Pier Code************* ")
        .addChild(new Transform("RefuelingDolphin").setTranslation(27793.31,-10.0,14159.0)
          .addChild(new Inline().setUrl(new String[] {"RefuelingPierSeven.x3d","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/RefuelingPierSeven.x3d","RefuelingPierSeven.wrl","https://www.web3d.org/x3d/content/examples/Savage/Scenarios/UssColeTerroristAttack/RefuelingPierSeven.wrl"})))
        .addComments(" *******Background entities*********** ")
        .addChild(new Transform("TankerTransform").setRotation(0.0,1.0,0.0,3.24).setTranslation(28550.0,0.0,14700.0)
          .addChild(new Inline("TANKER").setUrl(new String[] {"../../ShipsCivilian/Supertanker/SupertankerExampleDay.x3d","https://www.web3d.org/x3d/content/examples/Savage/ShipsCivilian/Supertanker/SupertankerExampleDay.x3d","../../ShipsCivilian/Supertanker/SupertankerExampleDay.wrl","https://www.web3d.org/x3d/content/examples/Savage/ShipsCivilian/Supertanker/SupertankerExampleDay.wrl"})))
        .addChild(new Transform("MerchantATransform").setTranslation(27200.0,-6.5,15100.0)
          .addChild(new Inline("MERCHANT").setUrl(new String[] {"../../ShipsCivilian/MerchantLivestockCarrier/MerchantLivestockCarrier.x3d","https://www.web3d.org/x3d/content/examples/Savage/ShipsCivilian/MerchantLivestockCarrier/MerchantLivestockCarrier.x3d","https://www.web3d.org/x3d/content/examples/Savage/ShipsCivilian/MerchantLivestockCarrier/MerchantLivestockCarrier.wrl"})))
        .addChild(new Transform("MerchantBTransform").setRotation(0.0,1.0,0.0,-.1).setTranslation(27850.0,-6.5,14900.0)
          .addChild(new Inline().setUSE("MERCHANT"))))
      .addComments(" ***********Other Boat Entities in Scene********* ")
      .addComments(" *******Line Boats************ ")
      .addChild(new Transform("LineBoatATransform").setRotation(0.0,1.0,0.0,1.57)
        .addChild(new ProtoInstance("LineBoat", "LINEBOATA").setContainerField("children")))
      .addChild(new ProtoInstance("WaypointInterpolator", "LineBoatAInterpolator").setContainerField("children")
        .addFieldValue(new fieldValue().setName("description").setValue("LineBoatAInterpolator"))
        .addFieldValue(new fieldValue().setName("waypoints").setValue(new MFVec3f(new MFVec3f(new double[] {31215.0,-9.5,14316.0,31215.0,-9.5,14316.0,27838.0,-9.5,14186.0,27838.0,-9.5,14186.0,31215.0,-9.5,14316.0,31215.0,-9.5,14316.0,31215.0,-9.5,14316.0}))))
        .addComments(" 1 knot = 0.514444444 meters/second, 11 knots = 5.66 meters/second ")
        .addFieldValue(new fieldValue().setName("legDurations").setValue(new double[] {4296.0,360.0,1260.0,360.0,10.0,7130.0}))
        .addFieldValue(new fieldValue().setName("turningRate").setValue(5))
        .addFieldValue(new fieldValue().setName("labelDisplayMode").setValue("none"))
        .addFieldValue(new fieldValue().setName("lineColor").setValue(new SFColor(1.0,1.0,1.0)))
        .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(1.0,1.0,1.0)))
        .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,10.0,0.0)))
        .addFieldValue(new fieldValue().setName("labelFontSize").setValue(3))
        .addFieldValue(new fieldValue().setName("traceEnabled").setValue(false)))
      .addChild(new Transform("LineBoatBTransform").setRotation(0.0,1.0,0.0,1.57)
        .addChild(new ProtoInstance("LineBoat", "LINEBOATB").setContainerField("children")))
      .addChild(new ProtoInstance("WaypointInterpolator", "LineBoatBInterpolator").setContainerField("children")
        .addFieldValue(new fieldValue().setName("description").setValue("LineBoatBInterpolator"))
        .addFieldValue(new fieldValue().setName("waypoints").setValue(new MFVec3f(new MFVec3f(new double[] {31200.0,-9.5,14216.0,31200.0,-9.5,14216.0,27760.0,-9.5,14201.0,27720.0,-9.5,14201.0,27720.0,-9.5,14201.0,31200.0,-9.5,14216.0,31200.0,-9.5,14216.0}))))
        .addComments(" 1 knot = 0.514444444 meters/second, 11 knots = 5.66 meters/second ")
        .addFieldValue(new fieldValue().setName("legDurations").setValue(new double[] {4296.0,360.0,200.0,1260.0,360.0,6940.0}))
        .addFieldValue(new fieldValue().setName("turningRate").setValue(5))
        .addFieldValue(new fieldValue().setName("labelDisplayMode").setValue("none"))
        .addFieldValue(new fieldValue().setName("lineColor").setValue(new SFColor(1.0,1.0,1.0)))
        .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(1.0,1.0,1.0)))
        .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,10.0,0.0)))
        .addFieldValue(new fieldValue().setName("labelFontSize").setValue(3))
        .addFieldValue(new fieldValue().setName("traceEnabled").setValue(false)))
      .addComments(" **********Garbage Boat*********** ")
      .addChild(new Transform("GarbageBoatTransform")
        .addChild(new ProtoInstance("GarbageBoat", "GARBAGEBOAT").setContainerField("children")))
      .addChild(new ProtoInstance("WaypointInterpolator", "GarbageBoatInterpolator").setContainerField("children")
        .addFieldValue(new fieldValue().setName("description").setValue("GarbageBoatInterpolator"))
        .addFieldValue(new fieldValue().setName("waypoints").setValue(new MFVec3f(new MFVec3f(new double[] {30000.0,-9.75,14216.0,30000.0,-9.75,14216.0,27838.0,-9.75,14176.0,27838.0,-9.75,14176.0,27838.0,-9.75,14200.0,31200.0,-9.75,14200.0,31200.0,-9.75,14220.0}))))
        .addComments(" 1 knot = 0.514444444 meters/second, 11 knots = 5.66 meters/second ")
        .addFieldValue(new fieldValue().setName("legDurations").setValue(new double[] {5736.0,300.0,600.0,600.0,360.0,5820.0}))
        .addFieldValue(new fieldValue().setName("turningRate").setValue(5))
        .addFieldValue(new fieldValue().setName("labelDisplayMode").setValue("none"))
        .addFieldValue(new fieldValue().setName("lineColor").setValue(new SFColor(1.0,1.0,0.0)))
        .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(1.0,1.0,0.0)))
        .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,10.0,0.0)))
        .addFieldValue(new fieldValue().setName("labelFontSize").setValue(3))
        .addFieldValue(new fieldValue().setName("traceEnabled").setValue(false)))
      .addComments(" MasterClock is a simple TimeSensor, these ROUTEs are replaced. Farther down, route totalDuration to ColeAnimationDvdController.set_cycleInterval ")
      .addChild(new ROUTE().setFromNode("ColeInterpolator").setFromField("totalDuration").setToNode("MasterClock").setToField("cycleInterval"))
      .addChild(new ROUTE().setFromNode("TerroristInterpolator").setFromField("totalDuration").setToNode("TerroristClock").setToField("cycleInterval"))
      .addChild(new ROUTE().setFromNode("MasterClock").setFromField("fraction_changed").setToNode("DummyInterpolator").setToField("set_fraction"))
      .addChild(new ROUTE().setFromNode("TerroristClock").setFromField("fraction_changed").setToNode("DummyInterpolator").setToField("set_fraction"))
      .addComments(" ColeAnimationDvdController replaces TimeSensor functionality ")
      .addChild(new ROUTE().setFromNode("ColeInterpolator").setFromField("totalDuration").setToNode("ColeAnimationDvdController").setToField("set_cycleInterval"))
      .addChild(new ROUTE().setFromNode("ColeAnimationDvdController").setFromField("fraction_changed").setToNode("TerroristInterpolator").setToField("set_fraction"))
      .addChild(new ROUTE().setFromNode("ColeAnimationDvdController").setFromField("fraction_changed").setToNode("LineBoatAInterpolator").setToField("set_fraction"))
      .addChild(new ROUTE().setFromNode("ColeAnimationDvdController").setFromField("fraction_changed").setToNode("LineBoatBInterpolator").setToField("set_fraction"))
      .addChild(new ROUTE().setFromNode("ColeAnimationDvdController").setFromField("fraction_changed").setToNode("GarbageBoatInterpolator").setToField("set_fraction"))
      .addComments(" WaypointInterpolator drives both translation and rotation ")
      .addChild(new ROUTE().setFromNode("ColeInterpolator").setFromField("position_changed").setToNode("ColeTransform").setToField("set_translation"))
      .addChild(new ROUTE().setFromNode("ColeInterpolator").setFromField("orientation_changed").setToNode("ColeTransform").setToField("set_rotation"))
      .addChild(new ROUTE().setFromNode("TerroristInterpolator").setFromField("position_changed").setToNode("TerroristBoatTransform").setToField("set_translation"))
      .addChild(new ROUTE().setFromNode("TerroristInterpolator").setFromField("orientation_changed").setToNode("TerroristBoatTransform").setToField("set_rotation"))
      .addChild(new ROUTE().setFromNode("LineBoatAInterpolator").setFromField("position_changed").setToNode("LineBoatATransform").setToField("set_translation"))
      .addChild(new ROUTE().setFromNode("LineBoatAInterpolator").setFromField("orientation_changed").setToNode("LineBoatATransform").setToField("set_rotation"))
      .addChild(new ROUTE().setFromNode("LineBoatBInterpolator").setFromField("position_changed").setToNode("LineBoatBTransform").setToField("set_translation"))
      .addChild(new ROUTE().setFromNode("LineBoatBInterpolator").setFromField("orientation_changed").setToNode("LineBoatBTransform").setToField("set_rotation"))
      .addChild(new ROUTE().setFromNode("GarbageBoatInterpolator").setFromField("position_changed").setToNode("GarbageBoatTransform").setToField("set_translation"))
      .addChild(new ROUTE().setFromNode("GarbageBoatInterpolator").setFromField("orientation_changed").setToNode("GarbageBoatTransform").setToField("set_rotation"))
      .addComments(" Boolean Sequencer Triggers Explosion at appropriate time if user hasn't. Sends a true value to the script TimeFilter which then sends the current timestamp to the appropriate proto's in the scene to trigger the explosion. ")
      .addChild(new BooleanSequencer("ExplosionBinder").setKey(new double[] {0.0,0.9999999,1.0}).setKeyValue(new boolean[] {false,false,true}))
      .addChild(new Script("TimeFilter").setSourceCode("""
ecmascript:
function setStart ( value,timeStamp ) {
                         
	if (value == true)
		startEventTime = timeStamp;
	}
""")
        .addField(new field().setName("setStart").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY))
        .addField(new field().setName("startEventTime").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_OUTPUTONLY)))
      .addChild(new ROUTE().setFromNode("ColeAnimationDvdController").setFromField("fraction_changed").setToNode("ExplosionBinder").setToField("set_fraction"))
      .addChild(new ROUTE().setFromNode("ExplosionBinder").setFromField("value_changed").setToNode("TimeFilter").setToField("setStart"))
      .addChild(new ROUTE().setFromNode("TimeFilter").setFromField("startEventTime").setToNode("TerroristExplosion").setToField("startExplosion"))
      .addChild(new ROUTE().setFromNode("TimeFilter").setFromField("startEventTime").setToNode("DDG-51").setToField("startExplosion"))
      .addChild(new ROUTE().setFromNode("TimeFilter").setFromField("startEventTime").setToNode("Boat").setToField("startExplosion"))));
            }
            catch (Exception ex)
            {       
                System.err.println ("*** Further hints on X3DJSAIL errors and exceptions at");
                System.err.println ("*** https://www.web3d.org/specifications/java/X3DJSAIL.html");
                throw (ex);
            }
	}
	// end of initialize() method

	/** The initialized model object, created within initialize() method. */
	private X3D x3dModel;

	/** 
	 * Provide a 
	 * <a href="https://dzone.com/articles/java-copy-shallow-vs-deep-in-which-you-will-swim" target="_blank">shallow copy</a>
	 * of the X3D model.
	 * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html">X3D</a>
	 * @return UssColeTerroristAttack model
	 */
	public X3D getX3dModel()
	{	  
		return x3dModel;
	}
	   
    /** 
     * Default main() method provided for test purposes, uses CommandLine to set global ConfigurationProperties for this object.
     * @param args array of input parameters, provided as arguments
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html#handleArguments-java.lang.String:A-">X3D.handleArguments(args)</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html#validationReport--">X3D.validationReport()</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/CommandLine.html">CommandLine</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/CommandLine.html#USAGE">CommandLine.USAGE</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/ConfigurationProperties.html">ConfigurationProperties</a>
     */
    public static void main(String args[])
    {
        System.out.println("Build this X3D model, showing validation diagnostics...");
        X3D thisExampleX3dModel = new UssColeTerroristAttack().getX3dModel();
//      System.out.println("X3D model construction complete.");
	
        // next handle command line arguments
        boolean hasArguments = (args != null) && (args.length > 0);
        boolean validate = true; // default
        boolean argumentsLoadNewModel = false;
        String  fileName = new String();

        if (args != null)
        {
                for (String arg : args)
                {
                        if (arg.toLowerCase().startsWith("-v") || arg.toLowerCase().contains("validate"))
                        {
                                validate = true; // making sure
                        }
                        if (arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_X3D) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_CLASSICVRML) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_X3DB) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_VRML97) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_EXI) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_GZIP) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_ZIP) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_HTML) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_XHTML))
                        {
                                argumentsLoadNewModel = true;
                                fileName = arg;
                        }
                }
        }
        if      (argumentsLoadNewModel)
                System.out.println("WARNING: \"Savage.Scenarios.UssColeTerroristAttack.UssColeTerroristAttack\" model invocation is attempting to load file \"" + fileName + "\" instead of simply validating itself... file loading ignored.");
        else if (hasArguments) // if no arguments provided, this method produces usage warning
                thisExampleX3dModel.handleArguments(args);
	
        if (validate)
        {
            //  System.out.println("--- TODO fix duplicated outputs ---"); // omit when duplicated outputs problem is solved/refactored
		String validationResults = thisExampleX3dModel.validationReport();
            //  System.out.println("-----------------------------------"); // omit when duplicated outputs problem is solved/refactored
                System.out.print("Savage.Scenarios.UssColeTerroristAttack.UssColeTerroristAttack self-validation test confirmation: ");
                if (!validationResults.equals("success"))
                    System.out.println();
                System.out.println(validationResults.trim());

                // experimental: test X3DJSAIL output files
                // Scenarios/UssColeTerroristAttack/UssColeTerroristAttack_JavaExport.* file validation is checked when building X3D Example Archives
                String filenameX3D  = "Scenarios/UssColeTerroristAttack/UssColeTerroristAttack_JavaExport.x3d"; 
                String filenameX3DV = "Scenarios/UssColeTerroristAttack/UssColeTerroristAttack_JavaExport.x3dv"; 
                String filenameJSON = "Scenarios/UssColeTerroristAttack/UssColeTerroristAttack_JavaExport.json";
                thisExampleX3dModel.toFileX3D        (filenameX3D);
                thisExampleX3dModel.toFileClassicVRML(filenameX3DV);
// TODO         thisExampleX3dModel.toFileJSON       (filenameJSON);
        }
    }
}
