package Savage.AircraftHelicopters.AH1SuperCobraUnitedStates;

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

// Javadoc metadata annotations follow, see below for X3DJSAIL Java source code.
/**
 * <p> Defines a prototype of Supercobra AH-1Z helicopter. </p>
 <p> Related links: Catalog page <a href="../../../../AircraftHelicopters/AH1SuperCobraUnitedStates/SuperCobraPrototypeIndex.html" target="_blank">SuperCobraPrototype</a>,  source <a href="../../../../AircraftHelicopters/AH1SuperCobraUnitedStates/SuperCobraPrototype.java">SuperCobraPrototype.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="../../../../AircraftHelicopters/AH1SuperCobraUnitedStates/SuperCobraPrototype.x3d">SuperCobraPrototype.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> description </i> </td>
			<td> Defines a prototype of Supercobra AH-1Z helicopter. </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> Jane Wu </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> Don Brutzman </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 16 January 2001 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> modified </i> </td>
			<td> 1 December 2024 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> TODO </i> </td>
			<td> fix model rotations </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> info </i> </td>
			<td> Avoided recursive loading of SuperCobraPrototype.x3d model by placing the prototype in a separate file, rather than cirular referencing. Problem detected using castle-model-viewer. </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/AircraftHelicopters/AH1SuperCobraUnitedStates/Hughes500HoverInteriorMedium-cd21-no59-10sec.wav" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/Hughes500HoverInteriorMedium-cd21-no59-10sec.wav</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/AircraftHelicopters/AH1SuperCobraUnitedStates/FourBladeMainRotorPrototype.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/FourBladeMainRotorPrototype.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/AircraftHelicopters/AH1SuperCobraUnitedStates/RocketPod.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/RocketPod.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/AircraftHelicopters/AH1SuperCobraUnitedStates/SkidLeft.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SkidLeft.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/AircraftHelicopters/AH1SuperCobraUnitedStates/SkidRight.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SkidRight.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/AircraftHelicopters/AH1SuperCobraUnitedStates/TwoBladeTailRotorPrototype.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/TwoBladeTailRotorPrototype.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://www.fas.org/man/dod-101/sys/ac/ah-1.htm" target="_blank">https://www.fas.org/man/dod-101/sys/ac/ah-1.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/AircraftHelicopters/AH1SuperCobraUnitedStates/SuperCobraPrototype.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SuperCobraPrototype.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> generator </i> </td>
			<td> X3D-Edit 4.0, <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="../../../../AircraftHelicopters/AH1SuperCobraUnitedStates/../../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 Jane Wu
	* @author Don Brutzman
 */

