package Savage.Weapons.SmallArms;

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> Prototype of M24 bolt-action sniper rifle used by the US Army. </p>
 <p> Related links: Catalog page <a href="../../../../Weapons/SmallArms/RifleM24PrototypeIndex.html" target="_blank">RifleM24Prototype</a>,  source <a href="../../../../Weapons/SmallArms/RifleM24Prototype.java">RifleM24Prototype.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="../../../../Weapons/SmallArms/RifleM24Prototype.x3d">RifleM24Prototype.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> description </i> </td>
			<td> Prototype of M24 bolt-action sniper rifle used by the US Army. </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> Etsuko Lippi </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 21 December 2001 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> modified </i> </td>
			<td> 28 November 2019 </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/land/m14.htm" target="_blank">https://www.fas.org/man/dod-101/sys/land/m14.htm</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="http://www.dentrinity.com/Topics/m24perfect.htm" target="_blank">http://www.dentrinity.com/Topics/m24perfect.htm</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="http://www.empnet.com/imageworks/raj2.htm" target="_blank">http://www.empnet.com/imageworks/raj2.htm</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="http://www.thepocket.com/waveffects.htm" target="_blank">http://www.thepocket.com/waveffects.htm</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> subject </i> </td>
			<td> M24 Rifle </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> Sound </i> </td>
			<td> RifleFire.wav from The Hollywood Edge, Military and Aircraft Collection PE-23, Track 28 </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/Weapons/SmallArms/RifleM24Prototype.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/Weapons/SmallArms/RifleM24Prototype.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="../../../../Weapons/SmallArms/../../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 Etsuko Lippi
 */

