package Savage.ShipsMilitary.CruiserUnitedStates;

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.Navigation.*;
import org.web3d.x3d.jsail.Networking.*;
import org.web3d.x3d.jsail.Rendering.*;
import org.web3d.x3d.jsail.Shape.*;

// Javadoc metadata annotations follow, see below for X3DJSAIL Java source code.
/**
 * <p> Generic cruiser-class ship. </p>
 <p> Related links: Catalog page <a href="../../../../ShipsMilitary/CruiserUnitedStates/CruiserIndex.html" target="_blank">Cruiser</a>,  source <a href="../../../../ShipsMilitary/CruiserUnitedStates/Cruiser.java">Cruiser.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/CruiserUnitedStates/Cruiser.x3d">Cruiser.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> Ugur Demiryurek, Mike Hunsberger </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 11 September 2000 </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> description </i> </td>
			<td> Generic cruiser-class ship. </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/CruiserUnitedStates/Cruiser.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/CruiserUnitedStates/Cruiser.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="../../../../ShipsMilitary/CruiserUnitedStates/../../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 Ugur Demiryurek, Mike Hunsberger
 */

public class Cruiser
{
	/** Default constructor to create this object. */
	public Cruiser ()
	{
	  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_1)
  .setHead(new head()
    .addMeta(new meta().setName(meta.NAME_TITLE      ).setContent("Cruiser.x3d"))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("Ugur Demiryurek, Mike Hunsberger"))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("11 September 2000"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("20 October 2019"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("Generic cruiser-class ship."))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/CruiserUnitedStates/Cruiser.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()
    .addChild(new WorldInfo().setTitle("Cruiser.x3d"))
    .addChild(new Viewpoint("SideView").setDescription("Right Side View").setPosition(-5.0,15.0,150.0))
    .addChild(new Viewpoint().setDescription("Back View").setOrientation(0.0,1.0,0.0,-1.5).setPosition(-150.0,10.0,0.0))
    .addChild(new Viewpoint("FrontView").setDescription("Front View").setOrientation(0.0,-1.0,0.0,-1.5).setPosition(100.0,10.0,0.0))
    .addChild(new Viewpoint("TopView").setDescription("Top View").setOrientation(1.0,0.0,0.0,-1.1).setPosition(0.0,150.0,75.0))
    .addChild(new Viewpoint().setDescription("Left Side View").setOrientation(0.0,1.0,0.0,3.14).setPosition(-5.0,15.0,-120.0))
    .addChild(new Viewpoint().setDescription("Harpoon and Rear Gun").setPosition(-75.0,10.0,30.0))
    .addChild(new Viewpoint().setDescription("Front Gun").setPosition(60.0,12.0,15.0))
    .addChild(new Viewpoint().setDescription("Bridge Side View").setPosition(35.0,23.0,15.0))
    .addChild(new Viewpoint().setDescription("Large Antenna").setPosition(0.0,33.0,40.0))
    .addChild(new Background().setGroundColor(new MFColor(new double[] {0.0,0.0,0.0})).setSkyColor(new MFColor(new double[] {0.0,0.5,.5})))
    .addComments(" Scene nodes are added here ")
    .addChild(new Transform().setTranslation(1.13,1.0,1.0)
      .addChild(new Transform("CRUSIERMAINBODY")
        .addChild(new Shape("BelowWaterHull")
          .setAppearance(new Appearance("Black")
            .setMaterial(new Material().setDiffuseColor(.1,.1,.1)))
          .setGeometry(new Extrusion().setCreaseAngle(0.85).setCrossSection(new MFVec2f(new double[] {0.0,8.4,4.412,6.65,4.412,-6.65,0.0,-8.4,0.0,8.4})).setOrientation(new MFRotation(new double[] {0.0,0.0,1.0,.45,0.0,0.0,1.0,0.0,0.0,0.0,1.0,-.785})).setScale(new MFVec2f(new double[] {1.1,1.0,1.0,1.0,1.9,.02})).setSolid(false).setSpine(new MFVec3f(new double[] {-82.0,0.0,0.0,45.0,0.0,0.0,70.0,0.0,0.0}))))
        .addChild(new Shape("BottomHull")
          .setAppearance(new Appearance("HullGrey")
            .setMaterial(new Material().setDiffuseColor(.62,.639,.612)))
          .setGeometry(new Extrusion().setCreaseAngle(0.85).setCrossSection(new MFVec2f(new double[] {-2.206,9.65,0.0,8.4,0.0,-8.4,-2.206,-9.65,-2.206,9.65})).setOrientation(new MFRotation(new double[] {0.0,0.0,1.0,.45,0.0,0.0,1.0,0.0,0.0,0.0,1.0,-.785})).setScale(new MFVec2f(new double[] {1.1,1.0,1.0,1.0,1.9,.02})).setSolid(false).setSpine(new MFVec3f(new double[] {-82.0,0.0,0.0,45.0,0.0,0.0,70.0,0.0,0.0}))))
        .addChild(new Shape("CenterHull")
          .setAppearance(new Appearance().setUSE("HullGrey"))
          .setGeometry(new Extrusion().setCreaseAngle(0.7).setCrossSection(new MFVec2f(new double[] {-4.67,9.65,-2.206,9.65,-2.206,-9.65,-4.67,-9.65,-4.67,9.65})).setOrientation(new MFRotation(new double[] {0.0,0.0,1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0,-.785})).setScale(new MFVec2f(new double[] {1.0,1.0,1.0,1.0,1.9,.02})).setSolid(false).setSpine(new MFVec3f(new double[] {-83.0,0.0,0.0,45.0,0.0,0.0,70.0,0.0,0.0}))))
        .addChild(new Shape("UpperHullFwd")
          .setAppearance(new Appearance().setUSE("HullGrey"))
          .setGeometry(new Extrusion().setCreaseAngle(0.7).setCrossSection(new MFVec2f(new double[] {-7.0,9.65,-4.67,9.65,-4.67,-9.65,-7.0,-9.65,-7.0,9.65})).setOrientation(new MFRotation(new double[] {0.0,0.0,1.0,-.6,0.0,0.0,1.0,0.0,0.0,0.0,1.0,-.785})).setScale(new MFVec2f(new double[] {1.2,1.0,1.0,1.0,1.9,.02})).setSolid(false).setSpine(new MFVec3f(new double[] {40.0,0.0,0.0,45.0,0.0,0.0,70.0,0.0,0.0}))))
        .addChild(new Shape("MissileDeck")
          .setAppearance(new Appearance().setUSE("HullGrey"))
          .setGeometry(new Extrusion().setCreaseAngle(1.2).setCrossSection(new MFVec2f(new double[] {-55.5,-2.5,-55.5,2.5,-50.3,9.65,45.0,9.65,45.0,-9.65,-50.3,-9.65,-55.5,-2.5})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,2.0,0.0,0.0,6.9,0.0})))))
      .addChild(new Transform("FRONTGUN").setRotation(1.0,0.05,0.0,-1.57).setScale(0.7,0.7,0.7).setTranslation(55.0,9.4,1.5)
        .addChild(new Transform("FrontGunBody").setScale(0.5,0.5,0.7)
          .addChild(new Shape()
            .setAppearance(new Appearance().setUSE("HullGrey"))
            .setGeometry(new Extrusion().setCreaseAngle(1.5).setCrossSection(new MFVec2f(new double[] {-6.0,0.0,-5.9,0.7,-5.7,1.2,-5.3,1.7,-5.0,2.1,-4.0,2.2,-3.0,2.3,-2.0,2.40,2.5,1.0,2.6,2.0,2.653,2.25,4.0,1.75,16.0,0.0,7.0,-2.5,-5.5,-2.5,-6.0,0.0})).setSpine(new MFVec3f(new double[] {0.0,1.0,0.0,0.0,7.0,0.0})))))
        .addChild(new Transform("FrontGunFire").setRotation(-0.3,0.0,1.0,1.57).setTranslation(4.0,2.1,1.0)
          .addChild(new Shape()
            .setAppearance(new Appearance().setUSE("HullGrey"))
            .setGeometry(new Cylinder().setBottom(false).setHeight(10).setRadius(0.2).setTop(false))))
        .addChild(new Transform("FrontGunBottom1").setRotation(1.0,0.0,0.0,1.57).setTranslation(0.0,2.2,-2.2)
          .addChild(new Shape()
            .setAppearance(new Appearance().setUSE("HullGrey"))
            .setGeometry(new Cylinder().setHeight(0.25).setRadius(4))))
        .addChild(new Transform("FrontGunBottom2").setRotation(1.0,0.0,0.0,1.57).setTranslation(0.0,2.0,-2.0)
          .addChild(new Shape()
            .setAppearance(new Appearance().setUSE("HullGrey"))
            .setGeometry(new Cylinder().setHeight(0.5).setRadius(1.25)))))
      .addChild(new Transform("BACKGUN").setRotation(0.0,1.0,1.0,-3.1).setTranslation(-65.0,7.0,-1.8)
        .addChild(new Transform("BackGunBody").setScale(0.5,0.5,0.7)
          .addChild(new Shape("gun")
            .setAppearance(new Appearance().setUSE("HullGrey"))
            .setGeometry(new Extrusion().setCreaseAngle(1.5).setCrossSection(new MFVec2f(new double[] {-6.0,0.0,-5.9,0.7,-5.7,1.2,-5.3,1.7,-5.0,2.1,-4.0,2.2,-3.0,2.3,-2.0,2.40,2.5,1.0,2.6,2.0,2.653,2.25,4.0,1.75,16.0,0.0,7.0,-2.5,-5.5,-2.5,-6.0,0.0})).setSpine(new MFVec3f(new double[] {0.0,1.0,0.0,0.0,7.0,0.0})))))
        .addChild(new Transform("BackGunFirePipe").setRotation(-0.3,0.0,1.0,1.57).setTranslation(4.0,2.1,1.0)
          .addChild(new Shape()
            .setAppearance(new Appearance().setUSE("HullGrey"))
            .setGeometry(new Cylinder().setBottom(false).setHeight(10).setRadius(0.2).setTop(false))))
        .addChild(new Transform("BackGunBottom1").setRotation(1.0,0.0,0.0,1.57).setTranslation(0.0,2.2,-2.2)
          .addChild(new Shape()
            .setAppearance(new Appearance().setUSE("HullGrey"))
            .setGeometry(new Cylinder().setHeight(0.25).setRadius(4))))
        .addChild(new Transform("BackGunBottom2").setRotation(1.0,0.0,0.0,1.57).setTranslation(0.0,2.5,-2.0)
          .addChild(new Shape()
            .setAppearance(new Appearance().setUSE("HullGrey"))
            .setGeometry(new Cylinder().setHeight(0.5).setRadius(1.25)))))
      .addChild(new Transform("HARPOON").setScale(1.3,1.3,1.3).setTranslation(-77.5,7.9,-6.2)
        .addChild(new Transform("HarpoonBunch1").setTranslation(0.0,0.1,0.0)
          .addChild(new Group("HarpoonBunch")
            .addChild(new Transform().setTranslation(0.0,-0.245,0.0)
              .addChild(new Group("Harpoon")
                .addChild(new Transform().setRotation(1.0,0.0,0.0,-0.5)
                  .addChild(new Shape("HarpoonWithHolders")
                    .setAppearance(new Appearance().setUSE("HullGrey"))
                    .setGeometry(new Cylinder().setHeight(5).setRadius(0.25)))
                  .addChild(new Transform("HarpoonDownHolder").setTranslation(0.0,-1.5,0.0)
                    .addChild(new Shape()
                      .setAppearance(new Appearance()
                        .setMaterial(new Material()))
                      .setGeometry(new Box().setSize(0.5,0.2,0.5))))
                  .addChild(new Transform("HarpoonTopHolder").setTranslation(0.0,1.5,0.0)
                    .addChild(new Shape()
                      .setAppearance(new Appearance()
                        .setMaterial(new Material()))
                      .setGeometry(new Box().setSize(0.5,0.2,0.5)))))))
            .addChild(new Transform().setTranslation(0.5,-0.245,0.0)
              .addChild(new Group().setUSE("Harpoon")))
            .addChild(new Transform().setTranslation(0.0,0.0,0.5)
              .addChild(new Group().setUSE("Harpoon")))
            .addChild(new Transform().setTranslation(0.5,0.0,0.5)
              .addChild(new Group().setUSE("Harpoon")))
            .addChild(new Transform().setRotation(1.0,0.0,0.0,-0.5).setTranslation(0.25,-0.45,-0.26)
              .addChild(new Shape()
                .setAppearance(new Appearance().setUSE("HullGrey"))
                .setGeometry(new Box().setSize(1.05,5.0,0.1))))))
        .addChild(new Transform("HarpoonBunch2").setRotation(1.0,0.0,0.0,-1.7).setTranslation(-1.1,-0.77,0.7)
          .addChild(new Group().setUSE("HarpoonBunch")))
        .addChild(new Transform("HarpoonSupport1").setTranslation(-0.85,-2.25,0.5)
          .addChild(new Shape()
            .setAppearance(new Appearance().setUSE("HullGrey"))
            .setGeometry(new Box().setSize(1.0,1.5,0.1))))
        .addChild(new Transform("HarpoonSupport2").setTranslation(0.225,-1.85,0.0)
          .addChild(new Shape()
            .setAppearance(new Appearance().setUSE("HullGrey"))
            .setGeometry(new Box().setSize(1.0,1.5,0.1)))))
      .addChild(new Transform("Cruiser_Superstructure").setScale(1.0,0.78,0.8).setTranslation(4.0,-2.5,0.0)
        .addChild(new Group("Rear-Superstructure-grouping")
          .addChild(new Transform("Rear-Superstructure").setTranslation(-55.0,10.0,0.0)
            .addChild(new Transform().setTranslation(6.0,0.0,0.0)
              .addChild(new Shape("FlightDeckStructure")
                .setAppearance(new Appearance().setUSE("HullGrey"))
                .setGeometry(new Extrusion().setCcw(false).setCreaseAngle(.7).setCrossSection(new MFVec2f(new double[] {0.0,-5.5,2.5,-7.25,22.0,-7.25,22.0,7.25,2.5,7.25,0.0,5.5,0.0,-5.5})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,4.0,0.0})))))
            .addChild(new Shape("RightSideFlightDeck")
              .setAppearance(new Appearance().setUSE("HullGrey"))
              .setGeometry(new Extrusion().setCcw(false).setCreaseAngle(.7).setCrossSection(new MFVec2f(new double[] {20.0,7.25,21.0,9.65,44.5,9.65,44.5,7.25,20.0,7.25})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,4.0,0.0}))))
            .addChild(new Shape("LeftSideFlightDeck")
              .setAppearance(new Appearance().setUSE("HullGrey"))
              .setGeometry(new Extrusion().setCcw(false).setCreaseAngle(.7).setCrossSection(new MFVec2f(new double[] {20.0,-7.25,21.0,-9.65,44.5,-9.65,44.5,-7.25,20.0,-7.25})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,4.0,0.0}))))
            .addChild(new Shape("RearStructure1")
              .setAppearance(new Appearance().setUSE("HullGrey"))
              .setGeometry(new Extrusion().setCcw(false).setCreaseAngle(.7).setCrossSection(new MFVec2f(new double[] {28.0,-7.25,44.5,-7.25,44.5,7.25,28.0,7.25,28.0,-7.25})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,13.5,0.0}))))
            .addChild(new Shape("RearStructure1-Top1")
              .setAppearance(new Appearance().setUSE("HullGrey"))
              .setGeometry(new Extrusion().setCcw(false).setCreaseAngle(.7).setCrossSection(new MFVec2f(new double[] {28.0,2.0,35.0,2.0,35.0,7.25,28.0,7.25,28.0,2.0})).setSpine(new MFVec3f(new double[] {0.0,13.5,0.0,0.0,18.5,0.0}))))
            .addChild(new Shape("RearStructureTop2")
              .setAppearance(new Appearance().setUSE("HullGrey"))
              .setGeometry(new Extrusion().setCcw(false).setCreaseAngle(.7).setCrossSection(new MFVec2f(new double[] {35.0,3.0,44.5,3.0,44.5,7.25,35.0,7.25,35.0,3.0})).setSpine(new MFVec3f(new double[] {0.0,13.5,0.0,0.0,20.5,0.0}))))
            .addChild(new Transform("Stack1-Rear-LargeStructure").setTranslation(38.0,23.0,5.0)
              .addChild(new Shape("Stack1")
                .setAppearance(new Appearance().setUSE("HullGrey"))
                .setGeometry(new Cylinder().setHeight(5).setRadius(2).setTop(false)))
              .addChild(new Shape("InnerStack")
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.0,0.0,0.0)))
                .setGeometry(new Cylinder().setHeight(4.9).setRadius(1.9))))
            .addChild(new Transform("Stack2-Rear-LargeStructure").setTranslation(42.0,23.0,5.0)
              .addChild(new Shape().setUSE("Stack1"))
              .addChild(new Shape().setUSE("InnerStack")))
            .addChild(new Transform("Rear-Large-Structure-Top")
              .addChild(new Shape()
                .setAppearance(new Appearance().setUSE("HullGrey"))
                .setGeometry(new IndexedFaceSet().setCcw(false).setSolid(false).setCoordIndex(new int[] {4,5,67,-1,0,1,2,3,-1,0,1,5,4,-1,1,2,6,5,-1,2,3,7,6,-1,0,4,7,3})
                  .addComments(" top, bottom, front, left, back, right ")
                  .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {28.0,13.5,2.0,28.0,13.5,-7.25,44.5,13.5,-7.25,44.5,13.5,2.0,28.0,23.5,2.0,28.0,23.5,-5.25,44.5,23.5,-5.25,44.5,23.5,2.0}))))))))
        .addChild(new Group("Front-Superstructure-Grouping")
          .addChild(new Transform("Front-Superstructure").setTranslation(4.0,10.0,0.0)
            .addChild(new Transform("Front-Super-RearBox").setTranslation(12.0,4.5,0.0)
              .addChild(new Shape()
                .setAppearance(new Appearance().setUSE("HullGrey"))
                .setGeometry(new Box().setSize(24.0,9.0,12.0))))
            .addChild(new Transform("Front-Super-RearBox-upper").setTranslation(12.0,11.0,0.0)
              .addChild(new Shape("LargeStructureTop1")
                .setAppearance(new Appearance().setUSE("HullGrey"))
                .setGeometry(new Box().setSize(24.0,4.0,8.0))))
            .addChild(new Transform("Front-Super-RearBox-small-upper").setTranslation(12.0,16.0,0.0)
              .addChild(new Shape()
                .setAppearance(new Appearance().setUSE("HullGrey"))
                .setGeometry(new Box().setSize(12.0,6.0,6.0))))
            .addChild(new Transform("Front-Super-Stack").setTranslation(10.5,21.0,0.0)
              .addChild(new Shape("Front-Super-Stack1")
                .setAppearance(new Appearance().setUSE("HullGrey"))
                .setGeometry(new Cylinder().setHeight(5).setRadius(2).setTop(false)))
              .addChild(new Shape("Front-InnerStack")
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.0,0.0,0.0)))
                .setGeometry(new Cylinder().setHeight(4.9).setRadius(1.9))))
            .addChild(new Transform("Front-Super-Stack2").setTranslation(15.0,21.0,0.0)
              .addChild(new Shape().setUSE("Front-Super-Stack1"))
              .addChild(new Shape().setUSE("Front-InnerStack")))
            .addChild(new Transform("Front-Super-FrontBox").setTranslation(30.0,4.0,0.0)
              .addChild(new Shape()
                .setAppearance(new Appearance().setUSE("HullGrey"))
                .setGeometry(new Box().setSize(12.0,8.0,12.0))))
            .addChild(new Transform("Front-Super-FrontBox-Top")
              .addChild(new Shape()
                .setAppearance(new Appearance().setUSE("HullGrey"))
                .setGeometry(new IndexedFaceSet().setCcw(false).setSolid(false).setCoordIndex(new int[] {4,5,6,7,-1,0,1,2,3,-1,0,1,5,4,-1,1,2,6,5,-1,2,3,7,6,-1,0,4,7,3})
                  .addComments(" top, bottom, front, left, back, right ")
                  .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {24.0,8.0,6.0,24.0,8.0,-6.0,36.0,8.0,-6.0,36.0,8.0,6.0,24.0,13.5,5.0,24.0,13.5,-5.0,34.0,13.5,-5.0,34.0,13.5,5.0}))))))
            .addChild(new Transform("Front-Super-Bridge").setTranslation(28.0,14.0,0.0)
              .addChild(new Transform("Front-Super-Bridge-Lower").setTranslation(0.0,.25,0.0)
                .addChild(new Shape()
                  .setAppearance(new Appearance().setUSE("HullGrey"))
                  .setGeometry(new Box().setSize(8.0,1.5,6.0))))
              .addChild(new Transform("Front-Super-Bridge-Windows").setTranslation(0.0,1.75,0.0)
                .addChild(new Shape()
                  .setAppearance(new Appearance()
                    .setMaterial(new Material().setTransparency(.6)))
                  .setGeometry(new Box().setSize(8.0,1.5,6.0))))
              .addChild(new Transform("Front-Super-Bridge-Roof").setTranslation(0.0,2.5,0.0)
                .addChild(new Shape()
                  .setAppearance(new Appearance().setUSE("HullGrey"))
                  .setGeometry(new Box().setSize(8.0,.1,6.0))))
              .addChild(new Transform("Front-Super-Bridge-Back").setTranslation(-4.0,1.0,0.0)
                .addChild(new Shape()
                  .setAppearance(new Appearance().setUSE("HullGrey"))
                  .setGeometry(new Box().setSize(.1,3.0,6.0)))))
            .addChild(new Transform("Front-Super-antenna").setScale(1.0,1.2,1.0).setTranslation(21.0,13.0,0.0)
              .addChild(new Inline("AntennaMast").setUrl(new String[] {"../DestroyerSovremennyRussia/AntennaMast.x3d","https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/DestroyerSovremennyRussia/AntennaMast.x3d","../DestroyerSovremennyRussia/AntennaMast.wrl","https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/DestroyerSovremennyRussia/AntennaMast.wrl"})))))
        .addChild(new Group("Mid-Superstructure-Grouping")
          .addChild(new Transform("Mid-Super-Box").setTranslation(-3.0,10.5,0.0)
            .addChild(new Transform().setTranslation(0.0,6.0,0.0)
              .addChild(new Shape()
                .setAppearance(new Appearance().setUSE("HullGrey"))
                .setGeometry(new Box().setSize(15.0,13.0,8.0)))))
          .addChild(new Transform("Mid-Super-antenna").setScale(1.3,1.8,1.3).setTranslation(0.0,23.0,0.0)
            .addChild(new Inline().setUSE("AntennaMast")))))));
            }
            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 Cruiser 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 Cruiser().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.CruiserUnitedStates.Cruiser\" 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.CruiserUnitedStates.Cruiser self-validation test confirmation: ");
                if (!validationResults.equals("success"))
                    System.out.println();
                System.out.println(validationResults.trim());

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