package Savage.Scenarios.AmphibiousRaidCampPendleton;

import org.web3d.x3d.jsail.Core.*;
import org.web3d.x3d.jsail.EnvironmentalEffects.*;
import org.web3d.x3d.jsail.EnvironmentalSensor.*;
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.Shape.*;
import org.web3d.x3d.jsail.Time.*;

// Javadoc metadata annotations follow, see below for X3DJSAIL Java source code.
/**
 * <p> Amphibious Raid shows an exemplar amphibious raid at Red Beach, Camp Pendleton California. It is the primary scenario for the SAVAGE group. </p>
 <p> Related links: Catalog page <a href="../../../../Scenarios/AmphibiousRaidCampPendleton/AmphibiousRaidIndex.html" target="_blank">AmphibiousRaid</a>,  source <a href="../../../../Scenarios/AmphibiousRaidCampPendleton/AmphibiousRaid.java">AmphibiousRaid.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/AmphibiousRaidCampPendleton/AmphibiousRaid.x3d">AmphibiousRaid.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> description </i> </td>
			<td> Amphibious Raid shows an exemplar amphibious raid at Red Beach, Camp Pendleton California. It is the primary scenario for the SAVAGE group. </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> Don Brutzman, Curtis Blais, Jeff Weekley, Jane Wu, Shane Nicklaus, MIke Hunsberger </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 9 April 2001 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> modified </i> </td>
			<td> 28 January 2024 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="../../../../Scenarios/AmphibiousRaidCampPendleton/../../documents/NicklausNpsRedBeachRaidScenario2001May2.html">../../documents/NicklausNpsRedBeachRaidScenario2001May2.html</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="../../../../Scenarios/AmphibiousRaidCampPendleton/../../documents/NicklausNpsRedBeachRaidScenario2001May2.ppt">../../documents/NicklausNpsRedBeachRaidScenario2001May2.ppt</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> Image </i> </td>
			<td> <a href="../../../../Scenarios/AmphibiousRaidCampPendleton/HeloPatrolPendletonBackground.png">HeloPatrolPendletonBackground.png</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="../../../../Scenarios/AmphibiousRaidCampPendleton/AmphibiousRaidWithCommunications.x3d">AmphibiousRaidWithCommunications.x3d</a> </td>
		</tr>
		<tr style="color:burntorange">
			<td style="text-align:right; vertical-align: text-top;"> <i> warning </i> </td>
			<td> Coordinate system axes need to be aligned properly. </td>
		</tr>
		<tr style="color:burntorange">
			<td style="text-align:right; vertical-align: text-top;"> <i> warning </i> </td>
			<td> Future work: add pushbutton to enable/disable ViewpointSequencer. IMPORT/EXPORT viewpoints from Inline scenes and add Viewpoints to ViewpointSequencer. </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/AmphibiousRaidCampPendleton/AmphibiousRaid.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/Scenarios/AmphibiousRaidCampPendleton/AmphibiousRaid.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/Tools/Animation/WaypointInterpolator.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/WaypointInterpolator.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/AmphibiousRaidCampPendleton/../../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 Don Brutzman, Curtis Blais, Jeff Weekley, Jane Wu, Shane Nicklaus, MIke Hunsberger
 */