public class SuperCobraPrototype
{
	/** Default constructor to create this object. */
	public SuperCobraPrototype ()
	{
	  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_3)
  .setHead(new head()
    .addMeta(new meta().setName(meta.NAME_TITLE      ).setContent("SuperCobraPrototype.x3d"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("Defines a prototype of Supercobra AH-1Z helicopter."))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("Jane Wu"))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("Don Brutzman"))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("16 January 2001"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("1 December 2024"))
    .addMeta(new meta().setName(meta.NAME_TODO       ).setContent("fix model rotations"))
    .addMeta(new meta().setName(meta.NAME_INFO       ).setContent("Avoided recursive loading of SuperCobraPrototype.x3d model by placing the prototype in a separate file, rather than cirular referencing. Problem detected using castle-model-viewer."))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/Hughes500HoverInteriorMedium-cd21-no59-10sec.wav"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/FourBladeMainRotorPrototype.x3d"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/RocketPod.x3d"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SkidLeft.x3d"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SkidRight.x3d"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/TwoBladeTailRotorPrototype.x3d"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.fas.org/man/dod-101/sys/ac/ah-1.htm"))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SuperCobraPrototype.x3d"))
    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit"))
    .addMeta(new meta().setName(meta.NAME_LICENSE    ).setContent("../../license.html")))
  .setScene(new Scene()
    .addChild(new ExternProtoDeclare("FourBladeMainRotor").setName("FourBladeMainRotor").setUrl(new String[] {"FourBladeMainRotorPrototype.x3d#FourBladeMainRotor","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/FourBladeMainRotorPrototype.x3d#FourBladeMainRotor","FourBladeMainRotorPrototype.wrl#FourBladeMainRotor","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/FourBladeMainRotorPrototype.wrl#FourBladeMainRotor"})
      .addField(new field().setName("rotationOn").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY).setAppinfo("enable or disable rotor rotation")))
    .addChild(new ExternProtoDeclare("TwoBladeTailRotor").setName("TwoBladeTailRotor").setUrl(new String[] {"TwoBladeTailRotorPrototype.x3d#TwoBladeTailRotor","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/TwoBladeTailRotorPrototype.x3d#TwoBladeTailRotor","TwoBladeTailRotorPrototype.wrl#TwoBladeTailRotor","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/TwoBladeTailRotorPrototype.wrl#TwoBladeTailRotor"})
      .addField(new field().setName("rotationOn").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY)))
    .addChild(new ProtoDeclare("SuperCobra").setName("SuperCobra").setAppinfo("Prototype declaration for SuperCobra helicopter")
      .setProtoInterface(new ProtoInterface()
        .addField(new field().setName("tailBoomColor").setType(field.TYPE_SFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("color of tail boom")
          .addComments(" initialization node (if any) goes here "))
        .addField(new field().setName("tailRotorDriveShaftColor").setType(field.TYPE_SFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("color of tail boom drive shaft")
          .addComments(" initialization node (if any) goes here "))
        .addField(new field().setName("horizontalStabilizerColor").setType(field.TYPE_SFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("color of horizontal stabilizer")
          .addComments(" initialization node (if any) goes here "))
        .addField(new field().setName("fuselageColor").setType(field.TYPE_SFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("color of fuselage")
          .addComments(" initialization node (if any) goes here "))
        .addField(new field().setName("cockpitColor").setType(field.TYPE_SFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("color of cockpit")
          .addComments(" initialization node (if any) goes here "))
        .addField(new field().setName("cowlingColor").setType(field.TYPE_SFNODE).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setAppinfo("color of cowling")
          .addComments(" initialization node (if any) goes here "))
        .addField(new field().setName("helicopterName").setType(field.TYPE_SFSTRING).setAccessType(field.ACCESSTYPE_INITIALIZEONLY).setValue("Super Cobra").setAppinfo("name of specific helicopter"))
        .addField(new field().setName("inFlight").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY).setAppinfo("input event indicating that the aircraft is in flight")))
      .setProtoBody(new ProtoBody()
        .addChild(new Group()
          .addChild(new WorldInfo("HeloWorldInfo")
            .setIS(new IS()
              .addConnect(new connect().setNodeField("title").setProtoField("helicopterName"))))
          .addChild(new Viewpoint("HeloNameViewpoint").setDescription("helicopter name overridden by protodeclare field").setOrientation(0.0,1.0,0.0,-1.57).setPosition(-20.0,2.0,0.0)
            .setIS(new IS()
              .addConnect(new connect().setNodeField("description").setProtoField("helicopterName"))))
          .addChild(new LOD().setRange(new double[] {400.0})
            .addChild(new Group("DetailViewpoint")
              .addChild(new Viewpoint().setDescription("SuperCobra Right").setPosition(0.0,2.0,15.0))
              .addChild(new Viewpoint().setDescription("SuperCobra Front").setOrientation(0.0,1.0,0.0,1.57).setPosition(15.0,2.0,0.0))
              .addChild(new Viewpoint().setDescription("SuperCobra Left").setOrientation(0.0,1.0,0.0,3.14).setPosition(0.0,2.0,-15.0))
              .addChild(new Viewpoint().setDescription("SuperCobra Behind").setOrientation(0.0,1.0,0.0,4.71).setPosition(-15.0,2.0,0.0))
              .addChild(new Viewpoint().setDescription("SuperCobra Top").setOrientation(-0.51,0.83,0.22,1.24).setPosition(10.0,10.0,6.0))
              .addChild(new Viewpoint().setDescription("SuperCobra Bottom").setOrientation(0.82,0.22,-0.53,0.94).setPosition(0.0,-12.0,10.0)))
            .addChild(new WorldInfo().setInfo(new String[] {"null node"})))
          .addChild(new Script("InFlightStatusScript").setSourceCode("""
ecmascript:

function inFlight(value, ts) {

   status = value;

}
""")
            .addField(new field().setName("inFlight").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY))
            .addField(new field().setName("status").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_OUTPUTONLY))
            .setIS(new IS()
              .addConnect(new connect().setNodeField("inFlight").setProtoField("inFlight"))))
          .addChild(new Sound().setDirection(1.0,1.0,1.0).setMaxBack(200.0).setMaxFront(200.0).setMinBack(20.0).setMinFront(20.0)
            .setSource(new AudioClip("HeloFlyingAudioClip").setDescription("helicopter flight sound").setUrl(new String[] {"../../AircraftHelicopters/AH1SuperCobraUnitedStates/Hughes500HoverInteriorMedium-cd21-no59-10sec.wav","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/Hughes500HoverInteriorMedium-cd21-no59-10sec.wav"})))
          .addComments(" Tailboom ")
          .addChild(new Transform("TailBoom").setRotation(0.0,0.0,-1.0,1.66).setScale(1.2,1.2,1.0).setTranslation(-7.8,0.78,0.0)
            .addComments(" Tailboom shape ")
            .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57)
              .addChild(new Shape("TailBoomShape")
                .setIS(new IS()
                  .addConnect(new connect().setNodeField("appearance").setProtoField("tailBoomColor")))
                .setGeometry(new Extrusion().setConvex(false).setCreaseAngle(0.8).setCrossSection(new MFVec2f(new double[] {0.4,-0.5,-0.4,-0.5,-0.465,-0.465,-0.5,-0.4,-0.5,0.4,-0.465,0.465,-0.4,0.5,0.4,0.5,0.465,0.465,0.5,0.4,0.5,-0.4,0.465,-0.465,0.4,-0.5})).setEndCap(false).setOrientation(new MFRotation(new double[] {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0})).setScale(new MFVec2f(new double[] {0.10,0.10,0.15,0.15,0.20,0.20,0.25,0.25,0.30,0.30,0.35,0.35,0.40,0.40,0.45,0.45,0.475,0.475,0.50,0.50,0.525,0.525,0.55,0.55,0.565,0.565,0.575,0.575,0.58,0.58,0.6,0.6})).setSolid(false).setSpine(new MFVec3f(new double[] {0.00,0.00,0.00,0.00,0.05,0.00,0.00,0.10,0.00,0.00,0.20,0.00,0.00,0.30,0.00,0.00,0.40,0.00,0.00,0.80,0.00,0.00,1.00,0.00,0.00,2.00,0.00,0.00,3.00,0.00,0.00,3.25,0.00,0.00,3.50,0.00,0.00,3.75,0.00,0.00,4.00,0.00,0.00,4.25,0.00,0.00,4.50,0.00})))))
            .addComments(" AC Light ")
            .addChild(new Shape()
              .setAppearance(new Appearance()
                .setMaterial(new Material().setEmissiveColor(1.0,1.0,1.0)))
              .setGeometry(new Sphere().setRadius(.04)))
            .addComments(" Tail Rotor Drive Shaft ")
            .addChild(new Transform().setCenter(0.0,2.2,0.0).setRotation(0.0,0.0,1.0,0.03).setTranslation(-0.3,1.0,0.0)
              .addChild(new Group()
                .addChild(new Shape("TailRotorDriveShaftShape")
                  .setIS(new IS()
                    .addConnect(new connect().setNodeField("appearance").setProtoField("tailRotorDriveShaftColor")))
                  .setGeometry(new Extrusion().setCcw(false).setCreaseAngle(1.5).setCrossSection(new MFVec2f(new double[] {-0.03,0.0,-0.0276,-0.0114,-0.0213,-0.0213,-0.0114,-0.0276,0.0,-0.03,0.0114,-0.0276,0.0213,-0.0213,0.0276,-0.0114,0.03,0.0,0.0276,0.0114,0.0213,0.0213,0.0114,0.0276,0.0,0.03,-0.0114,0.0276,-0.0213,0.0213,-0.0276,0.0114,-0.03,0.0})).setScale(new MFVec2f(new double[] {2.0,2.0,2.3,2.3,2.0,2.0})).setSpine(new MFVec3f(new double[] {-1.16,-1.0,0.0,0.0,0.0,0.0,0.0,3.6,0.0}))))))
            .addComments(" Horizontal stabilizer ")
            .addChild(new Transform().setRotation(0.58,0.58,0.58,2.09).setTranslation(0.0,0.1,0.0)
              .addChild(new Transform().setRotation(0.0,0.0,1.0,3.14)
                .addChild(new Shape("HorizontalStabilizerShape")
                  .setIS(new IS()
                    .addConnect(new connect().setNodeField("appearance").setProtoField("horizontalStabilizerColor")))
                  .setGeometry(new Extrusion().setConvex(false).setCreaseAngle(0.8).setCrossSection(new MFVec2f(new double[] {-2.7,0.0,-2.6,0.02,-2.5,0.04,-2.4,0.045,-2.32,0.04,-0.5,0.0,-2.32,-0.04,-2.4,-0.045,-2.5,-0.04,-2.6,-0.02,-2.7,0.0})).setScale(new MFVec2f(new double[] {0.14,1.0,0.29,1.0,0.14,1.0})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,-0.85,0.0,0.0,0.0,0.0,0.0,0.85,0.0})))))
              .addChild(new Transform("LeftVerticalStabilizer").setRotation(1.0,0.0,0.0,-1.57).setTranslation(-0.05,-0.85,0.325)
                .addChild(new Shape("VerticalStabilizerShape")
                  .setIS(new IS()
                    .addConnect(new connect().setNodeField("appearance").setProtoField("tailBoomColor")))
                  .addComments(" right, left, bottom, lower front, upper front, top, lower back, upper back ")
                  .setGeometry(new IndexedFaceSet().setConvex(false).setCoordIndex(new int[] {0,1,2,3,4,5,-1,6,11,10,9,8,7,-1,0,6,7,1,-1,1,7,8,2,-1,2,8,9,3,-1,3,9,10,4,-1,0,5,11,6,-1,5,4,10,11,-1})
                    .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {0.1,0.15,0.0,0.3,0.15,0.0,0.425,0.325,0.0,0.275,0.6,0.0,0.05,0.6,0.0,0.125,0.3,0.0,0.1,0.15,-0.04,0.3,0.15,-0.02,0.425,0.325,-0.02,0.275,0.6,-0.02,0.05,0.6,-0.04,0.125,0.3,-0.04}))))))
              .addChild(new Transform("RightVerticalStabilizer").setRotation(1.0,0.0,0.0,-1.57).setTranslation(-0.05,0.85,0.325)
                .addChild(new Shape().setUSE("VerticalStabilizerShape"))))
            .addComments(" Vertical Fin ")
            .addChild(new Transform("VerticalFin").setRotation(0.0,0.0,1.0,1.57).setScale(3.5,3.5,2.5).setTranslation(1.45,0.0,0.0)
              .addChild(new Shape("VerticalFinShape")
                .setIS(new IS()
                  .addConnect(new connect().setNodeField("appearance").setProtoField("tailBoomColor")))
                .setGeometry(new IndexedFaceSet().setConvex(false).setCoordIndex(new int[] {0,1,2,3,4,5,6,7,-1,8,15,14,13,12,11,10,9,-1,8,9,1,0,-1,9,10,2,1,-1,10,11,3,2,-1,11,12,4,3,-1,12,13,5,4,-1,5,13,14,6,-1,6,14,15,7,-1,0,7,15,8,-1})
                  .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {0.1,0.375,0.01,0.125,0.355,0.01,0.175,0.33,0.01,0.3,0.325,0.02,0.35,0.35,0.02,0.375,0.4,0.02,0.0,0.8,0.02,-0.1,0.7,0.01,0.1,0.375,-0.01,0.125,0.355,-0.01,0.175,0.33,-0.01,0.3,0.325,-0.02,0.35,0.35,-0.02,0.375,0.4,-0.02,0.0,0.8,-0.02,-0.1,0.7,-0.01})))))
              .addComments(" Tail Stinger ")
              .addChild(new Transform().setRotation(0.0,0.0,-1.0,1.05).setTranslation(0.07,0.29,0.0)
                .addChild(new Shape()
                  .setAppearance(new Appearance("Gray")
                    .setMaterial(new Material().setDiffuseColor(.25,.25,.25)))
                  .setGeometry(new Cylinder().setHeight(0.2).setRadius(0.008)))
                .addComments(" Tip part ")
                .addChild(new Transform().setRotation(0.0,0.0,1.0,2.62).setTranslation(-0.0075,-0.11,0.0)
                  .addChild(new Shape()
                    .setAppearance(new Appearance().setUSE("Gray"))
                    .setGeometry(new Cylinder().setHeight(0.04).setRadius(0.008))))))
            .addComments(" Tail Rotor ")
            .addChild(new Transform().setTranslation(-1.25,0.0,0.25)
              .addChild(new ProtoInstance("TwoBladeTailRotor", "TailRotor").setContainerField("children"))))
          .addComments(" Fuselage ")
          .addChild(new Transform("FuselageBody").setRotation(0.0,1.0,0.0,-1.57).setTranslation(0.4,1.78,0.0)
            .addChild(new Transform("MainFuselageBody")
              .addChild(new Shape("MainFuselageShape")
                .setIS(new IS()
                  .addConnect(new connect().setNodeField("appearance").setProtoField("fuselageColor")))
                .setGeometry(new IndexedFaceSet().setCreaseAngle(1.57).setCoordIndex(new int[] {7,6,5,4,3,2,1,0,-1,0,1,2,3,13,12,11,10,9,8,-1,10,11,12,13,23,22,21,20,-1,14,15,16,17,18,19,4,5,6,7,-1,24,25,26,27,19,18,17,16,-1,0,8,14,7,-1,20,21,22,23,31,30,29,28,-1,27,26,25,24,32,33,34,35,-1,28,29,30,31,39,38,37,36,-1,35,34,33,32,40,41,42,43,-1,9,10,20,24,16,15,-1,20,28,32,24,-1,28,36,40,32,-1,43,42,41,40,36,37,38,39,-1})
                  .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {-0.025,0.0,3.25,-0.3,0.0,2.0,-0.55,0.0,0.5,-0.6,0.0,-0.5,0.6,0.0,-0.5,0.55,0.0,0.5,0.3,0.0,2.0,0.025,0.0,3.25,-0.05,-1.0,3.5,-0.05,-1.0,3.0,-0.3,-1.0,3.0,-0.5,-1.0,2.0,-0.55,-1.0,0.0,-0.56,-1.0,-0.5,0.05,-1.0,3.5,0.05,-1.0,3.0,0.3,-1.0,3.0,0.5,-1.0,2.0,0.55,-1.0,0.0,0.56,-1.0,-0.5,-0.3,-1.7,3.0,-0.5,-1.9,2.0,-0.55,-1.9,0.0,-0.56,-1.9,-0.5,0.3,-1.7,3.0,0.5,-1.9,2.0,0.55,-1.9,0.0,0.56,-1.9,-0.5,-0.275,-1.76,3.0,-0.475,-1.96,2.0,-0.525,-1.96,0.0,-0.535,-1.96,-0.5,0.275,-1.76,3.0,0.475,-1.96,2.0,0.525,-1.96,0.0,0.535,-1.96,-0.5,-0.2,-1.8,3.0,-0.4,-2.0,2.0,-0.45,-2.0,0.0,-0.46,-2.0,-0.5,0.2,-1.8,3.0,0.4,-2.0,2.0,0.45,-2.0,0.0,0.46,-2.0,-0.5}))))))
            .addComments(" Left Engine ")
            .addChild(new Transform().setRotation(0.0,1.0,0.0,0.15).setScale(0.6,0.9,1.0).setTranslation(-0.65,-0.5,1.6)
              .addChild(new Transform("Engine").setRotation(1.0,0.0,0.0,1.57).setScale(0.25,0.25,0.25)
                .addChild(new Shape("EngineShape")
                  .setIS(new IS()
                    .addConnect(new connect().setNodeField("appearance").setProtoField("fuselageColor")))
                  .setGeometry(new Extrusion().setCreaseAngle(2.36).setCrossSection(new MFVec2f(new double[] {-0.05,-5.0,-0.15,-4.95,-0.25,-4.8,-0.35,-4.45,-0.45,-4.0,-0.45,4.0,-0.35,4.45,-0.25,4.8,-0.15,4.95,-0.05,5.0,0.05,5.0,0.15,4.95,0.25,4.8,0.35,4.45,0.45,4.0,0.45,-4.0,0.35,-4.45,0.25,-4.8,0.15,-4.95,0.05,-5.0,-0.05,-5.0})).setSpine(new MFVec3f(new double[] {0.00,0.0,-2.00,0.77,0.0,-1.95,1.20,0.0,-1.80,1.41,0.0,-1.56,1.58,0.0,-1.15,1.58,0.0,0.00,1.58,0.0,1.15,1.41,0.0,1.56,1.20,0.0,1.80,0.77,0.0,1.95,0.00,0.0,2.00,-0.77,0.0,1.95,-1.20,0.0,1.80,-1.41,0.0,1.56,-1.58,0.0,1.15,-1.58,0.0,0.00,-1.58,0.0,-1.15,-1.41,0.0,-1.56,-1.20,0.0,-1.80,-0.77,0.0,-1.95,0.00,0.0,-2.00}))))
                .addChild(new Transform()
                  .addChild(new Shape()
                    .setAppearance(new Appearance("EngineInsideColor")
                      .setMaterial(new Material().setDiffuseColor(0.25,0.25,0.25)))
                    .setGeometry(new Extrusion().setCcw(false).setCrossSection(new MFVec2f(new double[] {0.00,-2.00,0.77,-1.95,1.20,-1.80,1.41,-1.56,1.58,-1.15,1.58,0.00,1.58,1.15,1.41,1.56,1.20,1.80,0.77,1.95,0.00,2.00,-0.77,1.95,-1.20,1.80,-1.41,1.56,-1.58,1.15,-1.58,0.0,-1.58,-1.15,-1.41,-1.56,-1.20,-1.80,-0.77,-1.95,0.0,-2.0})).setSpine(new MFVec3f(new double[] {0.0,6.5,0.0,0.0,-3.0,0.0})))))
                .addChild(new Transform().setTranslation(0.0,6.6,0.0)
                  .addChild(new Shape()
                    .setAppearance(new Appearance().setUSE("EngineInsideColor"))
                    .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {0.1,0.0,0.092,-0.038,0.071,-0.071,0.038,-0.092,0.0,-0.1,-0.038,-0.092,-0.071,-0.071,-0.092,-0.038,-0.1,0.0,-0.092,0.038,-0.071,0.071,-0.038,0.092,0.0,0.1,0.038,0.092,0.071,0.071,0.092,0.038,0.1,0.0})).setSpine(new MFVec3f(new double[] {0.0,0.0,-2.00,0.77,0.0,-1.95,1.20,0.0,-1.80,1.41,0.0,-1.56,1.58,0.0,-1.15,1.58,0.0,0.00,1.58,0.0,1.15,1.41,0.0,1.56,1.20,0.0,1.80,0.77,0.0,1.95,0.00,0.0,2.00,-0.77,0.0,1.95,-1.20,0.0,1.80,-1.41,0.0,1.56,-1.58,0.0,1.15,-1.58,0.0,0.0,-1.58,0.0,-1.15,-1.41,0.0,-1.56,-1.20,0.0,-1.80,-0.77,0.0,-1.95,0.0,0.0,-2.0})))))
                .addComments(" Left Middle Strip ")
                .addChild(new Transform().setRotation(0.58,0.58,0.58,2.09).setTranslation(-1.55,1.75,0.0)
                  .addChild(new Shape("EngineStripShape")
                    .setAppearance(new Appearance()
                      .setMaterial(new Material().setDiffuseColor(0.05,0.05,0.05)))
                    .setGeometry(new Box().setSize(9.5,0.3,0.1))))
                .addComments(" Right Middle Strip ")
                .addChild(new Transform().setRotation(0.58,0.58,0.58,2.09).setTranslation(1.55,1.75,0.0)
                  .addChild(new Shape().setUSE("EngineStripShape")))
                .addComments(" Left Upper Strip ")
                .addChild(new Transform().setRotation(0.58,0.58,0.58,2.09).setTranslation(-1.55,1.75,-0.75)
                  .addChild(new Shape().setUSE("EngineStripShape")))
                .addComments(" Right Upper Strip ")
                .addChild(new Transform().setRotation(0.58,0.58,0.58,2.09).setTranslation(1.55,1.75,-0.75)
                  .addChild(new Shape().setUSE("EngineStripShape")))
                .addComments(" Left Lower Strip ")
                .addChild(new Transform().setRotation(0.58,0.58,0.58,2.09).setTranslation(-1.55,1.75,0.75)
                  .addChild(new Shape().setUSE("EngineStripShape")))
                .addComments(" Right Lower Strip ")
                .addChild(new Transform().setRotation(0.58,0.58,0.58,2.09).setTranslation(1.55,1.75,0.75)
                  .addChild(new Shape().setUSE("EngineStripShape")))))
            .addComments(" Right Engine ")
            .addChild(new Transform().setRotation(0.0,-1.0,0.0,0.15).setScale(0.6,0.9,1.0).setTranslation(0.65,-0.5,1.6)
              .addChild(new Transform().setUSE("Engine")))
            .addComments(" Cockpit ")
            .addChild(new Transform("Cockpit").setRotation(1.0,0.0,0.0,-1.57).setTranslation(0.0,-0.4,1.51)
              .addComments(" Cockpit Bottom ")
              .addChild(new Transform("CockpitBottom").setRotation(0.0,1.0,0.0,3.14).setTranslation(0.0,2.0,-1.6)
                .addChild(new Shape("CockpitBottomShape")
                  .setIS(new IS()
                    .addConnect(new connect().setNodeField("appearance").setProtoField("cockpitColor")))
                  .setGeometry(new Extrusion().setBeginCap(false).setConvex(false).setCreaseAngle(1.5).setCrossSection(new MFVec2f(new double[] {-0.56,-0.65,-0.56,-0.3,-0.56,-0.05,-0.535,-0.02,-0.46,0.0,0.46,0.0,0.535,-0.02,0.56,-0.05,0.56,-0.3,0.56,-0.65})).setEndCap(false).setScale(new MFVec2f(new double[] {1.0,2.5,1.0,2.0,1.0,1.61,0.9,1.25})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.375,0.0,0.0,1.25,0.0,0.0,2.15,0.0}))))
                .addComments(" Front Cockpit Bottom ")
                .addChild(new Transform().setTranslation(0.0,0.0,-0.325)
                  .addChild(new Shape("FrontCockpitBottomShape")
                    .setIS(new IS()
                      .addConnect(new connect().setNodeField("appearance").setProtoField("cockpitColor")))
                    .setGeometry(new Extrusion().setBeginCap(false).setConvex(false).setCreaseAngle(1.5).setCrossSection(new MFVec2f(new double[] {-0.56,-0.65,-0.56,-0.3,-0.56,-0.05,-0.535,-0.02,-0.46,0.0,0.46,0.0,0.535,-0.02,0.56,-0.05,0.56,-0.3,0.56,-0.65})).setEndCap(false).setScale(new MFVec2f(new double[] {0.9,0.75,0.85,0.56})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,2.15,0.0,0.0,2.56,0.0}))))))
              .addComments(" Cockpit Top ")
              .addChild(new Transform().setRotation(0.0,.71,.71,3.14).setTranslation(0.0,2.0,0.4)
                .addChild(new Shape("CockpitTopShape")
                  .setIS(new IS()
                    .addConnect(new connect().setNodeField("appearance").setProtoField("cockpitColor")))
                  .setGeometry(new IndexedFaceSet().setCreaseAngle(1.57).setCoordIndex(new int[] {0,1,17,-1,1,2,16,17,-1,2,3,15,16,-1,3,4,10,11,14,15,-1,4,5,9,10,-1,5,6,8,9,-1,6,7,8,-1,11,12,13,14,-1,14,13,12,11,-1,1,0,17,-1,2,1,17,16,-1,3,2,16,15,-1,4,3,15,14,11,10,-1,5,4,10,9,-1,6,5,9,8,-1,7,6,8,-1})
                    .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {0.56,-0.3,0.0,0.56,-0.1,0.0,0.56,-0.04,0.0,0.475,0.0,0.0,-0.475,0.0,0.0,-0.56,-0.04,0.0,-0.56,-0.1,0.0,-0.56,-0.3,0.0,-0.56,-0.1,0.06,-0.56,-0.04,0.08,-0.475,0.0,0.10,-0.300,0.0,0.12,-0.300,-0.03,0.5,0.300,-0.03,0.5,0.300,0.0,0.12,0.475,0.0,0.10,0.56,-0.04,0.08,0.56,-0.1,0.06})))))
                .addComments(" Center Bars ")
                .addChild(new Shape("CenterBarShape")
                  .setIS(new IS()
                    .addConnect(new connect().setNodeField("appearance").setProtoField("cockpitColor")))
                  .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {3,2,1,0,-1,0,1,2,3,-1,4,5,6,7,-1,7,6,5,4,-1,17,16,9,8,-1,8,9,16,17,-1,16,15,10,9,-1,9,10,15,16,-1,15,14,11,10,-1,10,11,14,15,-1,14,13,12,11,-1,11,12,13,14,-1,23,18,17,8,-1,8,17,18,23,-1,22,19,18,23,-1,23,18,19,22,-1,22,21,20,19,-1,19,20,21,22,-1,31,30,29,28,27,26,25,24,-1,24,25,26,27,28,29,30,31,-1,39,38,37,36,35,34,33,32,-1,32,33,34,35,36,37,38,39,-1})
                    .setCoord(new Coordinate("CenterBarCoord").setPoint(new MFVec3f(new double[] {0.3,-0.03,0.5,0.3,-0.13,1.75,0.25,-0.13,1.75,0.25,-0.03,0.5,-0.3,-0.03,0.5,-0.3,-0.13,1.75,-0.25,-0.13,1.75,-0.25,-0.03,0.5,-0.3,-0.13,1.75,0.3,-0.13,1.75,0.4,-0.2,1.725,0.45,-0.3,1.7,0.56,-0.94,1.2,0.56,-0.95,1.25,0.45,-0.3,1.75,0.4,-0.2,1.775,0.3,-0.13,1.8,-0.3,-0.13,1.8,-0.4,-0.2,1.775,-0.45,-0.3,1.75,-0.56,-0.95,1.25,-0.56,-0.94,1.2,-0.45,-0.3,1.7,-0.4,-0.2,1.725,0.3,-0.13,1.75,0.3,-0.17,2.0,0.3,-0.25,2.1,0.3,-1.0,3.0,0.25,-1.0,3.0,0.25,-0.25,2.1,0.25,-0.17,2.0,0.25,-0.13,1.75,-0.3,-0.13,1.75,-0.3,-0.17,2.0,-0.3,-0.25,2.1,-0.3,-1.0,3.0,-0.25,-1.0,3.0,-0.25,-0.25,2.1,-0.25,-0.17,2.0,-0.25,-0.13,1.75})))))
                .addComments(" Glass Panes ")
                .addChild(new Shape()
                  .setAppearance(new Appearance()
                    .setMaterial(new Material().setDiffuseColor(0.75,0.75,0.75).setTransparency(0.5)))
                  .setGeometry(new IndexedFaceSet().setCreaseAngle(0.8).setCoordIndex(new int[] {11,10,9,5,4,3,2,1,0,-1,0,1,2,3,4,5,9,10,11,-1,9,8,7,6,5,-1,5,6,7,8,9,-1,13,14,15,16,17,21,22,23,-1,23,22,21,17,16,15,14,13,-1,17,18,19,20,21,-1,21,20,19,18,17,-1,24,25,26,27,-1,27,26,25,24,-1,28,29,30,31,32,33,34,35,-1,35,34,33,32,31,30,29,28,-1,44,43,42,41,40,39,38,37,36,-1,36,37,38,39,40,41,42,43,44,-1,45,46,47,48,49,50,51,52,53,-1,53,52,51,50,49,48,47,46,45,-1})
                    .setCoord(new Coordinate("GlassPaneCoord").setPoint(new MFVec3f(new double[] {0.3,-0.03,0.5,0.3,0.0,0.12,0.475,0.0,0.10,0.56,-0.04,0.08,0.56,-0.1,0.06,0.56,-0.3,0.0,0.56,-0.38,0.0,0.56,-0.7,0.37,0.56,-0.94,1.2,0.45,-0.3,1.7,0.4,-0.2,1.725,0.3,-0.13,1.75,-0.3,-0.03,0.5,-0.3,0.0,0.12,-0.475,0.0,0.10,-0.56,-0.04,0.08,-0.56,-0.1,0.06,-0.56,-0.3,0.0,-0.56,-0.38,0.0,-0.56,-0.7,0.37,-0.56,-0.94,1.2,-0.45,-0.3,1.7,-0.4,-0.2,1.725,-0.3,-0.13,1.75,0.25,-0.03,0.5,0.25,-0.13,1.75,-0.25,-0.13,1.75,-0.25,-0.03,0.5,0.25,-0.13,1.8,0.25,-0.17,2.0,0.25,-0.25,2.1,0.25,-1.0,3.0,-0.25,-1.0,3.0,-0.25,-0.25,2.1,-0.25,-0.17,2.0,-0.25,-0.13,1.8,0.3,-0.13,1.8,0.4,-0.2,1.775,0.45,-0.3,1.75,0.56,-0.95,1.25,0.48,-1.31,2.55,0.3,-1.0,3.0,0.3,-0.25,2.1,0.3,-0.17,2.0,0.3,-0.13,1.8,-0.3,-0.13,1.8,-0.4,-0.2,1.775,-0.45,-0.3,1.75,-0.56,-0.95,1.25,-0.48,-1.31,2.55,-0.3,-1.0,3.0,-0.3,-0.25,2.1,-0.3,-0.17,2.0,-0.3,-0.13,1.8})))))
                .addComments(" Nose ")
                .addChild(new Shape("NoseShape1")
                  .setIS(new IS()
                    .addConnect(new connect().setNodeField("appearance").setProtoField("fuselageColor")))
                  .setGeometry(new IndexedFaceSet().setCreaseAngle(0.86).setCoordIndex(new int[] {0,1,2,3,-1,0,3,4,-1,0,4,5,6,-1,9,8,7,1,-1,7,2,1,-1,3,2,10,11,-1,4,3,11,12,-1,5,4,12,13,-1,2,7,15,10,-1,7,8,14,15,-1,11,10,16,17,-1,11,17,18,19,-1,10,20,21,16,-1,21,18,17,16,-1,19,6,5,13,12,11,-1,20,10,15,14,8,9,-1,6,22,23,24,25,26,27,9,-1,27,26,25,24,23,22,6,-1,0,6,9,1,-1,6,5,28,22,-1,28,29,23,22,-1,29,30,24,23,-1,8,9,27,33,-1,32,33,27,26,-1,31,32,26,25,-1,30,31,25,24,-1,8,33,32,31,30,29,28,5,-1,41,40,39,38,37,36,35,34,-1})
                    .setCoord(new Coordinate("NoseCoord").setPoint(new MFVec3f(new double[] {0.3,-1.0,3.0,-0.3,-1.0,3.0,-0.1,-1.15,3.38,0.1,-1.15,3.38,0.20,-1.2,3.34,0.25,-1.31,3.2,0.48,-1.31,2.56,-0.20,-1.2,3.34,-0.25,-1.31,3.2,-0.48,-1.31,2.56,-0.025,-1.31,3.6,0.025,-1.31,3.6,0.115,-1.31,3.55,0.18,-1.31,3.45,-0.18,-1.31,3.45,-0.115,-1.31,3.55,-0.025,-1.5,3.55,0.025,-1.5,3.55,0.025,-1.555,3.2,0.025,-1.31,3.2,-0.025,-1.31,3.2,-0.025,-1.555,3.2,0.48,-1.635,2.56,0.455,-1.66,2.56,0.39,-1.675,2.56,-0.39,-1.675,2.56,-0.455,-1.66,2.56,-0.48,-1.635,2.56,0.25,-1.515,3.2,0.225,-1.54,3.25,0.16,-1.555,3.275,-0.16,-1.555,3.275,-0.225,-1.54,3.25,-0.25,-1.515,3.2,0.51,-1.635,2.15,0.51,-1.925,2.15,0.485,-1.975,2.15,0.42,-2.0,2.15,-0.42,-2.0,2.15,-0.485,-1.975,2.15,-0.51,-1.925,2.15,-0.51,-1.635,2.15})))))
                .addChild(new Transform().setTranslation(0.0,-2.865,0.0)
                  .addChild(new Shape("NoseShape2")
                    .setIS(new IS()
                      .addConnect(new connect().setNodeField("appearance").setProtoField("fuselageColor")))
                    .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {0.11,-1.315,0.175,-1.34,0.2,-1.355,0.2,-1.515,0.175,-1.54,0.11,-1.555,-0.11,-1.555,-0.175,-1.54,-0.2,-1.515,-0.2,-1.355,-0.175,-1.34,-0.11,-1.315,0.11,-1.315})).setScale(new MFVec2f(new double[] {0.7,1.0,0.7,1.0})).setSpine(new MFVec3f(new double[] {0.0,0.0,3.2,0.0,0.0,3.425}))))))
              .addComments(" Front Gun ")
              .addChild(new Transform().setTranslation(0.0,4.25,-1.35)
                .addChild(new Shape("FrontGunBaseShape")
                  .setIS(new IS()
                    .addConnect(new connect().setNodeField("appearance").setProtoField("fuselageColor")))
                  .setGeometry(new Sphere().setRadius(0.28)))
                .addChild(new Transform().setTranslation(0.0,0.6,-0.05)
                  .addChild(new Shape()
                    .setAppearance(new Appearance()
                      .setMaterial(new Material().setDiffuseColor(0.25,0.25,0.25)))
                    .setGeometry(new Cylinder().setHeight(1.75).setRadius(0.05))))))
            .addComments(" Cockpit Back Wall ")
            .addChild(new Transform().setTranslation(0.0,-0.575,-0.4)
              .addChild(new Shape("CockpitBackWallShape")
                .setIS(new IS()
                  .addConnect(new connect().setNodeField("appearance").setProtoField("cockpitColor")))
                .setGeometry(new Box().setSize(1.05,1.1,0.1))))
            .addComments(" Cockpit Floor ")
            .addChild(new Transform().setTranslation(0.0,-1.5,-1.8)
              .addChild(new Shape("CockpitFloorShape")
                .setIS(new IS()
                  .addConnect(new connect().setNodeField("appearance").setProtoField("cockpitColor")))
                .setGeometry(new Box().setSize(0.9,0.1,2.5))))
            .addComments(" Back Seat ")
            .addChild(new Transform().setTranslation(0.0,-1.2,-0.8)
              .addChild(new Group("Seat")
                .addComments(" Seat Bottom ")
                .addChild(new Shape()
                  .setAppearance(new Appearance("SeatColor")
                    .setMaterial(new Material().setDiffuseColor(0.5,0.5,0.0)))
                  .setGeometry(new Box().setSize(1.0,0.4,0.8)))
                .addComments(" Seat Back ")
                .addChild(new Transform().setTranslation(0.0,0.45,0.35)
                  .addChild(new Shape()
                    .setAppearance(new Appearance().setUSE("SeatColor"))
                    .setGeometry(new Box().setSize(0.75,0.5,0.1)))
                  .addComments(" Side Wings & Head Rest ")
                  .addChild(new Shape()
                    .setAppearance(new Appearance()
                      .setMaterial(new Material().setDiffuseColor(0.6,0.6,0.0)))
                    .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {0,1,2,3,4,-1,0,4,3,8,9,5,-1,9,8,7,6,5,-1,0,5,6,1,-1,8,3,2,7,-1,14,13,12,11,10,-1,15,19,18,13,14,10,-1,15,16,17,18,19,-1,15,10,11,16,-1,13,18,17,12,-1,23,22,0,10,-1,25,24,21,20,-1,22,25,20,0,-1,24,23,10,21,-1,22,23,24,25,-1})
                      .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {0.375,0.25,-0.05,0.375,-0.25,-0.15,0.375,-0.25,0.05,0.375,0.3,0.05,0.375,0.28,0.0,0.425,0.25,-0.05,0.5,-0.25,-0.15,0.5,-0.25,0.05,0.425,0.3,0.05,0.425,0.28,0.0,-0.375,0.25,-0.05,-0.375,-0.25,-0.15,-0.375,-0.25,0.05,-0.375,0.3,0.05,-0.375,0.28,0.0,-0.425,0.25,-0.05,-0.5,-0.25,-0.15,-0.5,-0.25,0.05,-0.425,0.3,0.05,-0.425,0.28,0.0,0.375,0.25,0.05,-0.375,0.25,0.05,0.3,0.5,-0.05,-0.3,0.5,-0.05,-0.3,0.5,0.05,0.3,0.5,0.05}))))))))
            .addComments(" Front Seat ")
            .addChild(new Transform().setTranslation(0.0,-1.4,-2.0)
              .addChild(new Group().setUSE("Seat"))))
          .addComments(" Fuselage Bottom ")
          .addChild(new Group("FuselageBottom")
            .addChild(new Transform().setTranslation(-0.25,-0.25,0.0)
              .addChild(new Shape()
                .setAppearance(new Appearance("Black")
                  .setMaterial(new Material().setDiffuseColor(0.0,0.0,0.0)))
                .setGeometry(new Box().setSize(0.5,0.1,0.5))))
            .addComments(" Bottom A/C Light ")
            .addChild(new Transform().setTranslation(-1.0,-0.25,0.0)
              .addChild(new Shape()
                .setAppearance(new Appearance()
                  .setMaterial(new Material("BottomLightColor").setDiffuseColor(0.4,0.4,0.4)))
                .setGeometry(new Sphere().setRadius(0.04)))
              .addChild(new Shape()
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.1,0.1,0.1)))
                .setGeometry(new Cylinder().setHeight(0.05).setRadius(0.06))))
            .addComments(" Animation Clock ")
            .addChild(new TimeSensor("BottomACLightClock").setEnabled(false).setLoop(true))
            .addComments(" Animation Path ")
            .addChild(new ColorInterpolator("BottomLightColorPath").setKey(new double[] {0.0,0.5,0.5,1.0}).setKeyValue(new MFColor(new double[] {1.0,0.0,0.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,1.0,1.0}))))
          .addComments(" Cowling ")
          .addChild(new Transform("Cowling").setScale(0.55,0.65,0.6).setTranslation(0.48,1.8,0.0)
            .addChild(new Transform().setRotation(0.0,1.0,0.0,-1.57)
              .addChild(new Shape("CowlingShape")
                .setIS(new IS()
                  .addConnect(new connect().setNodeField("appearance").setProtoField("cowlingColor")))
                .setGeometry(new Extrusion().setCreaseAngle(0.8).setCrossSection(new MFVec2f(new double[] {0.05,-0.75,-0.05,-0.75,-0.2,-0.65,-0.35,-0.5,-0.65,0.0,-0.65,1.5,-0.6,2.5,-0.4,3.25,0.0,4.0,0.4,3.25,0.6,2.5,0.65,1.5,0.65,0.0,0.35,-0.5,0.2,-0.65,0.05,-0.75})).setScale(new MFVec2f(new double[] {1.0,1.0,0.8,0.8,0.65,0.65})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.6,0.0,0.0,1.0,0.0})))))
            .addComments(" Top A/C Light ")
            .addChild(new Transform().setTranslation(-1.5,1.04,0.0)
              .addChild(new Shape()
                .setAppearance(new Appearance()
                  .setMaterial(new Material("TopLightColor").setDiffuseColor(0.4,0.4,0.4)))
                .setGeometry(new Sphere().setRadius(0.04)))
              .addChild(new Shape()
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.1,0.1,0.1)))
                .setGeometry(new Cylinder().setHeight(0.05).setRadius(0.06))))
            .addComments(" Animation Clock ")
            .addChild(new TimeSensor("TopACLightClock").setEnabled(false).setLoop(true))
            .addComments(" Animation Path ")
            .addChild(new ColorInterpolator("TopLightColorPath").setKey(new double[] {0.0,0.5,0.5,1.0}).setKeyValue(new MFColor(new double[] {1.0,0.0,0.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,1.0,1.0}))))
          .addComments(" Right Skid ")
          .addChild(new Transform().setRotation(0.0,0.0,1.0,-1.57).setTranslation(0.75,-1.0,1.15)
            .addChild(new Inline().setUrl(new String[] {"../../AircraftHelicopters/AH1SuperCobraUnitedStates/SkidRight.x3d","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SkidRight.x3d","../../AircraftHelicopters/AH1SuperCobraUnitedStates/SkidRight.wrl","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SkidRight.wrl"})))
          .addComments(" Left Skid ")
          .addChild(new Transform().setRotation(-0.71,0.71,0.0,-3.14).setTranslation(0.75,-1.0,-1.15)
            .addChild(new Inline().setUrl(new String[] {"../../AircraftHelicopters/AH1SuperCobraUnitedStates/SkidLeft.x3d","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SkidLeft.x3d","../../AircraftHelicopters/AH1SuperCobraUnitedStates/SkidLeft.wrl","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SkidLeft.wrl"})))
          .addComments(" Right Wing ")
          .addChild(new Transform().setRotation(0.0,0.71,0.71,3.14).setTranslation(-1.0,0.5,0.6)
            .addChild(new Group("RightWing")
              .addChild(new Shape("RightWingShape")
                .setIS(new IS()
                  .addConnect(new connect().setNodeField("appearance").setProtoField("fuselageColor")))
                .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {-4.2,0.0,-4.1,0.02,-4.0,0.04,-3.9,0.045,-3.82,0.04,-2.0,0.0,-3.82,-0.04,-3.9,-0.045,-4.0,-0.04,-4.1,-0.02,-4.2,0.0})).setScale(new MFVec2f(new double[] {0.475,1.0,0.3,1.0})).setSpine(new MFVec3f(new double[] {0.1,0.0,0.0,0.0,1.8,0.0}))))
              .addComments(" End Wing Attachment ")
              .addChild(new Transform().setRotation(1.0,0.0,0.0,3.14).setTranslation(-1.4,1.75,-0.15)
                .addChild(new Shape("WingAttachmentShape")
                  .setIS(new IS()
                    .addConnect(new connect().setNodeField("appearance").setProtoField("fuselageColor")))
                  .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {-0.1,0.0,0.1,0.0,0.1,-0.2,-0.1,-0.2,-0.1,0.0})).setScale(new MFVec2f(new double[] {0.9,0.9,0.95,0.95,1.0,1.0,1.0,1.0,0.5,0.5,0.45,0.45,0.4,0.4})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.05,0.0,0.0,0.1,0.0,0.0,0.6,0.0,0.0,1.0,0.0,0.0,1.05,0.0,0.0,1.1,0.0,0.0})))))
              .addComments(" Middle Wing Attachment ")
              .addChild(new Transform().setRotation(1.0,0.0,0.0,3.14).setTranslation(-1.7,0.75,-0.15)
                .addChild(new Shape().setUSE("WingAttachmentShape"))))
            .addComments(" Right Rocket Pod ")
            .addChild(new Transform().setRotation(0.0,0.0,1.0,1.57).setTranslation(-1.0,1.6,-0.5)
              .addChild(new Inline("RocketPod").setUrl(new String[] {"../../AircraftHelicopters/AH1SuperCobraUnitedStates/RocketPod.x3d","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/RocketPod.x3d","../../AircraftHelicopters/AH1SuperCobraUnitedStates/RocketPod.wrl","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/RocketPod.wrl"}))))
          .addComments(" Left Wing ")
          .addChild(new Transform().setRotation(0.0,0.71,0.71,3.14).setTranslation(-1.0,0.5,-0.6)
            .addChild(new Group("LeftWing")
              .addChild(new Shape("LeftWingShape")
                .setIS(new IS()
                  .addConnect(new connect().setNodeField("appearance").setProtoField("fuselageColor")))
                .setGeometry(new Extrusion().setConvex(false).setCrossSection(new MFVec2f(new double[] {4.2,0.0,4.1,-0.02,4.0,-0.04,3.9,-0.045,3.82,-0.04,2.0,0.0,3.82,0.04,3.9,0.045,4.0,0.04,4.1,0.02,4.2,0.0})).setScale(new MFVec2f(new double[] {0.475,1.0,0.3,1.0})).setSpine(new MFVec3f(new double[] {0.1,-0.0,0.0,0.0,-1.8,0.0}))))
              .addComments(" End Wing Attachment ")
              .addChild(new Transform().setRotation(1.0,0.0,0.0,3.14).setTranslation(-1.4,-1.75,-0.15)
                .addChild(new Shape().setUSE("WingAttachmentShape")))
              .addComments(" Middle Wing Attachment ")
              .addChild(new Transform().setRotation(1.0,0.0,0.0,3.14).setTranslation(-1.7,-0.75,-0.15)
                .addChild(new Shape().setUSE("WingAttachmentShape"))))
            .addComments(" Inline Left Rocket Pod ")
            .addChild(new Transform().setRotation(0.0,0.0,1.0,1.57).setTranslation(-1.0,-1.6,-0.5)
              .addChild(new Inline().setUSE("RocketPod"))))
          .addComments(" Main Rotor ")
          .addChild(new Transform().setTranslation(0.0,2.7,0.0)
            .addChild(new ProtoInstance("FourBladeMainRotor", "MainRotor").setContainerField("children"))))
        .addChild(new ROUTE().setFromNode("InFlightStatusScript").setFromField("status").setToNode("HeloFlyingAudioClip").setToField("set_loop"))
        .addChild(new ROUTE().setFromNode("InFlightStatusScript").setFromField("status").setToNode("MainRotor").setToField("rotationOn"))
        .addChild(new ROUTE().setFromNode("InFlightStatusScript").setFromField("status").setToNode("TailRotor").setToField("rotationOn"))
        .addChild(new ROUTE().setFromNode("InFlightStatusScript").setFromField("status").setToNode("BottomACLightClock").setToField("set_enabled"))
        .addChild(new ROUTE().setFromNode("InFlightStatusScript").setFromField("status").setToNode("TopACLightClock").setToField("set_enabled"))
        .addChild(new ROUTE().setFromNode("BottomACLightClock").setFromField("fraction_changed").setToNode("BottomLightColorPath").setToField("set_fraction"))
        .addChild(new ROUTE().setFromNode("BottomLightColorPath").setFromField("value_changed").setToNode("BottomLightColor").setToField("set_emissiveColor"))
        .addChild(new ROUTE().setFromNode("TopACLightClock").setFromField("fraction_changed").setToNode("TopLightColorPath").setToField("set_fraction"))
        .addChild(new ROUTE().setFromNode("TopLightColorPath").setFromField("value_changed").setToNode("TopLightColor").setToField("set_emissiveColor"))))
    .addComments(" ================================================================================================================ ")
    .addComments(" Example Helicopters ")
    .addChild(new Background().setSkyColor(new MFColor(new double[] {.4,.4,.6})))
    .addChild(new Anchor().setDescription("Link to example").setUrl(new String[] {"SuperCobraExample.x3d","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SuperCobraExample.x3d","SuperCobraExample.wrl","https://www.web3d.org/x3d/content/examples/Savage/AircraftHelicopters/AH1SuperCobraUnitedStates/SuperCobraExample.wrl"})
      .addComments(" Selectable Text design pattern has transparent Box and TouchSensor description as a tooltip ")
      .addChild(new Group()
        .addChild(new Shape()
          .addComments(" TODO adjust Text string and Box size, then set Material transparency='1' ")
          .setGeometry(new Text().setString(new String[] {"Example ProtoInstance","found at","SuperCobraExample.x3d"})
            .setFontStyle(new FontStyle().setFamily(new String[] {"SANS"}).setJustify(FontStyle.JUSTIFY_MIDDLE_MIDDLE).setCssStyle("BOLD")))
          .setAppearance(new Appearance()
            .setMaterial(new Material().setDiffuseColor(0.9,0.9,0.9))))
        .addChild(new Shape()
          .addComments(" Author TODO: to adjust transparent Box as text-selection assist, set width and height to match size, then set transparency='1' to make invisible. ")
          .setGeometry(new Box().setSize(10.0,3.0,.001))
          .setAppearance(new Appearance()
            .setMaterial(new Material().setTransparency(1)))))));
            }
            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 SuperCobraPrototype 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 SuperCobraPrototype().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.AircraftHelicopters.AH1SuperCobraUnitedStates.SuperCobraPrototype\" 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.AircraftHelicopters.AH1SuperCobraUnitedStates.SuperCobraPrototype self-validation test confirmation: ");
                if (!validationResults.equals("success"))
                    System.out.println();
                System.out.println(validationResults.trim());

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