package Savage.ShipsMilitary.LargeDeckAmphibBoxerUnitedStates;

import org.web3d.x3d.jsail.Core.*;
import org.web3d.x3d.jsail.EnvironmentalEffects.*;
import org.web3d.x3d.jsail.fields.*;
import org.web3d.x3d.jsail.Geometry3D.*;
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.Rendering.*;
import org.web3d.x3d.jsail.Shape.*;
import org.web3d.x3d.jsail.Text.*;
import org.web3d.x3d.jsail.Texturing.*;
import org.web3d.x3d.jsail.Time.*;

// Javadoc metadata annotations follow, see below for X3DJSAIL Java source code.
/**
 * <p> Large Deck Amphibious Ship: USS BOXER (LHD 4). </p>
 <p> Related links: Catalog page <a href="../../../../ShipsMilitary/LargeDeckAmphibBoxerUnitedStates/BoxerIndex.html" target="_blank">Boxer</a>,  source <a href="../../../../ShipsMilitary/LargeDeckAmphibBoxerUnitedStates/Boxer.java">Boxer.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="../../../../ShipsMilitary/LargeDeckAmphibBoxerUnitedStates/Boxer.x3d">Boxer.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> LT Patricia Sweat USN </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> description </i> </td>
			<td> Large Deck Amphibious Ship: USS BOXER (LHD 4) </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/ShipsMilitary/LargeDeckAmphibBoxerUnitedStates/Boxer.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/LargeDeckAmphibBoxerUnitedStates/Boxer.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 20 August 2004 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> modified </i> </td>
			<td> 20 October 2019 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> generator </i> </td>
			<td> X3D-Edit 3.3, <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="../../../../ShipsMilitary/LargeDeckAmphibBoxerUnitedStates/../../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 LT Patricia Sweat USN
 */