public class RifleM24Prototype
{
	/** Default constructor to create this object. */
	public RifleM24Prototype ()
	{
	  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("RifleM24Prototype.x3d"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("Prototype of M24 bolt-action sniper rifle used by the US Army."))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("Etsuko Lippi"))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("21 December 2001"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("28 November 2019"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://www.fas.org/man/dod-101/sys/land/m14.htm"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("http://www.dentrinity.com/Topics/m24perfect.htm"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("http://www.empnet.com/imageworks/raj2.htm"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("http://www.thepocket.com/waveffects.htm"))
    .addMeta(new meta().setName(meta.NAME_SUBJECT    ).setContent("M24 Rifle"))
    .addMeta(new meta().setName(meta.NAME_SOUND      ).setContent("RifleFire.wav from The Hollywood Edge, Military and Aircraft Collection PE-23, Track 28"))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://www.web3d.org/x3d/content/examples/Savage/Weapons/SmallArms/RifleM24Prototype.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("RifleM24Prototype.x3d"))
    .addChild(new ProtoDeclare("RifleM24").setName("RifleM24").setAppinfo("Rifle M24")
      .setProtoInterface(new ProtoInterface()
        .addField(new field().setName("trigger").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY).setAppinfo("input true to fire"))
        .addField(new field().setName("fire").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_OUTPUTONLY).setAppinfo("output true when fired"))
        .addField(new field().setName("animationStartTime").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_INPUTONLY).setAppinfo("trigger animation")))
      .setProtoBody(new ProtoBody()
        .addChild(new Group()
          .addChild(new Viewpoint().setDescription("M24 sniper rifle").setPosition(-4.0,-.1,10.0))
          .addChild(new LOD().setRange(new double[] {100.0})
            .addChild(new Group()
              .addChild(new Group("Viewpoints")
                .addComments(" High Resolution ")
                .addChild(new Viewpoint().setDescription("M24 from ahead").setOrientation(0.009,.999,0.036,1.5266).setPosition(4.1,0.0,.4))
                .addChild(new Viewpoint().setDescription("M24 left-over-the-shoulder view").setOrientation(-0.008,1.0,-0.015,4.6497).setPosition(-12.2,-.8,-3.0))
                .addChild(new Viewpoint().setDescription("M24 right-over-the-shoulder view").setOrientation(-0.008,1.0,-0.015,4.6497).setPosition(-13.2,-.7,1.8))
                .addChild(new Viewpoint().setDescription("M24 scope view").setFieldOfView(0.099).setOrientation(0.003,-1.0,-0.015,1.5497).setPosition(-7.0,.4,0.0)))
              .addChild(new Group("High")
                .addChild(new Transform("ShootShockTransform").setScale(10.0,10.0,10.0)
                  .addChild(new Transform("BulletTransform").setRotation(0.0,0.0,1.0,-1.57).setScale(0.8,1.0,0.8).setTranslation(-0.64,0.0,0.0)
                    .addChild(new Shape()
                      .setAppearance(new Appearance("BulletColor")
                        .setMaterial(new Material().setAmbientIntensity(0.1).setDiffuseColor(0.804,0.678,0.0).setShininess(0.1).setSpecularColor(0.85,0.85,0.85)))
                      .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013})).setScale(new MFVec2f(new double[] {0.75,0.75,0.75,0.75,0.7,0.7,0.65,0.65,0.55,0.55,0.4,0.4,0.25,0.25,0.1,0.1})).setSpine(new MFVec3f(new double[] {0.0,0.125,0.0,0.0,0.13,0.0,0.0,0.135,0.0,0.0,0.165,0.0,0.0,0.17,0.0,0.0,0.175,0.0,0.0,0.18,0.0,0.0,0.185,0.0})))))
                  .addChild(new Transform("Barrel").setRotation(0.58,-0.58,0.58,2.09)
                    .addChild(new Transform("BarrelPoint").setTranslation(0.0,-0.1,0.0)
                      .addChild(new Shape()
                        .setAppearance(new Appearance("BarrelColor")
                          .setMaterial(new Material().setAmbientIntensity(0.1).setDiffuseColor(0.5,0.5,0.5).setShininess(0.8).setSpecularColor(0.85,0.85,0.85)))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013,0.0,0.012,-0.00425,0.0109,-0.0085,0.0085,-0.0109,0.00425,-0.012,-0.0,-0.0109,-0.00425,-0.0085,-0.0085,-0.00425,-0.0109,0.0,-0.012,0.00425,-0.0109,.0085,-0.0085,0.0109,-0.00425,0.012,0.0,0.0109,0.00425,0.0085,0.0085,0.00425,0.0109,0.0,0.012})).setScale(new MFVec2f(new double[] {0.9,0.9,0.55,0.55})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,-0.005,0.0})))))
                    .addChild(new Transform("FlashTransform").setTranslation(0.0,0.15,0.0)
                      .addChild(new Transform("Flame1").setRotation(0.0,0.0,1.0,3.14).setScale(0.02,0.12,0.02)
                        .addChild(new Shape()
                          .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {0,1,2,-1,3,4,5,-1,6,7,8,-1})
                            .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {0.25,0.0,0.00,0.15,1.0,0.10,0.05,0.0,0.15,0.18,0.0,0.05,0.00,1.2,0.05,-0.10,0.0,0.05,-0.00,0.0,0.15,-0.13,0.8,0.10,-0.25,0.0,0.00})))
                            .setColor(new Color().setColor(new MFColor(new double[] {0.9,0.5,0.0,0.9,0.5,0.0,0.8,0.3,0.0,0.9,0.3,0.0,1.0,1.0,0.0,0.9,0.3,0.0,0.7,0.1,0.2,0.9,0.8,0.0,1.0,0.0,0.0}))))))
                      .addChild(new Transform("Flame2").setRotation(0.71,0.0,0.71,3.14).setScale(0.02,0.1,0.02)
                        .addChild(new Shape()
                          .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {0,1,2,-1,3,4,5,-1,6,7,8,-1})
                            .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {0.25,0.0,0.00,0.15,1.0,0.10,0.05,0.0,0.15,0.18,0.0,0.05,0.00,1.2,0.05,-0.10,0.0,0.05,-0.00,0.0,0.15,-0.13,0.8,0.10,-0.25,0.0,0.00})))
                            .setColor(new Color().setColor(new MFColor(new double[] {1.0,1.0,1.0,0.9,0.9,0.9,0.804,0.788,0.788,0.8,0.8,0.8,1.0,1.0,1.0,1.0,1.0,0.0,0.7,0.7,0.7,0.9,0.8,0.9,1.0,0.498,0.0}))))))
                      .addChild(new Transform("Flame3").setRotation(0.79,0.0,0.61,3.14).setScale(0.02,0.1,0.02)
                        .addChild(new Shape()
                          .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {0,1,2,-1,3,4,5,-1,6,7,8,-1})
                            .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {0.25,0.0,0.00,0.15,1.0,0.10,0.05,0.0,0.15,0.18,0.0,0.05,0.00,1.2,0.05,-0.10,0.0,0.05,-0.00,0.0,0.15,-0.13,0.8,0.10,-0.25,0.0,0.00})))
                            .setColor(new Color().setColor(new MFColor(new double[] {1.0,1.0,1.0,0.9,0.9,0.9,0.804,0.788,0.788,0.8,0.8,0.8,1.0,1.0,1.0,1.0,1.0,0.0,0.7,0.7,0.7,0.9,0.8,0.9,1.0,0.498,0.0})))))))
                    .addChild(new Transform("BarrelFront").setTranslation(0.0,-0.1,0.0)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("BarrelColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013,0.0,0.012,-0.00425,0.0109,-0.0085,0.0085,-0.0109,0.00425,-0.012,-0.0,-0.0109,-0.00425,-0.0085,-0.0085,-0.00425,-0.0109,0.0,-0.012,0.00425,-0.0109,.0085,-0.0085,0.0109,-0.00425,0.012,0.0,0.0109,0.00425,0.0085,0.0085,0.00425,0.0109,0.0,0.012})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.05,0.0})))))
                    .addChild(new Transform("BarrelCenter")
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("BarrelColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.008,0.008,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.008,-0.008,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.008,-0.008,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.008,0.008,-0.00494,0.01196,0.00,0.013,0.0,0.012,-0.00425,0.0109,-0.0085,0.0085,-0.0109,0.00425,-0.012,-0.0,-0.0109,-0.00425,-0.0085,-0.0085,-0.00425,-0.0109,0.0,-0.012,0.00425,-0.0109,.0085,-0.0085,0.0109,-0.00425,0.012,0.0,0.0109,0.00425,0.0085,0.0085,0.00425,0.0109,0.0,0.012})).setSpine(new MFVec3f(new double[] {0.0,-0.1,0.0,0.0,0.35,0.0})))))
                    .addChild(new Transform("BarrelBack").setTranslation(0.0,0.42,0.0)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("BarrelColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013,0.0,0.012,-0.00425,0.0109,-0.0085,0.0085,-0.0109,0.00425,-0.012,-0.0,-0.0109,-0.00425,-0.0085,-0.0085,-0.00425,-0.0109,0.0,-0.012,0.00425,-0.0109,.0085,-0.0085,0.0109,-0.00425,0.012,0.0,0.0109,0.00425,0.0085,0.0085,0.00425,0.0109,0.0,0.012})).setSpine(new MFVec3f(new double[] {0.0,-0.07,0.0,0.0,0.05,0.0})))))
                    .addChild(new Transform("BarrelBulletLoad").setRotation(0.0,1.0,0.0,1.3).setTranslation(0.0,0.42,0.0)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("BarrelColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013,0.0,0.012,-0.00425,0.0109,-0.0085,0.0085,-0.0109,0.00425,-0.012,-0.0,-0.0109,-0.00425,-0.0085,-0.0085,-0.00425,-0.0109,0.0,-0.012,0.00425,-0.0109,.0085,-0.0085,0.0109,-0.00425,0.012,0.0})).setSpine(new MFVec3f(new double[] {0.0,0.05,0.0,0.0,0.10,0.0})))))
                    .addChild(new Transform("BarrelBulletLoadEnd").setTranslation(0.0,0.42,0.0)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("BarrelColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013,0.0,0.012,-0.00425,0.0109,-0.0085,0.0085,-0.0109,0.00425,-0.012,-0.0,-0.0109,-0.00425,-0.0085,-0.0085,-0.00425,-0.0109,0.0,-0.012,0.00425,-0.0109,.0085,-0.0085,0.0109,-0.00425,0.012,0.0,0.0109,0.00425,0.0085,0.0085,0.00425,0.0109,0.0,0.012})).setSpine(new MFVec3f(new double[] {0.0,0.10,0.0,0.0,0.123,0.0})))))
                    .addChild(new Transform("BarrelEnd").setScale(0.9,1.1,0.9).setTranslation(0.0,0.405,0.0)
                      .addChild(new Shape()
                        .setAppearance(new Appearance("BarrelEndColor")
                          .setMaterial(new Material().setAmbientIntensity(0.1).setDiffuseColor(0.85,0.85,0.85).setShininess(0.8).setSpecularColor(0.85,0.85,0.85)))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013})).setScale(new MFVec2f(new double[] {1.0,1.0,1.0,1.0,0.8,0.8,0.8,0.8,0.6,0.6})).setSpine(new MFVec3f(new double[] {0.0,0.125,0.0,0.0,0.13,0.0,0.0,0.135,0.0,0.0,0.14,0.0,0.0,0.15,0.0}))))))
                  .addChild(new Transform("BulletGuide").setRotation(0.0,1.0,0.0,1.57).setTranslation(0.08,0.02,0.011)
                    .addChild(new Shape()
                      .setAppearance(new Appearance()
                        .setMaterial(new Material().setDiffuseColor(0.3,0.3,0.3)))
                      .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.006,0.001,0.0057,0.001,-0.0057,0.0,-0.006,-0.001,-0.0057,-0.001,0.0057,0.0,0.006})).setScale(new MFVec2f(new double[] {0.8,0.8,1.5,1.0})).setSpine(new MFVec3f(new double[] {0.01,0.0,0.0,0.01,-0.01,0.0})))))
                  .addChild(new Transform("Telescope").setRotation(0.58,-0.58,0.58,2.09).setTranslation(0.0,-0.01,0.0)
                    .addChild(new Transform("TelescopeLensFront").setTranslation(0.0,0.36,-0.05)
                      .addChild(new Shape()
                        .setAppearance(new Appearance()
                          .setMaterial(new Material().setDiffuseColor(0.0941,0.455,0.804).setEmissiveColor(0.0941,0.455,0.804).setShininess(0.8).setTransparency(0.55)))
                        .setGeometry(new Cylinder().setHeight(0.005).setRadius(0.02))))
                    .addChild(new Transform("CircleLine").setRotation(1.0,0.0,0.0,1.57).setScale(0.0215,0.0215,0.015).setTranslation(0.0,0.35,-0.05)
                      .addChild(new Shape()
                        .setAppearance(new Appearance()
                          .setMaterial(new Material().setDiffuseColor(0.957,0.643,0.376).setEmissiveColor(0.957,0.643,0.376)))
                        .setGeometry(new IndexedLineSet().setCoordIndex(new int[] {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,-1,60,61,-1,62,63,-1})
                          .setCoord(new Coordinate().setPoint(getCoordinate_14_91_point())))))
                    .addChild(new Transform("TelescopeLensForEye").setTranslation(0.0,0.58,-0.05)
                      .addChild(new Shape()
                        .setAppearance(new Appearance()
                          .setMaterial(new Material().setDiffuseColor(0.0941,0.455,0.804).setTransparency(0.5)))
                        .setGeometry(new Cylinder().setHeight(0.005).setRadius(0.016))))
                    .addChild(new Transform("TelescopeMain").setTranslation(0.0,0.35,-0.05)
                      .addChild(new Shape()
                        .setAppearance(new Appearance("TelescopeColor")
                          .setMaterial(new Material().setDiffuseColor(0.2,0.2,0.2)))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013,0.0,0.012,-0.00425,0.0109,-0.0085,0.0085,-0.0109,0.00425,-0.012,-0.0,-0.0109,-0.00425,-0.0085,-0.0085,-0.00425,-0.0109,0.0,-0.012,0.00425,-0.0109,.0085,-0.0085,0.0109,-0.00425,0.012,0.0,0.0109,0.00425,0.0085,0.0085,0.00425,0.0109,0.0,0.012})).setScale(new MFVec2f(new double[] {1.7,1.7,1.7,1.7,1.4,1.4,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.2,1.2,1.35,1.35,1.35,1.35,1.35,1.35})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.03,0.0,0.0,0.05,0.0,0.0,0.07,0.0,0.0,0.1,0.0,0.0,0.15,0.0,0.0,0.17,0.0,0.0,0.20,0.0,0.0,0.23,0.0,0.0,0.24,0.0,0.0,0.25,0.0})))))
                    .addChild(new Transform("TelescopeBeltFront").setTranslation(0.0,0.45,-0.05)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("BarrelColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013,0.0,0.012,-0.00425,0.0109,-0.0085,0.0085,-0.0109,0.00425,-0.012,-0.0,-0.0109,-0.00425,-0.0085,-0.0085,-0.00425,-0.0109,0.0,-0.012,0.00425,-0.0109,.0085,-0.0085,0.0109,-0.00425,0.012,0.0,0.0109,0.00425,0.0085,0.0085,0.00425,0.0109,0.0,0.012})).setScale(new MFVec2f(new double[] {1.15,1.15,1.15,1.15})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.015,0.0})))))
                    .addChild(new Transform("TelescopeBeltBack").setTranslation(0.0,0.52,-0.05)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("BarrelColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013,0.0,0.012,-0.00425,0.0109,-0.0085,0.0085,-0.0109,0.00425,-0.012,-0.0,-0.0109,-0.00425,-0.0085,-0.0085,-0.00425,-0.0109,0.0,-0.012,0.00425,-0.0109,.0085,-0.0085,0.0109,-0.00425,0.012,0.0,0.0109,0.00425,0.0085,0.0085,0.00425,0.0109,0.0,0.012})).setScale(new MFVec2f(new double[] {1.2,1.2,1.2,1.2})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.015,0.0})))))
                    .addChild(new Transform("TelescopeBoltFront").setRotation(1.0,0.0,0.0,1.57).setScale(0.65,0.8,0.65).setTranslation(0.0,0.458,-0.0365)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("BarrelColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013})).setScale(new MFVec2f(new double[] {1.2,1.2,1.2,1.2})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.02,0.0})))))
                    .addChild(new Transform("TelescopeBoltBack").setRotation(1.0,0.0,0.0,1.57).setScale(0.65,0.8,0.65).setTranslation(0.0,0.53,-0.0365)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("BarrelColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013})).setScale(new MFVec2f(new double[] {1.2,1.2,1.2,1.2})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.02,0.0})))))
                    .addChild(new Transform("AdjustmentLeft").setRotation(0.0,0.0,1.0,1.57).setTranslation(-0.013,0.49,-0.048)
                      .addChild(new Shape()
                        .setAppearance(new Appearance("TelescopeAdjustmentColor")
                          .setMaterial(new Material().setDiffuseColor(0.1,0.1,0.1).setEmissiveColor(0.3,0.3,0.3).setShininess(0.7).setSpecularColor(0.1,0.1,0.1)))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.008,0.008,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.008,-0.008,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.008,-0.008,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.008,0.008,-0.00494,0.01196,0.00,0.013})).setScale(new MFVec2f(new double[] {0.8,0.8,0.8,0.8})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.01,0.0})))))
                    .addChild(new Transform("AdjustmentRight").setRotation(0.0,0.0,1.0,1.57).setTranslation(0.023,0.49,-0.048)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("TelescopeAdjustmentColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.008,0.008,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.008,-0.008,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.008,-0.008,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.008,0.008,-0.00494,0.01196,0.00,0.013})).setScale(new MFVec2f(new double[] {0.8,0.8,0.8,0.8})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.01,0.0})))))
                    .addChild(new Transform("AdjustmentTop").setRotation(1.0,0.0,0.0,1.57).setTranslation(0.0,0.49,-0.08)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("TelescopeAdjustmentColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.008,0.008,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.008,-0.008,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.008,-0.008,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.008,0.008,-0.00494,0.01196,0.00,0.013})).setScale(new MFVec2f(new double[] {0.8,0.8,0.8,0.8})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.01,0.0})))))
                    .addChild(new Transform("Adjustment").setRotation(1.0,0.0,0.0,1.57).setTranslation(0.0,0.49,-0.072)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("TelescopeAdjustmentColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013})).setScale(new MFVec2f(new double[] {0.6,0.6,0.6,0.6})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.005,0.0})))))
                    .addChild(new Transform("AdjustmentTele").setRotation(1.0,0.0,0.0,1.57).setTranslation(0.0,0.49,-0.067)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("TelescopeColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,0.013,0.00,0.01196,-0.00494,0.00923,-0.00923,0.00494,-0.01196,0.00,-0.013,-0.00494,-0.01196,-0.00923,-0.00923,-0.01196,-0.00494,-0.013,-0.0,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013})).setScale(new MFVec2f(new double[] {0.6,0.6,0.6,0.6})).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.005,0.0}))))))
                  .addChild(new Transform("HandRest").setRotation(0.58,-0.58,0.58,2.09).setScale(2.0,2.0,2.0).setTranslation(-0.38,0.012,0.0)
                    .addChild(new Shape()
                      .setAppearance(new Appearance("HandrestColor")
                        .setMaterial(new Material().setDiffuseColor(0.3,0.3,0.3)))
                      .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.013,0.00494,0.01196,0.00923,0.00923,0.01196,0.00494,-0.01196,0.00494,-0.00923,0.00923,-0.00494,0.01196,0.00,0.013})).setScale(new MFVec2f(new double[] {0.6,2.0,0.4,2.3})).setSpine(new MFVec3f(new double[] {0.0,-0.1,0.0,0.0,0.09,0.0})))))
                  .addChild(new Transform("Handle")
                    .addChild(new Transform("HandleBody").setRotation(0.0,0.0,1.0,-0.4).setTranslation(-0.57,-0.0274,0.0)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("HandrestColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.021,0.0435,0.02,0.057,0.01,0.06,0.0,0.057,-0.01,0.0435,-0.02,0.0,-0.021,-0.0435,-0.02,-0.057,-0.01,-0.06,0.0,-0.057,0.01,-0.0435,0.02,0.0,0.021})).setScale(new MFVec2f(new double[] {0.38,0.38,0.36,0.36,0.3,0.3,0.25,0.25,0.32,0.34})).setSpine(new MFVec3f(new double[] {-0.03,-0.09,0.0,-0.03,-0.05,0.0,-0.022,-0.025,0.0,-0.01,-0.01,0.0,0.02,0.01,0.0})))))
                    .addChild(new Transform("HandleEnd").setRotation(0.0,0.0,1.0,0.385).setTranslation(-0.648,-0.1168,0.0)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("BarrelEndColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.021,0.0435,0.02,0.057,0.01,0.06,0.0,0.057,-0.01,0.0435,-0.02,0.0,-0.021,-0.0435,-0.02,-0.057,-0.01,-0.06,0.0,-0.057,0.01,-0.0435,0.02,0.0,0.021})).setScale(new MFVec2f(new double[] {0.37,0.37,0.38,0.38})).setSpine(new MFVec3f(new double[] {0.02,0.01,0.0,0.021,0.011,0.0}))))))
                  .addChild(new Transform("Stack")
                    .addChild(new Transform("StackBody").setRotation(0.58,0.58,-0.58,2.09).setTranslation(-0.7,-0.145,0.0)
                      .addChild(new Transform().setRotation(1.0,0.0,0.0,-0.25)
                        .addChild(new Shape()
                          .setAppearance(new Appearance().setUSE("TelescopeColor"))
                          .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.06,0.01,0.057,0.02,0.0435,0.021,0.0,0.02,-0.0435,0.01,-0.057,0.0,-0.06,-0.01,-0.057,-0.02,-0.0435,-0.021,0.0,-0.02,0.0435,-0.01,0.057,0.0,0.06})).setScale(new MFVec2f(new double[] {1.0,1.0,0.5,0.5,0.1,0.1})).setSpine(new MFVec3f(new double[] {0.0,-0.1,-0.09,0.0,0.1,-0.09,0.0,0.12,-0.09}))))))
                    .addChild(new Transform("StackEnd").setRotation(0.58,0.58,-0.58,2.09).setTranslation(-0.918,-0.2015,0.0)
                      .addChild(new Transform().setRotation(1.0,0.0,0.0,-0.25)
                        .addChild(new Shape()
                          .setAppearance(new Appearance("StackColor")
                            .setMaterial(new Material().setAmbientIntensity(0.1).setDiffuseColor(0.85,0.85,0.85).setShininess(0.8).setSpecularColor(0.85,0.85,0.85)))
                          .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.06,0.01,0.057,0.02,0.0435,0.021,0.0,0.02,-0.0435,0.01,-0.057,0.0,-0.06,-0.01,-0.057,-0.02,-0.0435,-0.021,0.0,-0.02,0.0435,-0.01,0.057,0.0,0.06})).setScale(new MFVec2f(new double[] {0.9,0.9,1.0,1.0})).setSpine(new MFVec3f(new double[] {0.0,0.119,-0.09,0.0,0.125,-0.09})))))))
                  .addChild(new Transform("Trigger")
                    .addChild(new Transform("TriggerGuard").setTranslation(-0.54,-0.042,0.0)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("HandrestColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.006,0.001,0.0057,0.001,-0.0057,0.0,-0.006,-0.001,-0.0057,-0.001,0.0057,0.0,0.006})).setSpine(new MFVec3f(new double[] {-0.02,0.0,0.0,-0.028,-0.01,0.0,-0.03,-0.02,0.0,-0.021,-0.031,0.0,-0.006,-0.035,0.0,0.01,-0.033,0.0,0.02,-0.02,0.0,0.02,-0.01,0.0,0.021,0.0,0.0})))))
                    .addChild(new Transform("TriggerPin").setTranslation(-0.565,-0.042,0.0)
                      .addChild(new Shape()
                        .setAppearance(new Appearance().setUSE("BarrelColor"))
                        .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.006,0.001,0.0057,0.001,-0.0057,0.0,-0.006,-0.001,-0.0057,-0.001,0.0057,0.0,0.006})).setScale(new MFVec2f(new double[] {1.5,1.0,1.0,1.0,0.8,0.8,0.7,0.7})).setSpine(new MFVec3f(new double[] {0.01,0.0,0.0,0.011,-0.01,0.0,0.015,-0.02,0.0,0.02,-0.025,0.0}))))))
                  .addChild(new Transform("SafetyPin").setScale(2.2,1.35,0.8).setTranslation(-0.565,-0.008,0.0085)
                    .addChild(new Shape()
                      .setAppearance(new Appearance().setUSE("StackColor"))
                      .setGeometry(new Extrusion().setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {0.0,0.006,0.001,0.0057,0.001,-0.0057,0.0,-0.006,-0.001,-0.0057,-0.001,0.0057,0.0,0.006})).setScale(new MFVec2f(new double[] {1.5,1.0,1.0,1.0,0.8,0.8,0.3,0.3})).setSpine(new MFVec3f(new double[] {0.01,0.0,0.0,0.01,-0.01,0.0,0.008,-0.02,0.0,0.006,-0.025,0.0})))))
                  .addChild(new Transform("Safety").setScale(1.0,0.7,0.6).setTranslation(-0.546,-0.04,0.009)
                    .addChild(new Shape()
                      .setAppearance(new Appearance().setUSE("StackColor"))
                      .setGeometry(new Sphere().setRadius(0.008))))
                  .addChild(new Group()
                    .addChild(new Script("TriggerScript").setSourceCode("""
ecmascript:


function trigger(value, timeStamp)
{
      //print ('trigger = ' + value);
      if (value == true)
      {
            fire = true;
      }
      else
      {
            fire = false;
      }
       //print ('fire = ' + fire);
}



function animationStartTime(time, timeStamp)
{
          //print ('time = ' + time);
          if (fire == true)
                   clockStartTime = time;
}
""")
                      .addField(new field().setName("trigger").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_INPUTONLY))
                      .addField(new field().setName("fire").setType(field.TYPE_SFBOOL).setAccessType(field.ACCESSTYPE_OUTPUTONLY))
                      .addField(new field().setName("animationStartTime").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_INPUTONLY))
                      .addField(new field().setName("clockStartTime").setType(field.TYPE_SFTIME).setAccessType(field.ACCESSTYPE_OUTPUTONLY))
                      .setIS(new IS()
                        .addConnect(new connect().setNodeField("trigger").setProtoField("trigger"))
                        .addConnect(new connect().setNodeField("animationStartTime").setProtoField("animationStartTime"))))
                    .addChild(new TimeSensor("Clock").setCycleInterval(0.5))
                    .addChild(new Sound("RifleFireSound")
                      .setSource(new AudioClip("RifleFireSoundAudio").setDescription("Rifle fire").setUrl(new String[] {"RifleFire.wav","../../Weapons/SmallArms/RifleFire.wav","https://www.web3d.org/x3d/content/examples/Savage/Weapons/SmallArms/RifleFire.wav"})))
                    .addChild(new PositionInterpolator("TriggerInterpolator").setKey(new double[] {0.0,0.2,0.49,0.8,1.0}).setKeyValue(new MFVec3f(new double[] {-0.64,0.0,0.0,-0.40,0.0,0.0,1.0,0.0,0.0,2.0,0.0,0.0,51.0,0.0,0.0})))
                    .addChild(new PositionInterpolator("FlashInterpolator").setKey(new double[] {0.0,0.3,0.5,0.8,1.0}).setKeyValue(new MFVec3f(new double[] {0.0,0.13,0.0,0.0,-0.1,0.0,0.0,-0.1,0.0,0.0,0.15,0.0,0.0,0.13,0.0})))
                    .addChild(new PositionInterpolator("ShootShockInterpolator").setKey(new double[] {0.0,0.8,0.9,1.0}).setKeyValue(new MFVec3f(new double[] {-0.64,0.0,0.0,-0.70,0.0,0.0,-0.66,0.0,0.0,-0.62,0.0,0.0})))
                    .addChild(new ROUTE().setFromNode("TriggerScript").setFromField("clockStartTime").setToNode("Clock").setToField("set_startTime"))
                    .addChild(new ROUTE().setFromNode("Clock").setFromField("fraction_changed").setToNode("TriggerInterpolator").setToField("set_fraction"))
                    .addChild(new ROUTE().setFromNode("TriggerInterpolator").setFromField("value_changed").setToNode("BulletTransform").setToField("set_translation"))
                    .addComments(" Rifle Sound ")
                    .addChild(new ROUTE().setFromNode("TriggerScript").setFromField("clockStartTime").setToNode("RifleFireSoundAudio").setToField("set_startTime"))
                    .addComments(" Flash animation ")
                    .addChild(new ROUTE().setFromNode("Clock").setFromField("fraction_changed").setToNode("FlashInterpolator").setToField("set_fraction"))
                    .addChild(new ROUTE().setFromNode("FlashInterpolator").setFromField("value_changed").setToNode("FlashTransform").setToField("set_translation"))
                    .addComments(" Shoot shock animation ")
                    .addChild(new ROUTE().setFromNode("Clock").setFromField("fraction_changed").setToNode("ShootShockInterpolator").setToField("set_fraction"))
                    .addChild(new ROUTE().setFromNode("ShootShockInterpolator").setFromField("value_changed").setToNode("ShootShockTransform").setToField("set_translation"))))))
            .addChild(new WorldInfo().setInfo(new String[] {"null node"}))))))
    .addComments(" ==================== ")
    .addChild(new Background().setSkyColor(new MFColor(new double[] {0.604,0.753,0.804})))
    .addChild(new Anchor().setDescription("RifleM24Example").setParameter(new String[] {"target=_blank"}).setUrl(new String[] {"RifleM24Example.x3d","../../Weapons/SmallArms/RifleM24Example.x3d","https://www.web3d.org/x3d/content/examples/Savage/Weapons/SmallArms/RifleM24Example.x3d","../../Weapons/SmallArms/RifleM24Example.wrl","RifleM24Example.wrl","https://www.web3d.org/x3d/content/examples/Savage/Weapons/SmallArms/RifleM24Example.wrl"})
      .addChild(new Shape()
        .setGeometry(new Text().setString(new String[] {"RifleM24Prototype","is a prototype definition file","","To see an example scene","click on this text and view","RifleM24Example"})
          .setFontStyle(new FontStyle().setJustify(FontStyle.JUSTIFY_MIDDLE_MIDDLE)))
        .setAppearance(new Appearance()
          .setMaterial(new Material().setDiffuseColor(0.819608,0.0,0.023529))))));
            }
            catch (Exception ex)
            {       
                System.err.println ("*** Further hints on X3DJSAIL errors and exceptions at");
                System.err.println ("*** https://www.web3d.org/specifications/java/X3DJSAIL.html");
                throw (ex);
            }
	}
	// end of initialize() method

		/** Large attribute array: Coordinate point field, scene-graph level=14, element #91, 192 total numbers made up of 64 3-tuple values.
		 * Reassemble split array as single method to improve readability and runnability.
		 * Provide large array values via separate methods, hoping to avoid 'code too large' Java compilation errors. 
		 * Individual Java methods (including aggregated initializations) are limited to 64KB.
		 * @see https://stackoverflow.com/questions/2407912/code-too-large-compilation-error-in-java
		 * @see https://stackoverflow.com/questions/11437905/java-too-many-constants-jvm-error
		 */
		private MFVec3f getCoordinate_14_91_point()
		{
			MFVec3f Coordinate_14_91_point = new MFVec3f(new double[] {0.0,1.0,0.0,0.105,0.995,0.0,0.208,0.978,0.0,0.309,0.951,0.0,0.407,0.914,0.0,0.500,0.866,0.0,0.588,0.809,0.0,0.669,0.743,0.0,0.743,0.669,0.0,0.809,0.588,0.0,0.866,0.500,0.0,0.914,0.407,0.0,0.951,0.309,0.0,0.978,0.208,0.0,0.995,0.105,0.0,1.0,0.0,0.0,0.995,-0.105,0.0,0.978,-0.208,0.0,0.951,-0.309,0.0,0.914,-0.407,0.0,0.866,-0.500,0.0,0.809,-0.588,0.0,0.743,-0.669,0.0,0.669,-0.743,0.0,0.588,-0.809,0.0,0.500,-0.866,0.0,0.407,-0.914,0.0,0.309,-0.951,0.0,0.208,-0.978,0.0,0.105,-0.995,0.0,0.0,-1.0,0.0,-0.105,-0.995,0.0,-0.208,-0.978,0.0,-0.309,-0.951,0.0,-0.407,-0.914,0.0,-0.500,-0.866,0.0,-0.588,-0.809,0.0,-0.669,-0.743,0.0,-0.743,-0.669,0.0,-0.809,-0.588,0.0,-0.866,-0.500,0.0,-0.914,-0.407,0.0,-0.951,-0.309,0.0,-0.978,-0.208,0.0,-0.995,-0.105,0.0,-1.0,-0.0,0.0,-0.995,0.105,0.0,-0.978,0.208,0.0,-0.951,0.309,0.0,-0.914,0.407,0.0,-0.866,0.500,0.0,-0.809,0.588,0.0,-0.743,0.669,0.0,-0.669,0.743,0.0,-0.588,0.809,0.0,-0.500,0.866,0.0,-0.407,0.914,0.0,-0.309,0.951,0.0,-0.208,0.978,0.0,-0.105,0.995,0.0,0.0,1.0,0.0,0.0,-1.0,0.0,1.0,0.0,0.0,-1.0,0.0,0.0});
			return Coordinate_14_91_point;
		}

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

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