public class AmphibiousRaid
{
	/** Default constructor to create this object. */
	public AmphibiousRaid ()
	{
	  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("AmphibiousRaid.x3d"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("Amphibious Raid shows an exemplar amphibious raid at Red Beach, Camp Pendleton California. It is the primary scenario for the SAVAGE group."))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("Don Brutzman, Curtis Blais, Jeff Weekley, Jane Wu, Shane Nicklaus, MIke Hunsberger"))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("9 April 2001"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("28 January 2024"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("../../documents/NicklausNpsRedBeachRaidScenario2001May2.html"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("../../documents/NicklausNpsRedBeachRaidScenario2001May2.ppt"))
    .addMeta(new meta().setName(meta.NAME_IMAGE      ).setContent("HeloPatrolPendletonBackground.png"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("AmphibiousRaidWithCommunications.x3d"))
    .addMeta(new meta().setName(meta.NAME_WARNING    ).setContent("Coordinate system axes need to be aligned properly."))
    .addMeta(new meta().setName(meta.NAME_WARNING    ).setContent("Future work: add pushbutton to enable/disable ViewpointSequencer. IMPORT/EXPORT viewpoints from Inline scenes and add Viewpoints to ViewpointSequencer."))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://www.web3d.org/x3d/content/examples/Savage/Scenarios/AmphibiousRaidCampPendleton/AmphibiousRaid.x3d"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/WaypointInterpolator.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(" Prototype and external prototype declarations must precede use ")
    .addChild(new WorldInfo().setTitle("AmphibiousRaid.x3d"))
    .addChild(new ExternProtoDeclare("SuperCobra").setName("SuperCobra").setUrl(new String[] {"../../AircraftHelicopters/AH1SuperCobraUnitedStates/SuperCobraPrototype.x3d#SuperCobra","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SuperCobraPrototype.x3d#SuperCobra","../../AircraftHelicopters/AH1SuperCobraUnitedStates/SuperCobraPrototype.wrl#SuperCobra","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SuperCobraPrototype.wrl#SuperCobra"})
      .addField(new field().setName("tailBoomColor").setType(field.TYPE_SFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY))
      .addField(new field().setName("tailRotorDriveShaftColor").setType(field.TYPE_SFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY))
      .addField(new field().setName("horizontalStabilizerColor").setType(field.TYPE_SFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY))
      .addField(new field().setName("fuselageColor").setType(field.TYPE_SFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY))
      .addField(new field().setName("cockpitColor").setType(field.TYPE_SFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY))
      .addField(new field().setName("cowlingColor").setType(field.TYPE_SFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY))
      .addField(new field().setName("helicopterName").setType(field.TYPE_SFSTRING).setAccessType(field.ACCESSTYPE_INITIALIZEONLY))
      .addField(new field().setName("inFlight").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY)))
    .addChild(new ExternProtoDeclare("CameraCompass36").setName("CameraCompass36").setUrl(new String[] {"../../../Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.x3d#CameraCompass36","https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.x3d#CameraCompass36","../../../Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.wrl#CameraCompass36","https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.wrl#CameraCompass36"})
      .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 definition to control a scenario's 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("HiddenViewpoint").setName("HiddenViewpoint").setAppinfo("Hidden viewpoint becomes active (binds) upon pointer selection to reveal an interesting view with an optionally label").setUrl(new String[] {"../../../Savage/Tools/Animation/HiddenViewpointPrototype.x3d#HiddenViewpoint","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/HiddenViewpointPrototype.x3d#HiddenViewpoint","../../../Savage/Tools/Animation/HiddenViewpointPrototype.wrl#HiddenViewpoint","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/HiddenViewpointPrototype.wrl#HiddenViewpoint"})
      .addField(new field().setName("position").setType(field.TYPE_SFVEC3F).setAccessType(field.ACCESSTYPE_INPUTOUTPUT))
      .addField(new field().setName("rotation").setType(field.TYPE_SFROTATION).setAccessType(field.ACCESSTYPE_INPUTOUTPUT))
      .addField(new field().setName("sensorRadius").setType(field.TYPE_SFFLOAT).setAccessType(field.ACCESSTYPE_INITIALIZEONLY))
      .addField(new field().setName("label").setType(field.TYPE_MFSTRING).setAccessType(field.ACCESSTYPE_INPUTOUTPUT))
      .addField(new field().setName("labelOffset").setType(field.TYPE_SFVEC3F).setAccessType(field.ACCESSTYPE_INPUTOUTPUT))
      .addField(new field().setName("labelFontSize").setType(field.TYPE_SFFLOAT).setAccessType(field.ACCESSTYPE_INITIALIZEONLY))
      .addField(new field().setName("labelColor").setType(field.TYPE_SFCOLOR).setAccessType(field.ACCESSTYPE_INPUTOUTPUT))
      .addField(new field().setName("activate").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY)))
    .addChild(new ExternProtoDeclare("ViewPositionOrientation").setName("ViewPositionOrientation").setAppinfo("ViewPositionOrientation provides provides console output of local position and orientation as user navigates").setUrl(new String[] {"../../Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation","https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation","../../Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation","https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation"})
      .addField(new field().setName("enabled").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Whether or not ViewPositionOrientation sends output to console."))
      .addField(new field().setName("traceEnabled").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Output internal trace messages for debugging this node - developer use only can be ignored."))
      .addField(new field().setName("set_traceEnabled").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY).setAppinfo("Ability to turn output tracing on/off at runtime."))
      .addField(new field().setName("position_changed").setType(field.TYPE_SFVEC3F).setAccessType(field.ACCESSTYPE_OUTPUTONLY).setAppinfo("Output local position."))
      .addField(new field().setName("orientation_changed").setType(field.TYPE_SFROTATION).setAccessType(field.ACCESSTYPE_OUTPUTONLY).setAppinfo("Output local orientation."))
      .addField(new field().setName("outputViewpointString").setType(field.TYPE_MFSTRING).setAccessType(field.ACCESSTYPE_OUTPUTONLY).setAppinfo("MFString value of new Viewpoint")))
    .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) ")
      .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."))
      .addComments(" interpolation fields ")
      .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"))
      .addComments(" display-related fields ")
      .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("ViewpointSequencer").setName("ViewpointSequencer").setAppinfo("Sequentially binds each Viewpoint in a set of Viewpoint USE nodes, creating an automatic tour for a scene").setUrl(new String[] {"../../../Savage/Tools/Animation/ViewpointSequencerPrototype.x3d#ViewpointSequencer","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/ViewpointSequencerPrototype.x3d#ViewpointSequencer","../../../Savage/Tools/Animation/ViewpointSequencerPrototype.wrl#ViewpointSequencer","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/ViewpointSequencerPrototype.wrl#ViewpointSequencer"})
      .addField(new field().setName("viewpoints").setType(field.TYPE_MFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Viewpoint USE nodes that are sequentially bound"))
      .addField(new field().setName("interval").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setAppinfo("number of seconds between viewpoint shifts"))
      .addField(new field().setName("enabled").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setAppinfo("whether ViewpointSequencer is enabled or not"))
      .addField(new field().setName("set_enabled").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY).setAppinfo("whether ViewpointSequencer is enabled or not"))
      .addField(new field().setName("previous").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY).setAppinfo("bind previous Viewpoint in list"))
      .addField(new field().setName("next").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY).setAppinfo("bind next Viewpoint in list"))
      .addField(new field().setName("toggleMessage").setType(field.TYPE_MFSTRING).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Select message to toggle ViewpointSequencer"))
      .addField(new field().setName("toggleMessageFontSize").setType(field.TYPE_SFFLOAT).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("Color for toggleMessage text."))
      .addField(new field().setName("toggleMessageColor").setType(field.TYPE_SFCOLOR).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setAppinfo("Color for toggleMessage text."))
      .addField(new field().setName("traceEnabled").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setAppinfo("enable console output")))
    .addComments(" ================= ")
    .addChild(new NavigationInfo("CloseUpNavigation").setAvatarSize(new double[] {2.0,2.0,2.0}).setSpeed(100).setVisibilityLimit(80000))
    .addChild(new Switch().setWhichChoice(-1)
      .addComments(" NavigationInfo changes are not yet able to overcome aliasing bugs in graphics-rendering cards, unfortunately. Still working the problem. ")
      .addChild(new Group()
        .addChild(new NavigationInfo("HighAltitudeLongDistanceNavigation").setAvatarSize(new double[] {8.0,8.0,8.0}).setSpeed(1000).setVisibilityLimit(80000))
        .addChild(new ProximitySensor("Below1000m").setSize(100000.0,2000.0,100000.0))
        .addChild(new ROUTE().setFromNode("Below1000m").setFromField("isActive").setToNode("CloseUpNavigation").setToField("set_bind"))))
    .addChild(new Background().setGroundAngle(new double[] {1.309,1.570796}).setGroundColor(new MFColor(new double[] {0.0,0.2,0.4,0.05,0.25,0.6,0.1,0.2,0.4})).setSkyAngle(new double[] {1.309,1.571}).setSkyColor(new MFColor(new double[] {0.1,0.1,0.4,0.1,0.125,0.4,0.1,0.1,0.3})))
    .addChild(new Viewpoint("ViewFullScenarioAbove").setDescription("Amphibious raid - full scenario seen from above").setOrientation(-0.557,-0.799,-0.229,0.9506).setPosition(-600.0,10000.0,25000.0))
    .addChild(new Viewpoint("View1000m").setDescription("1000m elevation view").setOrientation(0.0,1.0,0.0,-0.78).setPosition(-200.0,1000.0,22000.0))
    .addChild(new Transform().setRotation(0.0,0.0,1.0,.1)
      .addChild(new Viewpoint("ViewWaypoint1").setDescription("Waypoint 1").setOrientation(0.0,1.0,0.0,1.57).setPosition(9451.0,20.0,14935.0))
      .addChild(new Viewpoint("ViewWaypoint2").setDescription("waypoint 2").setOrientation(0.0,1.0,0.0,1.57).setPosition(11217.2,10.0,13996.6)))
    .addComments(" This is a hack to orient camera to scene. Actually, scene elements need to be rotated. ")
    .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57)
      .addChild(new ProtoInstance("CameraCompass36").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.9,0.9,0.9)))
        .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(0.9,0.9,0.9)))))
    .addComments(" Hidden viewpoints are clickable transparent boxes that let us temporarily view the scene from a given vantage point. The camera returns to the previously bound viewpoint upon unclicking the mouse. ")
    .addChild(new Group("HiddenViewpointGroup")
      .addChild(new ProtoInstance("HiddenViewpoint", "CobraCapStartingPoint").setContainerField("children")
        .addFieldValue(new fieldValue().setName("position").setValue(new SFVec3f(6530.0,18.0,16800.0)))
        .addFieldValue(new fieldValue().setName("rotation").setValue(new SFRotation(0.0,1.0,0.0,-0.1)))
        .addFieldValue(new fieldValue().setName("sensorRadius").setValue(10))
        .addFieldValue(new fieldValue().setName("label").setValue(new String[] {"Cobra CAP","starting point","","6530 11.5 16800"}))
        .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,-2.0,0.0)))
        .addFieldValue(new fieldValue().setName("labelFontSize").setValue(0.5))
        .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(1.0,0.5,0.0))))
      .addChild(new ProtoInstance("HiddenViewpoint", "CobraCapInitialClimb").setContainerField("children")
        .addFieldValue(new fieldValue().setName("position").setValue(new SFVec3f(6530.0,500.0,16800.0)))
        .addFieldValue(new fieldValue().setName("rotation").setValue(new SFRotation(0.0,1.0,0.0,-0.4)))
        .addFieldValue(new fieldValue().setName("sensorRadius").setValue(100))
        .addFieldValue(new fieldValue().setName("label").setValue(new String[] {"Cobra CAP","initial climb point","","6530 500 16800"}))
        .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,1.0,0.0)))
        .addFieldValue(new fieldValue().setName("labelFontSize").setValue(0.5))
        .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(1.0,0.5,0.0))))
      .addChild(new ProtoInstance("HiddenViewpoint", "SouthernCapTurnPoint").setContainerField("children")
        .addFieldValue(new fieldValue().setName("position").setValue(new SFVec3f(25400.0,500.0,19100.0)))
        .addFieldValue(new fieldValue().setName("rotation").setValue(new SFRotation(0.0,1.0,0.0,0.4)))
        .addFieldValue(new fieldValue().setName("sensorRadius").setValue(200))
        .addFieldValue(new fieldValue().setName("label").setValue(new String[] {"Cobra CAP","Southern Turn Point","","25400 500 191000"}))
        .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,1.0,0.0)))
        .addFieldValue(new fieldValue().setName("labelFontSize").setValue(0.5))
        .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(1.0,0.5,0.0))))
      .addChild(new ProtoInstance("HiddenViewpoint", "NorthernCapTurnPoint").setContainerField("children")
        .addFieldValue(new fieldValue().setName("position").setValue(new SFVec3f(5100.0,500.0,700.0)))
        .addFieldValue(new fieldValue().setName("rotation").setValue(new SFRotation(0.0,1.0,0.0,-2.3)))
        .addFieldValue(new fieldValue().setName("sensorRadius").setValue(200))
        .addFieldValue(new fieldValue().setName("label").setValue(new String[] {"Cobra CAP","Northern Turn Point","","5100 500 700"}))
        .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,1.0,0.0)))
        .addFieldValue(new fieldValue().setName("labelFontSize").setValue(0.5))
        .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(1.0,0.5,0.0)))))
    .addComments(" This top-level switch simply supports debugging ")
    .addChild(new Switch().setWhichChoice(0)
      .addComments(" Main group with all players. ")
      .addChild(new Group("EntireScene")
        .addComments(" ==================== Land terrain ==================== ")
        .addChild(new Transform()
          .addChild(new Inline().setUrl(new String[] {"../../Locations/CampPendletonCalifornia/CampPendletonOperatingAreasExample.x3d","https://www.web3d.org/x3d/content/examples/Savage/Locations/CampPendletonCalifornia/CampPendletonOperatingAreasExample.x3d","../../Locations/CampPendletonCalifornia/CampPendletonOperatingAreasExample.wrl","https://www.web3d.org/x3d/content/examples/Savage/Locations/CampPendletonCalifornia/CampPendletonOperatingAreasExample.wrl"})))
        .addComments(" ==================== Ships ==================== ")
        .addComments(" LPD is anchored and not moving. ")
        .addChild(new Transform("LPD").setTranslation(6600.0,7.0,16800.0)
          .addChild(new Inline().setUrl(new String[] {"../../ShipsMilitary/LandingShipTankEnduranceSingapore/EnduranceLST.x3d","https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/LandingShipTankEnduranceSingapore/EnduranceLST.x3d","../../ShipsMilitary/LandingShipTankEnduranceSingapore/EnduranceLST.wrl","https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/LandingShipTankEnduranceSingapore/EnduranceLST.wrl"})))
        .addComments(" ==================== Amphibious vehicles ==================== ")
        .addComments(" AAAV-1 Block ")
        .addChild(new TimeSensor("AAAV1_Clock").setCycleInterval(307.3).setLoop(true))
        .addChild(new ProtoInstance("WaypointInterpolator", "AAAV_1_WaypointInterpolator").setContainerField("children")
          .addComments(" need to improve elevations on beach (final waypoint) ")
          .addFieldValue(new fieldValue().setName("description").setValue("AAAV_1_WaypointInterpolator"))
          .addFieldValue(new fieldValue().setName("waypoints").setValue(new MFVec3f(new MFVec3f(new double[] {6802.0,1.0,16343.0,7685.0,1.0,15873.7,8568.1,1.0,15404.4,9451.1,1.0,14935.2,10334.2,1.0,14465.9,11217.2,1.0,13996.6,12100.3,1.0,13527.3,12983.3,1.0,13058.0,13866.4,1.0,12588.7,14749.4,1.0,12119.5,15632.5,1.0,11650.2,16515.5,1.0,11180.9,17398.6,1.0,10711.6,18281.6,1.0,10242.3,19164.7,1.0,9773.1,19400.0,1.0,9648.0,19782.0,1.0,9185.0,20100.0,10.0,8800.0}))))
          .addComments(" 1 knot = 0.5144 meters/second ")
          .addFieldValue(new fieldValue().setName("defaultSpeed").setValue(50))
          .addFieldValue(new fieldValue().setName("lineColor").setValue(new SFColor(0.8,0.8,0.0)))
          .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(0.8,0.8,0.0)))
          .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,3.0,0.0)))
          .addFieldValue(new fieldValue().setName("labelFontSize").setValue(1.5))
          .addFieldValue(new fieldValue().setName("traceEnabled").setValue(false)))
        .addChild(new ROUTE().setFromNode("AAAV1_Clock").setFromField("fraction_changed").setToNode("AAAV_1_WaypointInterpolator").setToField("set_fraction"))
        .addChild(new ROUTE().setFromNode("AAAV_1_WaypointInterpolator").setFromField("totalDuration").setToNode("AAAV1_Clock").setToField("set_cycleInterval"))
        .addComments(" Most entity transforms will get converted to DIS-Java-VRML EspduTransforms when creating a networked DIS version. ")
        .addChild(new Transform("AAAV-Location").setTranslation(6600.0,0.0,16800.0)
          .addChild(new Group()
            .addChild(new Viewpoint("ViewAAAVfromBehind").setDescription("AAAV raid from behind").setOrientation(0.0,1.0,0.0,-1.57).setPosition(-40.0,2.0,0.0))
            .addChild(new Viewpoint("ViewAAAVfromAhead").setDescription("AAAV raid from ahead").setOrientation(0.0,1.0,0.0,1.57).setPosition(50.0,12.0,0.0))
            .addChild(new Transform("VerticalCorrection").setTranslation(0.0,-4.0,0.0)
              .addChild(new Inline("AAAV").setUrl(new String[] {"../../AmphibiousVehicles/AAAV/AAAV.x3d","https://www.web3d.org/x3d/content/examples/Savage/AmphibiousVehicles/AAAV/AAAV.x3d","../../AmphibiousVehicles/AAAV/AAAV.wrl","https://www.web3d.org/x3d/content/examples/Savage/AmphibiousVehicles/AAAV/AAAV.wrl"})))
            .addChild(new Group("OtherAAAVs")
              .addChild(new Transform().setTranslation(-15.0,-4.0,15.0)
                .addChild(new Transform("AAAV-2")
                  .addChild(new Inline().setUSE("AAAV"))
                  .addChild(new PositionInterpolator("AAV-2PATH").setKey(new double[] {0.00,0.11,0.17,0.22,0.33,0.44,0.50,0.55,0.66,0.77,0.83,0.88,0.99}).setKeyValue(new MFVec3f(new double[] {0.0,0.0,0.0,1.0,0.96,1.0,1.5,0.21,1.5,2.0,0.96,2.0,3.0,0.0,3.0,2.5,0.96,3.0,1.75,0.41,3.0,1.0,0.96,3.0,3.0,0.0,3.0,2.0,0.46,2.0,1.0,0.4,1.5,0.0,0.46,1.0,0.0,0.0,0.0})))
                  .addChild(new ROUTE().setFromNode("AAV-2PATH").setFromField("value_changed").setToNode("AAAV-2").setToField("set_translation"))))
              .addChild(new Transform().setTranslation(-15.0,-4.0,-17.5)
                .addChild(new Transform("AAAV-3")
                  .addChild(new Inline().setUSE("AAAV"))
                  .addChild(new PositionInterpolator("AAV-3PATH").setKey(new double[] {0.00,0.07,0.13,0.22,0.36,0.47,0.55,0.625,0.66,0.72,0.80,0.85,0.99}).setKeyValue(new MFVec3f(new double[] {0.0,0.0,0.0,1.0,0.96,1.0,1.5,0.21,2.25,2.0,0.46,2.66,3.0,-0.25,3.0,2.5,0.96,3.0,1.75,0.41,3.0,1.0,0.96,3.0,3.0,0.0,3.0,2.0,0.46,2.0,1.0,0.4,1.5,0.0,0.46,1.0,0.0,0.0,0.0})))
                  .addChild(new ROUTE().setFromNode("AAV-3PATH").setFromField("value_changed").setToNode("AAAV-3").setToField("set_translation")))))))
        .addChild(new ROUTE().setFromNode("AAAV_1_WaypointInterpolator").setFromField("position_changed").setToNode("AAAV-Location").setToField("set_translation"))
        .addChild(new ROUTE().setFromNode("AAAV_1_WaypointInterpolator").setFromField("orientation_changed").setToNode("AAAV-Location").setToField("set_rotation"))
        .addComments(" ==================== Helicopter 1 Block ==================== ")
        .addChild(new Transform("Helo-1").setTranslation(6530.0,11.5,16800.0)
          .addChild(new ProtoInstance("SuperCobra", "HeloInstance1").setContainerField("children")
            .addFieldValue(new fieldValue().setName("helicopterName").setValue("Cobra CAP 1"))
            .addFieldValue(new fieldValue().setName("tailBoomColor")
              .addChild(new Appearance("GREY_APPEARANCE")
                .setMaterial(new Material().setDiffuseColor(0.5,0.5,0.5))))
            .addFieldValue(new fieldValue().setName("tailRotorDriveShaftColor")
              .addChild(new Appearance().setUSE("GREY_APPEARANCE")))
            .addFieldValue(new fieldValue().setName("horizontalStabilizerColor")
              .addChild(new Appearance()
                .setMaterial(new Material().setDiffuseColor(0.5,0.5,0.5))))
            .addFieldValue(new fieldValue().setName("fuselageColor")
              .addChild(new Appearance()
                .setMaterial(new Material().setDiffuseColor(0.6,0.6,0.6))))
            .addFieldValue(new fieldValue().setName("cockpitColor")
              .addChild(new Appearance()
                .setMaterial(new Material().setDiffuseColor(0.6,0.6,0.6))))
            .addFieldValue(new fieldValue().setName("cowlingColor")
              .addChild(new Appearance()
                .setMaterial(new Material().setDiffuseColor(0.5,0.5,0.5))))))
        .addChild(new ProtoInstance("WaypointInterpolator", "Helo_1_WaypointInterpolator").setContainerField("children")
          .addFieldValue(new fieldValue().setName("description").setValue("Helo_1_WaypointInterpolator"))
          .addFieldValue(new fieldValue().setName("waypoints").setValue(new MFVec3f(getfieldValue_waypoints_6_220_value())))
          .addComments(" 1 knot = 0.514444444 meters/second ")
          .addFieldValue(new fieldValue().setName("defaultSpeed").setValue(100))
          .addFieldValue(new fieldValue().setName("pitchUpDownForVerticalWaypoints").setValue(false))
          .addFieldValue(new fieldValue().setName("lineColor").setValue(new SFColor(0.0,0.8,0.0)))
          .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(0.0,0.8,0.0)))
          .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,5.0,0.0)))
          .addFieldValue(new fieldValue().setName("labelFontSize").setValue(3))
          .addFieldValue(new fieldValue().setName("traceEnabled").setValue(false)))
        .addChild(new TimeSensor("Helo1_Clock").setCycleInterval(635.1).setLoop(true))
        .addChild(new ROUTE().setFromNode("Helo_1_WaypointInterpolator").setFromField("totalDuration").setToNode("Helo1_Clock").setToField("cycleInterval"))
        .addChild(new ROUTE().setFromNode("Helo1_Clock").setFromField("fraction_changed").setToNode("Helo_1_WaypointInterpolator").setToField("set_fraction"))
        .addComments(" ==================== Helicopter 2 Block ==================== ")
        .addChild(new Transform("Helo-2").setTranslation(6600.0,50.0,16800.0)
          .addChild(new Transform()
            .addChild(new ProtoInstance("SuperCobra", "HeloInstance2").setContainerField("children")
              .addFieldValue(new fieldValue().setName("helicopterName").setValue("Cobra CAP 2"))
              .addFieldValue(new fieldValue().setName("tailBoomColor")
                .addChild(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.5,0.5,0.5))))
              .addFieldValue(new fieldValue().setName("tailRotorDriveShaftColor")
                .addChild(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.5,0.5,0.5))))
              .addFieldValue(new fieldValue().setName("horizontalStabilizerColor")
                .addChild(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.5,0.5,0.5))))
              .addFieldValue(new fieldValue().setName("fuselageColor")
                .addChild(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.6,0.6,0.6))))
              .addFieldValue(new fieldValue().setName("cockpitColor")
                .addChild(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.6,0.6,0.6))))
              .addFieldValue(new fieldValue().setName("cowlingColor")
                .addChild(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.5,0.5,0.5)))))))
        .addChild(new ProtoInstance("WaypointInterpolator", "Helo_2_WaypointInterpolator").setContainerField("children")
          .addFieldValue(new fieldValue().setName("description").setValue("Helo_2_WaypointInterpolator"))
          .addFieldValue(new fieldValue().setName("waypoints").setValue(new MFVec3f(getfieldValue_waypoints_6_255_value())))
          .addComments(" 1 knot = 0.514444444 meters/second ")
          .addFieldValue(new fieldValue().setName("defaultSpeed").setValue(200))
          .addFieldValue(new fieldValue().setName("lineColor").setValue(new SFColor(0.8,0.0,0.0)))
          .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(0.8,0.0,0.0)))
          .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,5.0,0.0)))
          .addFieldValue(new fieldValue().setName("labelFontSize").setValue(3))
          .addFieldValue(new fieldValue().setName("traceEnabled").setValue(false)))
        .addChild(new TimeSensor("Helo2_Clock").setCycleInterval(320.3).setLoop(true))
        .addChild(new ROUTE().setFromNode("Helo_2_WaypointInterpolator").setFromField("totalDuration").setToNode("Helo2_Clock").setToField("cycleInterval"))
        .addChild(new ROUTE().setFromNode("Helo2_Clock").setFromField("fraction_changed").setToNode("Helo_2_WaypointInterpolator").setToField("set_fraction"))
        .addComments(" ============== AAV7PA1 ")
        .addChild(new Transform("AAV7PA1Location").setScale(1.25,1.25,1.25).setTranslation(6620.0,-2.0,16900.0)
          .addChild(new Inline().setUrl(new String[] {"../../AmphibiousVehicles/AAV/AAV.x3d","https://www.web3d.org/x3d/content/examples/Savage/AmphibiousVehicles/AAV/AAV.x3d","../../AmphibiousVehicles/AAV/AAV.wrl","https://www.web3d.org/x3d/content/examples/Savage/AmphibiousVehicles/AAV/AAV.wrl"})))
        .addChild(new TimeSensor("AAV7PA1Clock").setCycleInterval(1560).setLoop(true))
        .addChild(new ProtoInstance("WaypointInterpolator", "AAV7PA1WaypointInterpolator").setContainerField("children")
          .addFieldValue(new fieldValue().setName("description").setValue("AAV7PA1WaypointInterpolator"))
          .addFieldValue(new fieldValue().setName("waypoints").setValue(new MFVec3f(new MFVec3f(new double[] {6620.0,-1.0,16900.0,6720.0,-1.0,16900.0,6870.0,-1.0,19500.0,7400.0,-1.0,19500.0,8400.0,-1.0,16900.0,6620.0,-1.0,16900.0}))))
          .addComments(" 1 knot = 0.514444444 meters/second ")
          .addFieldValue(new fieldValue().setName("defaultSpeed").setValue(5))
          .addFieldValue(new fieldValue().setName("lineColor").setValue(new SFColor(0.8,0.0,0.65)))
          .addFieldValue(new fieldValue().setName("labelColor").setValue(new SFColor(0.8,0.0,0.0)))
          .addFieldValue(new fieldValue().setName("labelOffset").setValue(new SFVec3f(0.0,5.0,0.0)))
          .addFieldValue(new fieldValue().setName("labelFontSize").setValue(3))
          .addFieldValue(new fieldValue().setName("traceEnabled").setValue(false)))
        .addChild(new ROUTE().setFromNode("AAV7PA1WaypointInterpolator").setFromField("totalDuration").setToNode("AAV7PA1Clock").setToField("cycleInterval"))
        .addComments(" AAV7PA1 Waypoint Routes ")
        .addChild(new ROUTE().setFromNode("AAV7PA1Clock").setFromField("fraction_changed").setToNode("AAV7PA1WaypointInterpolator").setToField("set_fraction"))
        .addChild(new ROUTE().setFromNode("AAV7PA1WaypointInterpolator").setFromField("position_changed").setToNode("AAV7PA1Location").setToField("set_translation"))
        .addChild(new ROUTE().setFromNode("AAV7PA1WaypointInterpolator").setFromField("orientation_changed").setToNode("AAV7PA1Location").setToField("set_rotation")))
      .addComments(" hide things here until ready to bring them into the active scene ")
      .addChild(new Switch().setWhichChoice(0)
        .addComments(" Ocean bathymetry ")
        .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57079).setTranslation(11900.0,0.0,6000.0)
          .addChild(new Inline().setUrl(new String[] {"../../Locations/CampPendletonCalifornia/ChartletTranscribed.x3d","https://www.web3d.org/x3d/content/examples/Savage/Locations/CampPendletonCalifornia/ChartletTranscribed.x3d","../../Locations/CampPendletonCalifornia/ChartletTranscribed.wrl","https://www.web3d.org/x3d/content/examples/Savage/Locations/CampPendletonCalifornia/ChartletTranscribed.wrl"})))
        .addComments(" GeoVrml versions will be here someday ")
        .addChild(new Group()
          .addComments(" Southwest corner reference point: 33:12N 117:38W ")
          .addComments(" GeoLocation and USE EntireScene to follow "))))
    .addComments(" AAAV-1 Waypoint Routes ")
    .addComments(" Helo-1 Waypoint Routes ")
    .addChild(new ROUTE().setFromNode("Helo1_Clock").setFromField("isActive").setToNode("HeloInstance1").setToField("inFlight"))
    .addChild(new ROUTE().setFromNode("Helo_1_WaypointInterpolator").setFromField("position_changed").setToNode("Helo-1").setToField("set_translation"))
    .addChild(new ROUTE().setFromNode("Helo_1_WaypointInterpolator").setFromField("orientation_changed").setToNode("Helo-1").setToField("set_rotation"))
    .addComments(" Helo-2 Waypoint Routes ")
    .addChild(new ROUTE().setFromNode("Helo2_Clock").setFromField("isActive").setToNode("HeloInstance2").setToField("inFlight"))
    .addChild(new ROUTE().setFromNode("Helo_2_WaypointInterpolator").setFromField("position_changed").setToNode("Helo-2").setToField("set_translation"))
    .addChild(new ROUTE().setFromNode("Helo_2_WaypointInterpolator").setFromField("orientation_changed").setToNode("Helo-2").setToField("set_rotation"))
    .addComments(" AAV2 ")
    .addChild(new ROUTE().setFromNode("AAAV1_Clock").setFromField("fraction_changed").setToNode("AAV-2PATH").setToField("set_fraction"))
    .addChild(new ProtoInstance("ViewpointSequencer").setContainerField("children")
      .addFieldValue(new fieldValue().setName("viewpoints")
        .addChild(new Viewpoint().setUSE("ViewFullScenarioAbove"))
        .addChild(new Viewpoint().setUSE("View1000m"))
        .addChild(new Viewpoint().setUSE("ViewWaypoint1"))
        .addChild(new Viewpoint().setUSE("ViewWaypoint2"))
        .addChild(new Viewpoint().setUSE("ViewAAAVfromBehind"))
        .addChild(new Viewpoint().setUSE("ViewAAAVfromAhead")))
      .addFieldValue(new fieldValue().setName("enabled").setValue(false))
      .addFieldValue(new fieldValue().setName("interval").setValue(8)))
    .addComments(" ViewPositionOrientation is a prototype that lets us find good viewpoints for inclusion in the scene ")
    .addChild(new ProtoInstance("ViewPositionOrientation", "ConsoleOutputViewPositionOrientation").setContainerField("children")
      .addFieldValue(new fieldValue().setName("enabled").setValue(false))));
            }
            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


		/** Large attribute array: fieldValue value field, scene-graph level=6, element #220, 201 total numbers made up of 67 3-tuple values.
		 * Reassemble split array as single method to improve readability and runnability.
		 * Provide large array values via separate methods, hoping to avoid 'code too large' Java compilation errors. 
		 * Individual Java methods (including aggregated initializations) are limited to 64KB.
		 * @see https://stackoverflow.com/questions/2407912/code-too-large-compilation-error-in-java
		 * @see https://stackoverflow.com/questions/11437905/java-too-many-constants-jvm-error
		 */
		private MFVec3f getfieldValue_waypoints_6_220_value()
		{
			MFVec3f fieldValue_waypoints_6_220_value = new MFVec3f(new double[] {6600.0,600.0,16800.0,7592.6,600.0,16921.4,8585.2,600.0,17042.9,9577.8,600.0,17164.3,10570.4,600.0,17285.7,11563.0,600.0,17407.2,12555.6,600.0,17528.6,13548.2,600.0,17650.0,14540.8,600.0,17771.5,15533.4,600.0,17892.9,16526.0,600.0,18014.4,17518.6,600.0,18135.8,18511.2,600.0,18257.2,19503.8,600.0,18378.7,20496.4,600.0,18500.1,21489.0,600.0,18621.5,22481.6,600.0,18743.0,23474.2,600.0,18864.4,24466.8,600.0,18985.8,25400.0,600.0,19100.0,24906.2,600.0,18230.4,24412.4,600.0,17360.9,23918.5,600.0,16491.3,23424.7,600.0,15621.8,22930.9,600.0,14752.2,22437.1,600.0,13882.6,21943.2,600.0,13013.1,21449.4,600.0,12143.5,20955.6,600.0,11273.9,20800.0,600.0,11000.0,20072.7,600.0,10313.7,19345.4,600.0,9627.4,18618.1,600.0,8941.0,17890.8,600.0,8254.7,17163.5,600.0,7568.4,16436.2,600.0,6882.1,15708.9,600.0,6195.7,14981.6,600.0,5509.4,14254.3,600.0,4823.1,13700.0,600.0,4300.0,12777.6,600.0,3913.9,11855.1,600.0,3527.7,10932.7,600.0,3141.6,10010.2,600.0,2755.4,9087.8,600.0,2369.3,8165.4,600.0,1983.2,7242.9,600.0,1597.0,6320.5,600.0,1210.9,5398.0,600.0,824.8,5100.0,600.0,700.0,5192.8,600.0,1695.7,5285.5,600.0,2691.4,5378.3,600.0,3687.1,5471.1,600.0,4682.8,5563.8,600.0,5678.4,5656.6,600.0,6674.1,5749.4,600.0,7669.8,5842.1,600.0,8665.5,5934.9,600.0,9661.2,6027.7,600.0,10656.9,6120.4,600.0,11652.6,6213.2,600.0,12648.3,6306.0,600.0,13643.9,6398.7,600.0,14639.6,6491.5,600.0,15635.3,6584.3,600.0,16631.0,6600.0,600.0,16800.0});
			return fieldValue_waypoints_6_220_value;
		}
		/** Large attribute array: fieldValue value field, scene-graph level=6, element #255, 207 total numbers made up of 69 3-tuple values.
		 * Reassemble split array as single method to improve readability and runnability.
		 * Provide large array values via separate methods, hoping to avoid 'code too large' Java compilation errors. 
		 * Individual Java methods (including aggregated initializations) are limited to 64KB.
		 * @see https://stackoverflow.com/questions/2407912/code-too-large-compilation-error-in-java
		 * @see https://stackoverflow.com/questions/11437905/java-too-many-constants-jvm-error
		 */
		private MFVec3f getfieldValue_waypoints_6_255_value()
		{
			MFVec3f fieldValue_waypoints_6_255_value = new MFVec3f(new double[] {6530.0,11.5,16800.0,6530.0,500.0,16800.0,6600.0,500.0,16800.0,7592.6,500.0,16921.4,8585.2,500.0,17042.9,9577.8,500.0,17164.3,10570.4,500.0,17285.7,11563.0,500.0,17407.2,12555.6,500.0,17528.6,13548.2,500.0,17650.0,14540.8,500.0,17771.5,15533.4,500.0,17892.9,16526.0,500.0,18014.4,17518.6,500.0,18135.8,18511.2,500.0,18257.2,19503.8,500.0,18378.7,20496.4,500.0,18500.1,21489.0,500.0,18621.5,22481.6,500.0,18743.0,23474.2,500.0,18864.4,24466.8,500.0,18985.8,25400.0,500.0,19100.0,24906.2,500.0,18230.4,24412.4,500.0,17360.9,23918.5,500.0,16491.3,23424.7,500.0,15621.8,22930.9,500.0,14752.2,22437.1,500.0,13882.6,21943.2,500.0,13013.1,21449.4,500.0,12143.5,20955.6,500.0,11273.9,20800.0,500.0,11000.0,20072.7,500.0,10313.7,19345.4,500.0,9627.4,18618.1,500.0,8941.0,17890.8,500.0,8254.7,17163.5,500.0,7568.4,16436.2,500.0,6882.1,15708.9,500.0,6195.7,14981.6,500.0,5509.4,14254.3,500.0,4823.1,13700.0,500.0,4300.0,12777.6,500.0,3913.9,11855.1,500.0,3527.7,10932.7,500.0,3141.6,10010.2,500.0,2755.4,9087.8,500.0,2369.3,8165.4,500.0,1983.2,7242.9,500.0,1597.0,6320.5,500.0,1210.9,5398.0,500.0,824.8,5100.0,500.0,700.0,5192.8,500.0,1695.7,5285.5,500.0,2691.4,5378.3,500.0,3687.1,5471.1,500.0,4682.8,5563.8,500.0,5678.4,5656.6,500.0,6674.1,5749.4,500.0,7669.8,5842.1,500.0,8665.5,5934.9,500.0,9661.2,6027.7,500.0,10656.9,6120.4,500.0,11652.6,6213.2,500.0,12648.3,6306.0,500.0,13643.9,6398.7,500.0,14639.6,6491.5,500.0,15635.3,6584.3,500.0,16631.0,6600.0,500.0,16800.0});
			return fieldValue_waypoints_6_255_value;
		}

	/** 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 AmphibiousRaid 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 AmphibiousRaid().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.AmphibiousRaidCampPendleton.AmphibiousRaid\" 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.AmphibiousRaidCampPendleton.AmphibiousRaid self-validation test confirmation: ");
                if (!validationResults.equals("success"))
                    System.out.println();
                System.out.println(validationResults.trim());

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