public class Boxer
{
	/** Default constructor to create this object. */
	public Boxer ()
	{
	  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("Boxer.x3d"))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("LT Patricia Sweat USN"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("Large Deck Amphibious Ship: USS BOXER (LHD 4)"))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/LargeDeckAmphibBoxerUnitedStates/Boxer.x3d"))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("20 August 2004"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("20 October 2019"))
    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"))
    .addMeta(new meta().setName(meta.NAME_LICENSE    ).setContent("../../license.html")))
  .setScene(new Scene()
    .addComments(" Sky and ground are mirror image to have illusion of reflecting sea ")
    .addChild(new WorldInfo().setTitle("Boxer.x3d"))
    .addChild(new Background().setGroundAngle(new double[] {1.309,1.570796}).setGroundColor(new MFColor(new double[] {0.0,.2,.7,0.0,.5,1.0,1.0,1.0,1.0})).setSkyAngle(new double[] {1.309,1.571}).setSkyColor(new MFColor(new double[] {0.0,.2,.7,0.0,.5,1.0,1.0,1.0,1.0})))
    .addChild(new Transform("RotateToY-Up").setRotation(1.0,0.0,0.0,-1.57079)
      .addChild(new Transform().setRotation(0.0,0.0,1.0,1.57079)
        .addChild(new Group("ViewpointGroup")
          .addChild(new Viewpoint().setDescription("USS BOXER (LHD 4)").setOrientation(0.899,0.275,0.341,1.0232).setPosition(160.3,-234.8,222.9))
          .addChild(new Viewpoint().setDescription("port view").setOrientation(0.55,0.558,0.621,2.0206).setPosition(242.3,68.7,47.5))
          .addChild(new Viewpoint().setDescription("front view").setOrientation(1.0,0.001,-0.002,1.3122).setPosition(-0.2,-127.2,10.1))
          .addChild(new Viewpoint().setDescription("stbd view").setOrientation(0.508,-0.505,-0.698,1.9096).setPosition(-189.7,53.2,54.3))
          .addChild(new Viewpoint().setDescription("stern view: click well deck to launch LCAC").setOrientation(0.003,0.57,0.821,3.1394).setPosition(1.8,297.9,37.7)))
        .addChild(new Group("Patty_Sweat")
          .addChild(new Transform("FlightDeck").setRotation(1.0,0.0,0.0,1.57)
            .addChild(new Shape()
              .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {-21.3,75.0,21.3,75.0,21.3,-185.0,16.25,-190.0,-16.25,-190.0,-21.3,-185.0,-21.3,75.0})).setScale(new MFVec2f(new double[] {1.0,1.0,1.0,1.0})).setSpine(new MFVec3f(new double[] {0.0,4.57,0.0,0.0,0.0,0.0})))
              .setAppearance(new Appearance()
                .setMaterial(new Material("GREY").setAmbientIntensity(1)))))
          .addChild(new Transform("Hull")
            .addChild(new Shape("WellDeck")
              .setGeometry(new Extrusion().setBeginCap(false).setConvex(false).setCreaseAngle(3.14).setCrossSection(new MFVec2f(new double[] {0.0,0.0,-18.0,0.0,-18.0,-21.0,18.0,-21.0,18.0,0.0,0.0,0.0})).setScale(new MFVec2f(new double[] {1.0,1.0,1.0,1.0,.3,.2,.1,.05})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,180.0,0.0,0.0,0.0,0.0,0.0,-50.0,0.0,0.0,-60.0,0.0})))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("GREY")))))
          .addChild(new Transform("Stern_Stbd").setTranslation(-.4,180.0,0.1)
            .addChild(new Shape()
              .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {-18.0,0.0,-13.5,0.0,-13.5,-10.5,-10.125,-14.4375,-10.125,-21.0,-18.0,-21.0,-18.0,0.0})))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("GREY")))))
          .addChild(new Transform("Port_Stbd").setTranslation(0.0,180.0,0.1)
            .addChild(new Shape()
              .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {18.0,0.0,13.5,0.0,13.5,-10.5,10.125,-14.4375,10.125,-21.0,18.0,-21.0,18.0,0.0})))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("GREY")))))
          .addChild(new Transform("Top_stern").setTranslation(-.2,180.0,0.1)
            .addChild(new Shape()
              .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {-13.6,0.0,13.6,0.0,13.6,-10.5,-13.6,-10.5,-13.6,0.0})))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("GREY"))))
            .addChild(new TouchSensor("Top").setDescription("touch to activate"))
            .addChild(new TimeSensor("UpClock").setCycleInterval(10.0).setStartTime(-1.0))
            .addChild(new OrientationInterpolator("Top_up").setKey(new double[] {0.0,0.3,0.5,0.6,0.75,1.0}).setKeyValue(new MFRotation(new double[] {1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.8,1.0,0.0,0.0,1.0,1.0,0.0,0.0,1.0,1.0,0.0,0.0,0.8,1.0,0.0,0.0,0.0})))
            .addChild(new ROUTE().setFromNode("Top").setFromField("touchTime").setToNode("UpClock").setToField("set_startTime"))
            .addChild(new ROUTE().setFromNode("UpClock").setFromField("fraction_changed").setToNode("Top_up").setToField("set_fraction"))
            .addChild(new ROUTE().setFromNode("Top_up").setFromField("value_changed").setToNode("Top_stern").setToField("set_rotation")))
          .addChild(new Transform("Stern_gate").setTranslation(0.0,180.0,-21.0)
            .addChild(new Shape()
              .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {-13.6,10.5,13.6,10.5,12.0,6.5625,15.0,6.0,15.0,0.0,-15.0,0.0,-15.0,6.0,-12.0,6.5625,-13.6,10.5})))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("GREY"))))
            .addChild(new TouchSensor("Bottom").setDescription("touch to activate"))
            .addChild(new TimeSensor("DownClock").setCycleInterval(10.0).setStartTime(-1.0))
            .addChild(new OrientationInterpolator("Bottom_down").setKey(new double[] {0.0,0.3,0.5,0.6,0.75,1.0}).setKeyValue(new MFRotation(new double[] {1.0,0.0,0.0,0.0,1.0,0.0,0.0,-1.0,1.0,0.0,0.0,-1.9,1.0,0.0,0.0,-1.9,1.0,0.0,0.0,-2.0,1.0,0.0,0.0,-2.0})))
            .addChild(new ROUTE().setFromNode("Bottom").setFromField("touchTime").setToNode("DownClock").setToField("set_startTime"))
            .addChild(new ROUTE().setFromNode("DownClock").setFromField("fraction_changed").setToNode("Bottom_down").setToField("set_fraction"))
            .addChild(new ROUTE().setFromNode("Bottom_down").setFromField("value_changed").setToNode("Stern_gate").setToField("set_rotation")))
          .addChild(new Transform("Hull2")
            .addChild(new Shape()
              .setGeometry(new Extrusion().setCcw(false).setConvex(false).setCreaseAngle(.7535).setCrossSection(new MFVec2f(new double[] {0.0,0.0,-18.0,0.0,-10.5,-5.0,-6.75,-7.5,-3.5,-10.0,-2.0,-12.5,-1.65,-15.0,-1.55,-17.0,-1.45,-17.5,-1.4,-18.0,-.5,-20.5,0.0,-21.0,.5,-20.5,1.4,-18.0,1.45,-17.5,1.55,-17.0,1.65,-15.0,2.0,-12.5,3.5,-10.0,6.75,-7.5,10.5,-5.0,18.0,0.0,0.0,0.0})).setOrientation(new MFRotation(new double[] {1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0,0.0,0.0,-.6})).setScale(new MFVec2f(new double[] {1.0,1.0,1.0,1.0,1.0,1.0})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,50.0,0.0,0.0,0.0,0.0,0.0,-75.0,0.0})))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("GREY")))))
          .addChild(new Transform("flightdeck_lines")
            .addChild(new Shape("spots8")
              .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1})
                .setCoord(new Coordinate("spots8points").setPoint(new MFVec3f(new double[] {21.3,150.0,4.58,5.0,150.0,4.58}))))
              .setAppearance(new Appearance()
                .setMaterial(new Material("White").setDiffuseColor(1.0,1.0,1.0).setEmissiveColor(1.0,1.0,1.0))))
            .addChild(new Transform("number").setRotation(0.0,0.0,1.0,-3.14).setScale(10.0,10.0,10.0).setTranslation(-2.0,187.0,4.57)
              .addChild(new Shape("hull_number")
                .setGeometry(new Text().setString(new String[] {"4"})
                  .setFontStyle(new FontStyle().setCssStyle("BOLD")))
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setUSE("White")))))
            .addChild(new Shape("white_dashes2")
              .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1})
                .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {11.75,-75.0,4.58,11.75,190.0,4.58}))))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("White"))))
            .addChild(new Shape("white_dashes")
              .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1})
                .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {10.25,-75.0,4.58,10.25,190.0,4.58}))))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("White"))))
            .addChild(new Shape("spots9")
              .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1})
                .setCoord(new Coordinate().setUSE("spots8points")))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("White"))))
            .addChild(new Shape("spots7")
              .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1})
                .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {21.3,115.0,4.58,5.0,115.0,4.58}))))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("White"))))
            .addChild(new Shape("spots6")
              .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1})
                .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {21.3,65.0,4.58,5.0,65.0,4.58}))))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("White"))))
            .addChild(new Shape("spots5")
              .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1})
                .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {21.3,30.0,4.58,5.0,30.0,4.58}))))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("White"))))
            .addChild(new Shape("spots4")
              .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1})
                .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {21.3,-5.0,4.58,5.0,-5.0,4.58}))))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("White"))))
            .addChild(new Shape("spots3")
              .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1})
                .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {-21.3,-15.0,4.58,-5.0,-15.0,4.58}))))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("White"))))
            .addChild(new Shape("spots2")
              .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1})
                .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {21.3,-42.5,4.58,5.0,-42.5,4.58}))))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("White"))))
            .addChild(new Shape("spots1")
              .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1})
                .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {-21.3,-55.0,4.58,-5.0,-55.0,4.58}))))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("White"))))
            .addChild(new Shape("center_line")
              .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1})
                .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {0.0,190.0,4.58,0.0,-75.0,4.58}))))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setEmissiveColor(1.0,1.0,1.0))))
            .addChild(new Transform("fwd_number").setRotation(0.0,0.0,1.0,-3.14).setScale(12.0,12.0,12.0).setTranslation(7.0,-65.0,5.0)
              .addChild(new Shape("hull_number1")
                .setGeometry(new Text().setString(new String[] {"4"})
                  .setFontStyle(new FontStyle().setCssStyle("BOLD")))
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setUSE("White"))))))
          .addChild(new Transform("Std_Elev").setTranslation(-29.0,155.0,4.57)
            .addChild(new Shape()
              .setGeometry(new Box().setSize(15.3,15.3,1.0))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("GREY")))))
          .addChild(new Transform().setTranslation(11.0,57.4,4.57)
            .addChild(new Shape("runway1")
              .setGeometry(new Box().setSize(1.0,264.5,.005))
              .setAppearance(new Appearance()
                .setMaterial(new Material("Yellow").setDiffuseColor(1.0,1.0,.3).setEmissiveColor(1.0,1.0,.3)))))
          .addChild(new Transform("Port_Elev").setTranslation(29.0,100.0,4.57)
            .addChild(new Shape()
              .setGeometry(new Box().setSize(15.3,15.3,1.0))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("GREY"))))
            .addChild(new TouchSensor("Port_el").setDescription("touch to activate"))
            .addChild(new TimeSensor("DropClock").setCycleInterval(10.0).setStartTime(-1.0))
            .addChild(new PositionInterpolator("Portelevmov1").setKey(new double[] {0.0,.17,.34,.51,.68,.85,1.02,1.19,1.36,1.53,1.7}).setKeyValue(new MFVec3f(new double[] {29.0,100.0,4.57,29.0,100.0,2.0,29.0,100.0,0.0,29.0,100.0,-2.0,29.0,100.0,-4.0,29.0,100.0,-6.0,29.0,100.0,-4.0,29.0,100.0,-2.0,29.0,100.0,0.0,29.0,100.0,2.0,29.0,100.0,4.57})))
            .addChild(new ROUTE().setFromNode("Port_el").setFromField("touchTime").setToNode("DropClock").setToField("set_startTime"))
            .addChild(new ROUTE().setFromNode("DropClock").setFromField("fraction_changed").setToNode("Portelevmov1").setToField("set_fraction"))
            .addChild(new ROUTE().setFromNode("Portelevmov1").setFromField("value_changed").setToNode("Port_Elev").setToField("set_translation")))
          .addChild(new Transform("QtrDeck").setRotation(1.0,0.0,0.0,1.57).setTranslation(-18.0,155.0,-4.0)
            .addChild(new Shape()
              .setGeometry(new Box().setSize(0.5,10.0,10.0))
              .setAppearance(new Appearance()
                .setTexture(new ImageTexture().setUrl(new String[] {"QuarterDeck.jpg","https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/LargeDeckAmphibBoxerUnitedStates/QuarterDeck.jpg"})))))
          .addChild(new Transform("QtrDeckMove").setTranslation(-18.0,155.0,-4.0)
            .addChild(new Shape()
              .setGeometry(new Box().setSize(1.0,10.0,10.0))
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("GREY"))))
            .addChild(new TouchSensor("Deck").setDescription("touch to activate"))
            .addChild(new TimeSensor("SlideClock").setCycleInterval(10.0).setStartTime(-1.0))
            .addChild(new PositionInterpolator("Move_Deck").setKey(new double[] {0.0,.17,.34,.51,.68,.85}).setKeyValue(new MFVec3f(new double[] {-18.0,155.0,-4.0,-18.0,157.0,-4.0,-18.0,159.0,-4.0,-18.0,161.0,-4.0,-18.0,164.0,-4.0,-18.0,164.0,-4.0})))
            .addChild(new ROUTE().setFromNode("Deck").setFromField("touchTime").setToNode("SlideClock").setToField("set_startTime"))
            .addChild(new ROUTE().setFromNode("SlideClock").setFromField("fraction_changed").setToNode("Move_Deck").setToField("set_fraction"))
            .addChild(new ROUTE().setFromNode("Move_Deck").setFromField("value_changed").setToNode("QtrDeckMove").setToField("set_translation"))))
        .addChild(new Transform().setRotation(1.0,0.0,0.0,-1.57).setScale(1.4,1.4,1.4).setTranslation(5.0,55.0,6.25)
          .addChild(new Inline().setUrl(new String[] {"SuperStructure.x3d","https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/LargeDeckAmphibBoxerUnitedStates/SuperStructure.x3d","SuperStructure.wrl","https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/LargeDeckAmphibBoxerUnitedStates/SuperStructure.wrl"})))
        .addChild(new Transform("LCAC").setRotation(1.0,0.0,0.0,1.57).setTranslation(0.0,164.0,-14.0)
          .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57)
            .addChild(new Inline().setUrl(new String[] {"../../AmphibiousVehicles/LCAC/LCAC.x3d","https://www.web3d.org/x3d/content/examples/Savage/AmphibiousVehicles/LCAC/LCAC.x3d","../../AmphibiousVehicles/LCAC/LCAC.wrl","https://www.web3d.org/x3d/content/examples/Savage/AmphibiousVehicles/LCAC/LCAC.wrl"}))
            .addChild(new TouchSensor().setUSE("Bottom"))
            .addChild(new TimeSensor("OutClock").setCycleInterval(15.0).setStartTime(-1.0))
            .addChild(new PositionInterpolator("LCAC_out").setKey(new double[] {0.0,.17,.34,.51,.68,.85,1.02,1.19,1.36,1.53,1.7}).setKeyValue(new MFVec3f(new double[] {0.0,164.0,-14.0,0.0,175.0,-14.0,0.0,185.0,-14.0,0.0,195.0,-14.0,0.0,205.0,-14.0,0.0,215.0,-14.0,0.0,205.0,-14.0,0.0,195.0,-14.0,0.0,185.0,-14.0,0.0,175.0,-14.0,0.0,164.0,-14.0})))
            .addChild(new ROUTE().setFromNode("Bottom").setFromField("touchTime").setToNode("OutClock").setToField("set_startTime"))
            .addChild(new ROUTE().setFromNode("OutClock").setFromField("fraction_changed").setToNode("LCAC_out").setToField("set_fraction"))
            .addChild(new ROUTE().setFromNode("LCAC_out").setFromField("value_changed").setToNode("LCAC").setToField("set_translation")))))));
            }
            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 Boxer 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 Boxer().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.ShipsMilitary.LargeDeckAmphibBoxerUnitedStates.Boxer\" 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.ShipsMilitary.LargeDeckAmphibBoxerUnitedStates.Boxer self-validation test confirmation: ");
                if (!validationResults.equals("success"))
                    System.out.println();
                System.out.println(validationResults.trim());

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