package Savage.AircraftFixedWing.Mv22OspreyUnitedStates;

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.Shape.*;
import org.web3d.x3d.jsail.Sound.*;
import org.web3d.x3d.jsail.Text.*;

// Javadoc metadata annotations follow, see below for X3DJSAIL Java source code.
/**
 * <p> Osprey MV-22 medium-lift tiltrotor Very Short Take-Off and Landing (VSTOL) aircraft. </p>
 <p> Related links: Catalog page <a href="../../../../AircraftFixedWing/Mv22OspreyUnitedStates/OspreyIndex.html" target="_blank">Osprey</a>,  source <a href="../../../../AircraftFixedWing/Mv22OspreyUnitedStates/Osprey.java">Osprey.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="../../../../AircraftFixedWing/Mv22OspreyUnitedStates/Osprey.x3d">Osprey.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> description </i> </td>
			<td> Osprey MV-22 medium-lift tiltrotor Very Short Take-Off and Landing (VSTOL) aircraft. </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> Major William C. James USMC </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 23 September 2001 </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> reference </i> </td>
			<td> Amended from VRML Sourcebook Figure 8.4 (used as base) </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://www.navy.mil/Resources/Fact-Files/Display-FactFiles/Article/2417719/v-22b-osprey-tilt-rotor-aircraft" target="_blank">https://www.navy.mil/Resources/Fact-Files/Display-FactFiles/Article/2417719/v-22b-osprey-tilt-rotor-aircraft</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://www.fas.org/man/dod-101/sys/ac/v-22.htm" target="_blank">https://www.fas.org/man/dod-101/sys/ac/v-22.htm</a> </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/AircraftFixedWing/Mv22OspreyUnitedStates/Osprey.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/Osprey.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="../../../../AircraftFixedWing/Mv22OspreyUnitedStates/../../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 Major William C. James USMC
 */

public class Osprey
{
	/** Default constructor to create this object. */
	public Osprey ()
	{
	  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("Osprey.x3d"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("Osprey MV-22 medium-lift tiltrotor Very Short Take-Off and Landing (VSTOL) aircraft."))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("Major William C. James USMC"))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("23 September 2001"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("20 October 2019"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("Amended from VRML Sourcebook Figure 8.4 (used as base)"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.navy.mil/Resources/Fact-Files/Display-FactFiles/Article/2417719/v-22b-osprey-tilt-rotor-aircraft"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.fas.org/man/dod-101/sys/ac/v-22.htm"))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/Osprey.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(" JPGs_background_from_MV4204_source_file ")
    .addChild(new WorldInfo().setTitle("Osprey.x3d"))
    .addChild(new Background().setGroundAngle(new double[] {0.1,1.309,1.570796}).setGroundColor(new MFColor(new double[] {0.0,0.0,0.0,0.0,0.1,0.3,0.0,0.2,0.5,0.0,0.3,0.8})).setSkyAngle(new double[] {0.1,0.15,1.309,1.57079}).setSkyColor(new MFColor(new double[] {0.4,0.4,0.1,0.4,0.4,0.1,0.0,0.1,0.3,0.0,0.2,0.6,0.8,0.8,0.8})).setBackUrl(new String[] {"urn:web3d:media:textures/panoramas/ocean_3_back.jpg","../../../Basic/UniversalMediaPanoramas/ocean_3_back.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_3_back.jpg","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaPanoramas/ocean_3_back.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_3_back.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_3_back.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_3_back.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_3_back.jpg"}).setBottomUrl(new String[] {"urn:web3d:media:textures/panoramas/ocean_3_bottom.jpg","../../../Basic/UniversalMediaPanoramas/ocean_3_bottom.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_3_bottom.jpg","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaPanoramas/ocean_3_bottom.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_3_bottom.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_3_bottom.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_3_bottom.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_3_bottom.jpg"}).setFrontUrl(new String[] {"urn:web3d:media:textures/panoramas/ocean_3_front.jpg","../../../Basic/UniversalMediaPanoramas/ocean_3_front.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_3_front.jpg","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaPanoramas/ocean_3_front.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_3_front.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_3_front.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_3_front.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_3_front.jpg"}).setLeftUrl(new String[] {"urn:web3d:media:textures/panoramas/ocean_3_left.jpg","../../../Basic/UniversalMediaPanoramas/ocean_3_left.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_3_left.jpg","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaPanoramas/ocean_3_left.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_3_left.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_3_left.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_3_left.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_3_left.jpg"}).setRightUrl(new String[] {"urn:web3d:media:textures/panoramas/ocean_3_right.jpg","../../../Basic/UniversalMediaPanoramas/ocean_3_right.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_3_right.jpg","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaPanoramas/ocean_3_right.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_3_right.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_3_right.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_3_right.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_3_right.jpg"}).setTopUrl(new String[] {"urn:web3d:media:textures/panoramas/ocean_3_top.jpg","../../../Basic/UniversalMediaPanoramas/ocean_3_top.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_3_top.jpg","https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaPanoramas/ocean_3_top.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_3_top.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_3_top.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_3_top.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_3_top.jpg"}))
    .addComments(" Viewpoint_choices ")
    .addChild(new Viewpoint().setDescription("MV-22 Osprey tiltrotor").setPosition(0.0,0.0,30.0))
    .addChild(new Viewpoint().setDescription("Front, angle down").setOrientation(1.0,0.0,0.0,-0.78).setPosition(0.0,30.0,30.0))
    .addChild(new Viewpoint().setDescription("Right wing, level").setOrientation(0.0,1.0,0.0,1.57).setPosition(30.0,0.0,0.0))
    .addChild(new Viewpoint().setDescription("Rear, level").setOrientation(0.0,1.0,0.0,3.14).setPosition(0.0,0.0,-30.0))
    .addChild(new Viewpoint().setDescription("Left wing, level").setOrientation(0.0,1.0,0.0,-1.57).setPosition(-30.0,0.0,0.0))
    .addChild(new Viewpoint().setDescription("Bottom, up").setOrientation(1.0,0.0,0.0,1.57).setPosition(0.0,-30.0,0.0))
    .addChild(new Viewpoint().setDescription("Top, down").setOrientation(1.0,0.0,0.0,-1.57).setPosition(0.0,30.0,0.0))
    .addComments(" Rotor_Sound ")
    .addChild(new Sound().setDirection(0.7,0.7,1.0).setLocation(0.0,1.6,0.0).setMaxBack(30).setMaxFront(40).setMinBack(10).setMinFront(5)
      .setSource(new AudioClip("HELO_FLYING_AUDIO_CLIP").setDescription("helicopter sound").setLoop(true).setUrl(new String[] {"Hughes500HoverInteriorMedium-cd21-no59-10sec.wav","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/Hughes500HoverInteriorMedium-cd21-no59-10sec.wav"})))
    .addComments(" Inline_Plane_Wing_System ")
    .addChild(new Transform().setTranslation(0.0,-0.1,0.0)
      .addChild(new Inline().setUrl(new String[] {"Wings.x3d","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/Wings.x3d","Wings.wrl","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/Wings.wrl"})))
    .addComments(" Aircraft body ")
    .addChild(new Transform().setScale(1.0,1.0,1.2).setTranslation(0.0,-.75,1.0)
      .addChild(new Shape("Upper_Carraige")
        .setGeometry(new Extrusion().setCreaseAngle(3.14).setCrossSection(new MFVec2f(new double[] {0.0,0.0,2.0,0.0,2.0,1.0,-2.0,1.0,-2.0,0.0,0.0,0.0})).setScale(new MFVec2f(new double[] {1.0,0.01,1.0,1.0,1.0,1.0,1.0,.2})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,0.0,2.0,0.0,0.0,-0.5,0.0,0.0,-3.5,0.0,0.0,-13.0})))
        .setAppearance(new Appearance()
          .setMaterial(new Material("Upper_Carriage_Mat").setDiffuseColor(.5,.5,.5).setShininess(.5))))
      .addComments(" Inline_Fuseluge_Windows ")
      .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57).setScale(.6,.7,.7).setTranslation(1.95,-1.1,0.3)
        .addChild(new Inline("Windows").setUrl(new String[] {"Windows.x3d","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/Windows.x3d","Windows.wrl","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/Windows.wrl"})))
      .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57).setScale(.6,.7,.7).setTranslation(1.95,-1.1,-5.0)
        .addChild(new Inline().setUSE("Windows")))
      .addChild(new Transform().setRotation(0.0,1.0,0.0,-1.57).setScale(.6,.7,.7).setTranslation(-1.95,-1.1,-5.0)
        .addChild(new Inline().setUSE("Windows")))
      .addComments(" Inline_Fuseluge_Door ")
      .addChild(new Transform().setRotation(0.0,1.0,0.0,-1.57).setScale(.8,1.8,.7).setTranslation(-1.95,-2.0,1.7)
        .addChild(new Inline().setUrl(new String[] {"Door.wrl","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/Door.wrl","Door.x3d","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/Door.x3d"})))
      .addChild(new Shape("Lower_Carriage")
        .setGeometry(new Extrusion("Osprey_Body").setCreaseAngle(1.6).setCrossSection(new MFVec2f(new double[] {0.0,0.0,2.0,0.0,2.0,-4.0,-2.0,-4.0,-2.0,0.0,0.0,0.0})).setScale(new MFVec2f(new double[] {1.0,1.0,1.0,1.0,1.0,0.01})).setSpine(new MFVec3f(new double[] {0.0,0.0,3.5,0.0,0.0,-6.9,0.0,0.0,-14.5})))
        .setAppearance(new Appearance()
          .setMaterial(new Material("Lower_Carriage_Mat").setDiffuseColor(.5,.5,.5).setShininess(.5))))
      .addComments(" Marine Banners ")
      .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57).setScale(.5,.5,.5).setTranslation(2.02,-0.45,-11.0)
        .addChild(new Shape()
          .setGeometry(new Text().setString(new String[] {"MARINES"})
            .setFontStyle(new FontStyle("FS").setFamily(new String[] {"SANS"}).setJustify(FontStyle.JUSTIFY_BEGIN_MIDDLE).setSize(1.3).setCssStyle("BOLD")))
          .setAppearance(new Appearance()
            .setMaterial(new Material().setDiffuseColor(0.0,0.0,0.0)))))
      .addChild(new Transform().setRotation(0.0,1.0,0.0,-1.57).setScale(.5,.5,.5).setTranslation(-2.02,-0.45,-13.5)
        .addChild(new Shape()
          .setGeometry(new Text().setString(new String[] {"MARINES"})
            .setFontStyle(new FontStyle().setUSE("FS")))
          .setAppearance(new Appearance()
            .setMaterial(new Material().setDiffuseColor(0.0,0.0,0.0)))))
      .addChild(new Transform("Far_Under_Carraige").setScale(1.7,1.0,1.5).setTranslation(0.0,-2.1,1.6)
        .addChild(new Shape()
          .setGeometry(new Extrusion().setCreaseAngle(3.14).setCrossSection(new MFVec2f(new double[] {1.0,-1.0,1.0,-.25,.99,-.22,.98,-.19,.97,-.16,.96,-.13,.95,-.1,.94,-.09,.93,-.08,.92,-.07,.91,-.06,.9,-.05,.87,-.04,.84,-.03,.81,-.02,.78,-.01,.75,0.0,-.75,0.0,-.78,-.01,-.81,-.02,-.84,-.03,-.87,-.04,-.9,-.05,-.91,-.06,-.92,-.07,-.93,-.08,-.94,-.09,-.95,-.1,-.96,-.13,-.97,-.16,-.98,-.19,-.99,-.22,-1.0,-.25,-1.0,-1.75,-.99,-1.78,-.98,-1.81,-.97,-1.84,-.96,-1.87,-.95,-1.9,-.94,-1.91,-.93,-1.92,-.92,-1.93,-.91,-1.94,-.9,-1.95,-.87,-1.96,-.84,-1.97,-.81,-1.98,-.78,-1.99,-.75,-2.0,.75,-2.0,.78,-1.99,.81,-1.98,.84,-1.97,.87,-1.96,.9,-1.95,.91,-1.94,.92,-1.93,.93,-1.92,.94,-1.91,.95,-1.9,.96,-1.87,.97,-1.84,.98,-1.81,.99,-1.78,1.0,-1.75,1.0,-1.0})).setScale(new MFVec2f(new double[] {0.01,.8,.6,.85,1.1,.9,1.5,.95,1.8,1.0,2.0,1.0,2.0,1.0,2.0,1.0,1.9,1.0,1.8,.8,1.6,.6,1.3,.4,1.0,.3,.8,.2,.4,.1,0.01,0.01})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.0,-.2,0.0,0.0,-.4,0.0,0.0,-.7,0.0,0.0,-1.0,0.0,0.0,-1.3,0.0,0.0,-4.0,0.0,0.0,-5.0,0.0,0.0,-5.5,0.0,0.0,-6.0,0.0,0.0,-6.5,0.0,0.0,-7.0,0.0,0.0,-7.2,0.0,0.0,-7.4,0.0,0.0,-7.6,0.0,0.0,-7.7})))
          .setAppearance(new Appearance()
            .setMaterial(new Material("body2").setDiffuseColor(.5,.5,.5).setShininess(.5)))))
      .addChild(new Transform("Upper_Carriage_Rear").setTranslation(0.0,0.0,-13.0)
        .addChild(new Shape("Upper_Carraige_Rear")
          .setGeometry(new Extrusion().setCreaseAngle(3.14).setCrossSection(new MFVec2f(new double[] {0.0,0.0,2.0,0.0,2.0,1.0,-2.0,1.0,-2.0,0.0,0.0,0.0})).setScale(new MFVec2f(new double[] {1.0,.2,1.0,.5})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.0,-1.5})))
          .setAppearance(new Appearance()
            .setMaterial(new Material("Upper_Carriage_Mat_Rear").setDiffuseColor(.5,.5,.5).setShininess(.5)))))
      .addChild(new Transform("Osprey_CockPit").setTranslation(0.0,-3.2,3.5)
        .addChild(new Shape()
          .setGeometry(new Extrusion("Cockpit").setCreaseAngle(1.6).setCrossSection(new MFVec2f(new double[] {0.0,.8,2.0,.8,2.0,-3.2,-2.0,-3.2,-2.0,.8,0.0,.8})).setScale(new MFVec2f(new double[] {1.0,1.0,.7,.65,.65,.6,.6,.5,.5,.4,.3,.3,0.01,0.01})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.0,1.5,0.0,0.0,1.7,0.0,0.0,1.9,0.0,0.0,2.1,0.0,0.0,2.3,0.0,0.0,2.4})))
          .setAppearance(new Appearance()
            .setMaterial(new Material().setDiffuseColor(.5,.5,.5).setShininess(.5)))))
      .addChild(new Transform("Osprey_CockPit_Nose").setRotation(1.0,0.0,0.0,-.05).setScale(1.4,1.0,1.5).setTranslation(0.0,-2.5,5.3)
        .addChild(new Shape()
          .setGeometry(new Sphere())
          .setAppearance(new Appearance()
            .setMaterial(new Material().setDiffuseColor(.5,.5,.5).setShininess(.5)))))
      .addComments(" Inline_Refueling_Boom ")
      .addChild(new Transform().setTranslation(-1.2,-2.7,7.0)
        .addChild(new Inline().setUrl(new String[] {"RefuelingBoom.x3d","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/RefuelingBoom.x3d","RefuelingBoom.wrl","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/RefuelingBoom.wrl"})))
      .addComments(" Inline_Cockpit_Windows ")
      .addChild(new Transform().setScale(.9,1.0,1.0).setTranslation(0.0,0.0,3.6)
        .addChild(new Inline().setUrl(new String[] {"CockpitWindows.x3d","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/CockpitWindows.x3d","CockpitWindows.wrl","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/CockpitWindows.wrl"}))))
    .addComments(" Inline_Plane_Tail ")
    .addChild(new Transform("AircraftTail").setTranslation(0.0,-0.5,-16.4)
      .addChild(new Inline().setUrl(new String[] {"TailSection.x3d","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/TailSection.x3d","TailSection.wrl","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/TailSection.wrl"})))
    .addComments(" Inline_Landing_Gear ")
    .addChild(new Transform()
      .addChild(new Inline().setUrl(new String[] {"LandingGear.x3d","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/LandingGear.x3d","LandingGear.wrl","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/LandingGear.wrl"})))
    .addComments(" Inline_Rear_Hatch ")
    .addChild(new Transform().setRotation(1.0,0.0,0.0,-0.045)
      .addChild(new Transform().setTranslation(0.0,0.72,-2.3)
        .addChild(new Inline().setUrl(new String[] {"RearHatch.x3d","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/RearHatch.x3d","RearHatch.wrl","https://www.web3d.org/x3d/content/examples/Savage/AircraftFixedWing/Mv22OspreyUnitedStates/RearHatch.wrl"}))))
    .addComments(" Inline_Coordinate_Scale ")
    .addChild(new Transform().setScale(.1,.1,.2)
      .addChild(new Inline("CoordinateAxes").setUrl(new String[] {"../../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d","https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.x3d","../../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl","https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.wrl"}))));
            }
            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 Osprey 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 Osprey().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.AircraftFixedWing.Mv22OspreyUnitedStates.Osprey\" 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.AircraftFixedWing.Mv22OspreyUnitedStates.Osprey self-validation test confirmation: ");
                if (!validationResults.equals("success"))
                    System.out.println();
                System.out.println(validationResults.trim());

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