package Savage.Space.SatelliteLab;

import org.web3d.x3d.jsail.Core.*;
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.PointingDeviceSensor.*;
import org.web3d.x3d.jsail.Rendering.*;
import org.web3d.x3d.jsail.Shape.*;
import org.web3d.x3d.jsail.Time.*;

// Javadoc metadata annotations follow, see below for X3DJSAIL Java source code.
/**
 * <p> Prototype of one of two types of balance blocks on the MSADS Assembly. </p>
 <p> Related links: Catalog page <a href="../../../../Space/SatelliteLab/ManualXZBalanceBlockPrototypeIndex.html" target="_blank">ManualXZBalanceBlockPrototype</a>,  source <a href="../../../../Space/SatelliteLab/ManualXZBalanceBlockPrototype.java">ManualXZBalanceBlockPrototype.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="../../../../Space/SatelliteLab/ManualXZBalanceBlockPrototype.x3d">ManualXZBalanceBlockPrototype.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> description </i> </td>
			<td> Prototype of one of two types of balance blocks on the MSADS Assembly </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> Ron Hatt </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 14 September 2006 </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> identifier </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/Savage/Space/SatelliteLab/ManualXZBalanceBlockPrototype.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/Space/SatelliteLab/ManualXZBalanceBlockPrototype.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> generator </i> </td>
			<td> Wings3D, VizX3D </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="../../../../Space/SatelliteLab/../../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 Ron Hatt
 */

public class ManualXZBalanceBlockPrototype
{
	/** Default constructor to create this object. */
	public ManualXZBalanceBlockPrototype ()
	{
	  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("ManualXZBalanceBlockPrototype.x3d"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("Prototype of one of two types of balance blocks on the MSADS Assembly"))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("Ron Hatt"))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("14 September 2006"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("28 November 2019"))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://www.web3d.org/x3d/content/examples/Savage/Space/SatelliteLab/ManualXZBalanceBlockPrototype.x3d"))
    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("Wings3D, VizX3D"))
    .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("ManualXZBalanceBlockPrototype.x3d"))
    .addChild(new ProtoDeclare("ManualXZBalanceBlock").setName("ManualXZBalanceBlock").setAppinfo("Manual Balance Block in XZ plane")
      .setProtoBody(new ProtoBody()
        .addChild(new Group("ManualBalanceBlock")
          .addChild(new Shape("ControlBlock")
            .setAppearance(new Appearance()
              .setMaterial(new Material().setAmbientIntensity(0.4).setDiffuseColor(1.0,0.77,0.31).setShininess(0.16).setSpecularColor(0.71,0.70,0.56)))
            .setGeometry(new IndexedFaceSet().setCreaseAngle(0.000).setCoordIndex(new int[] {0,1,2,-1,0,3,1,-1,0,4,3,-1,0,5,6,-1,0,2,5,-1,0,6,4,-1,1,3,2,-1,3,4,6,-1,3,7,2,-1,3,6,7,-1,5,2,6,-1,2,7,6,-1})
              .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {-.675,-.35,.35,-.675,.35,.35,-.675,.35,-.35,.675,.35,.35,.675,-.35,.35,-.675,-.35,-.35,.675,-.35,-.35,.675,.35,-.35})))))
          .addChild(new Shape("Handle")
            .setAppearance(new Appearance()
              .setMaterial(new Material().setDiffuseColor(1.0,1.0,0.0)))
            .setGeometry(new IndexedFaceSet().setCreaseAngle(0.524).setCoordIndex(getIndexedFaceSet_7_19_coordIndex())
              .setCoord(new Coordinate().setPoint(getCoordinate_8_19_point()))))
          .addChild(new Shape("Spindle")
            .setAppearance(new Appearance()
              .setMaterial(new Material("SpindleColor").setDiffuseColor(0.6,0.6,0.6)))
            .setGeometry(new IndexedFaceSet().setCreaseAngle(0.524).setCoordIndex(getIndexedFaceSet_7_24_coordIndex())
              .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {.1,0.0,1.854,.098,-.02,1.854,.098,-.02,.352,-.1,0.0,1.854,-.098,.02,1.854,.098,.02,1.854,.1,0.0,.352,.098,.02,.352,.092,-.038,1.854,-.098,-.02,1.854,.083,-.056,1.854,.083,-.056,.352,-.092,-.038,1.854,.092,-.038,.352,.071,-.071,1.854,-.083,-.056,1.854,.056,-.083,1.854,.056,-.083,.352,-.071,-.071,1.854,.071,-.071,.352,.038,-.092,1.854,-.056,-.083,1.854,.02,-.098,1.854,.02,-.098,.352,-.038,-.092,1.854,.038,-.092,.352,0.0,-.1,1.854,-.02,-.098,1.854,-.02,-.098,.352,0.0,-.1,.352,-.056,-.083,.352,-.038,-.092,.352,-.083,-.056,.352,-.071,-.071,.352,-.098,-.02,.352,-.092,-.038,.352,-.098,.02,.352,-.1,0.0,.352,-.092,.038,1.854,-.083,.056,1.854,-.083,.056,.352,.092,.038,1.854,-.092,.038,.352,-.071,.071,1.854,.083,.056,1.854,-.056,.083,1.854,-.056,.083,.352,.071,.071,1.854,-.071,.071,.352,-.038,.092,1.854,.056,.083,1.854,-.02,.098,1.854,-.02,.098,.352,.038,.092,1.854,-.038,.092,.352,0.0,.1,1.854,.02,.098,1.854,.02,.098,.352,0.0,.1,.352,.056,.083,.352,.038,.092,.352,.083,.056,.352,.071,.071,.352,.092,.038,.352})))))
          .addChild(new Transform("MovableBalanceWeight")
            .addChild(new Shape("BalanceWeight")
              .setAppearance(new Appearance()
                .setMaterial(new Material("WeightColor").setDiffuseColor(0.2,0.2,0.2)))
              .setGeometry(new IndexedFaceSet().setCreaseAngle(0.524).setCoordIndex(getIndexedFaceSet_8_29_coordIndex())
                .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {.3,0.0,1.25,.294,-.059,1.25,.294,-.059,.85,-.3,0.0,1.25,-.294,.059,1.25,.294,.059,1.25,.3,0.0,.85,.294,.059,.85,.277,-.115,1.25,-.294,-.059,1.25,.249,-.167,1.25,.249,-.167,.85,-.277,-.115,1.25,.277,-.115,.85,.212,-.212,1.25,-.249,-.167,1.25,.167,-.249,1.25,.167,-.249,.85,-.212,-.212,1.25,.212,-.212,.85,.115,-.277,1.25,-.167,-.249,1.25,.059,-.294,1.25,.059,-.294,.85,-.115,-.277,1.25,.115,-.277,.85,0.0,-.3,1.25,-.059,-.294,1.25,-.059,-.294,.85,0.0,-.3,.85,-.167,-.249,.85,-.115,-.277,.85,-.249,-.167,.85,-.212,-.212,.85,-.294,-.059,.85,-.277,-.115,.85,-.294,.059,.85,-.3,0.0,.85,-.277,.115,1.25,-.249,.167,1.25,-.249,.167,.85,.277,.115,1.25,-.277,.115,.85,-.212,.212,1.25,.249,.167,1.25,-.167,.249,1.25,-.167,.249,.85,.212,.212,1.25,-.212,.212,.85,-.115,.277,1.25,.167,.249,1.25,-.059,.294,1.25,-.059,.294,.85,.115,.277,1.25,-.115,.277,.85,0.0,.3,1.25,.059,.294,1.25,.059,.294,.85,0.0,.3,.85,.167,.249,.85,.115,.277,.85,.249,.167,.85,.212,.212,.85,.277,.115,.85})))))
            .addChild(new TouchSensor("MoveWeightBack").setDescription("Touch to move the weight"))))
        .addChild(new Group("WeightMotion")
          .addChild(new TimeSensor("WeightMotionClock").setCycleInterval(4))
          .addChild(new PositionInterpolator("Director").setKey(new double[] {0.0,0.5,1.0}).setKeyValue(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.0,-0.1,0.0,0.0,-0.2})))
          .addChild(new ROUTE().setFromNode("WeightMotionClock").setFromField("fraction_changed").setToNode("Director").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("Director").setFromField("value_changed").setToNode("MovableBalanceWeight").setToField("set_translation"))
          .addChild(new ROUTE().setFromNode("MoveWeightBack").setFromField("touchTime").setToNode("WeightMotionClock").setToField("set_startTime"))))));
            }
            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

		/** Define subarrays using type int[] */
		private int[] getIndexedFaceSet_7_19_coordIndex_1()
		{
			int[] value = {0,1,2,-1,0,2,3,-1,0,4,1,-1,0,3,4,-1,1,5,6,-1,1,7,2,-1,1,6,7,-1,1,4,5,-1,5,8,6,-1,5,4,8,-1,8,9,10,-1,8,11,6,-1,8,10,11,-1,8,4,9,-1,9,12,10,-1,9,4,12,-1,12,13,14,-1,12,15,10,-1,12,14,15,-1,12,4,13,-1,13,16,14,-1,13,4,16,-1,16,17,18,-1,16,19,14,-1,16,18,19,-1,16,4,17,-1,17,20,18,-1,17,4,20,-1,20,21,22,-1,20,23,18,-1,20,22,23,-1,20,4,21,-1,21,24,22,-1,21,4,24,-1,24,25,26,-1,24,27,22,-1,24,26,27,-1,24,4,25,-1,25,28,26,-1,25,4,28,-1,28,29,30,-1,28,31,26,-1,28,30,31,-1,28,4,29,-1,29,32,30,-1,29,4,32,-1,32,33,34,-1,32,35,30,-1,32,34,35,-1,32,4,33,-1,33,4,36,-1,33,36,34,-1,2,7,37,-1,2,38,39,-1,2,37,38,-1,2,40,3,-1,2,39,40,-1,7,6,37,-1,6,11,41,-1,6,42,37,-1,6,41,42,-1,11,10,41,-1,10,15,43,-1,10,44,41,-1,10,43,44,-1,15,14,43,-1,14,19,45,-1,14,46,43,-1,14,45,46,-1,19,18,45,-1,18,23,47,-1,18,48,45,-1,18,47,48,-1,23,22,47,-1,22,27,49,-1,22,50,47,-1,22,49,50,-1,27,26,49,-1,26,31,51,-1,26,52,49,-1,26,51,52,-1,31,30,51,-1,30,35,53,-1,30,54,51,-1,30,53,54,-1,35,34,53,-1,34,55,53,-1,34,56,55,-1,34,57,56,-1,34,36,57,-1,38,37,58,-1,38,58,39,-1,37,42,59,-1,37,60,58,-1,37,59,60,-1,42,41,59,-1,41,44,61,-1,41,62,59,-1,41,61,62,-1,44,43,61,-1,43,46,63,-1,43,64,61,-1,43,63,64,-1,46,45,63,-1,45,48,65,-1,45,66,63,-1,45,65,66,-1,48,47,65,-1,47,50,67,-1,47,68,65,-1,47,67,68,-1,50,49,67,-1,49,52,69,-1,49,70,67,-1,49,69,70,-1,52,51,69,-1,51,54,71,-1,51,72,69,-1,51,71,72,-1,54,53,71,-1,53,55,73,-1,53,74,71,-1,53,73,74,-1,55,56,73,-1,58,60,75,-1,58,76,77,-1,58,75,76,-1,58,78,39,-1,58,77,78,-1,60,59,75,-1,59,62,79,-1,59,80,75,-1,59,79,80,-1,62,61,79,-1,61,64,81,-1,61,82,79,-1,61,81,82,-1,64,63,81,-1,63,66,83,-1,63,84,81,-1,63,83,84,-1,66,65,83,-1,65,68,85,-1,65,86,83,-1,65,85,86,-1,68,67,85,-1,67,70,87,-1,67,88,85,-1,67,87,88,-1,70,69,87,-1,69,72,89,-1,69,90,87,-1,69,89,90,-1,72,71,89,-1,71,74,91,-1,71,92,89,-1,71,91,92,-1,74,73,91,-1,73,93,91,-1,73,94,93,-1,73,95,94,-1,73,56,95,-1,76,75,96,-1,76,96,77,-1,75,80,97,-1,75,98,96,-1,75,97,98,-1,80,79,97,-1,79,82,99,-1,79,100,97,-1,79,99,100,-1,82,81,99,-1,81,84,101,-1,81,102,99,-1,81,101,102,-1,84,83,101,-1,83,86,103,-1,83,104,101,-1,83,103,104,-1,86,85,103,-1,85,88,105,-1,85,106,103,-1,85,105,106,-1,88,87,105,-1,87,90,107,-1,87,108,105,-1,87,107,108,-1,90,89,107,-1,89,92,109,-1,89,110,107,-1,89,109,110,-1,92,91,109,-1,91,93,111,-1,91,112,109,-1,91,111,112,-1,93,94,111,-1,96,98,113,-1,96,114,115,-1,96,113,114,-1,96,116,77,-1,96,115,116,-1,98,97,113,-1,97,100,117,-1,97,118,113,-1,97,117,118,-1,100,99,117,-1,99,102,119,-1,99,120,117,-1,99,119,120,-1,102,101,119,-1,101,104,121,-1,101,122,119,-1,101,121,122,-1,104,103,121,-1,103,106,123,-1,103,124,121,-1,103,123,124,-1,106,105,123,-1,105,108,125,-1,105,126,123,-1,105,125,126,-1,108,107,125,-1,107,110,127,-1,107,128,125,-1,107,127,128,-1,110,109,127,-1,109,112,129,-1,109,130,127,-1,109,129,130,-1,112,111,129,-1,111,131,129,-1,111,132,131,-1,111,133,132,-1,111,94,133,-1,114,113,134,-1,114,134,115,-1,113,118,135,-1,113,136,134,-1,113,135,136,-1,118,117,135,-1,117,120,137,-1,117,138,135,-1,117,137,138,-1,120,119,137,-1,119,122,139,-1,119,140,137,-1,119,139,140,-1,122,121,139,-1,121,124,141,-1,121,142,139,-1};
			return value;
		}
		private int[] getIndexedFaceSet_7_19_coordIndex_2()
		{
			int[] value = {121,141,142,-1,124,123,141,-1,123,126,143,-1,123,144,141,-1,123,143,144,-1,126,125,143,-1,125,128,145,-1,125,146,143,-1,125,145,146,-1,128,127,145,-1,127,130,147,-1,127,148,145,-1,127,147,148,-1,130,129,147,-1,129,131,149,-1,129,150,147,-1,129,149,150,-1,131,132,149,-1,134,136,151,-1,134,152,153,-1,134,151,152,-1,134,154,115,-1,134,153,154,-1,136,135,151,-1,135,138,155,-1,135,156,151,-1,135,155,156,-1,138,137,155,-1,137,140,157,-1,137,158,155,-1,137,157,158,-1,140,139,157,-1,139,142,159,-1,139,160,157,-1,139,159,160,-1,142,141,159,-1,141,144,161,-1,141,162,159,-1,141,161,162,-1,144,143,161,-1,143,146,163,-1,143,164,161,-1,143,163,164,-1,146,145,163,-1,145,148,165,-1,145,166,163,-1,145,165,166,-1,148,147,165,-1,147,150,167,-1,147,168,165,-1,147,167,168,-1,150,149,167,-1,149,169,167,-1,149,170,169,-1,149,171,170,-1,149,132,171,-1,152,151,172,-1,152,172,153,-1,151,156,173,-1,151,174,172,-1,151,173,174,-1,156,155,173,-1,155,158,175,-1,155,176,173,-1,155,175,176,-1,158,157,175,-1,157,160,177,-1,157,178,175,-1,157,177,178,-1,160,159,177,-1,159,162,179,-1,159,180,177,-1,159,179,180,-1,162,161,179,-1,161,164,181,-1,161,182,179,-1,161,181,182,-1,164,163,181,-1,163,166,183,-1,163,184,181,-1,163,183,184,-1,166,165,183,-1,165,168,185,-1,165,186,183,-1,165,185,186,-1,168,167,185,-1,167,169,187,-1,167,188,185,-1,167,187,188,-1,169,170,187,-1,172,174,189,-1,172,190,191,-1,172,189,190,-1,172,192,153,-1,172,191,192,-1,174,173,189,-1,173,176,193,-1,173,194,189,-1,173,193,194,-1,176,175,193,-1,175,178,195,-1,175,196,193,-1,175,195,196,-1,178,177,195,-1,177,180,197,-1,177,198,195,-1,177,197,198,-1,180,179,197,-1,179,182,199,-1,179,200,197,-1,179,199,200,-1,182,181,199,-1,181,184,201,-1,181,202,199,-1,181,201,202,-1,184,183,201,-1,183,186,203,-1,183,204,201,-1,183,203,204,-1,186,185,203,-1,185,188,205,-1,185,206,203,-1,185,205,206,-1,188,187,205,-1,187,207,205,-1,187,208,207,-1,187,209,208,-1,187,170,209,-1,190,189,210,-1,190,210,191,-1,189,194,211,-1,189,212,210,-1,189,211,212,-1,194,193,211,-1,193,196,213,-1,193,214,211,-1,193,213,214,-1,196,195,213,-1,195,198,215,-1,195,216,213,-1,195,215,216,-1,198,197,215,-1,197,200,217,-1,197,218,215,-1,197,217,218,-1,200,199,217,-1,199,202,219,-1,199,220,217,-1,199,219,220,-1,202,201,219,-1,201,204,221,-1,201,222,219,-1,201,221,222,-1,204,203,221,-1,203,206,223,-1,203,224,221,-1,203,223,224,-1,206,205,223,-1,205,207,225,-1,205,226,223,-1,205,225,226,-1,207,208,225,-1,210,212,227,-1,210,228,229,-1,210,227,228,-1,210,230,191,-1,210,229,230,-1,212,211,227,-1,211,214,231,-1,211,232,227,-1,211,231,232,-1,214,213,231,-1,213,216,233,-1,213,234,231,-1,213,233,234,-1,216,215,233,-1,215,218,235,-1,215,236,233,-1,215,235,236,-1,218,217,235,-1,217,220,237,-1,217,238,235,-1,217,237,238,-1,220,219,237,-1,219,222,239,-1,219,240,237,-1,219,239,240,-1,222,221,239,-1,221,224,241,-1,221,242,239,-1,221,241,242,-1,224,223,241,-1,223,226,243,-1,223,244,241,-1,223,243,244,-1,226,225,243,-1,225,245,243,-1,225,246,245,-1,225,247,246,-1,225,208,247,-1,228,227,248,-1,228,248,229,-1,227,232,249,-1,227,250,248,-1,227,249,250,-1,232,231,249,-1,231,234,251,-1,231,252,249,-1,231,251,252,-1,234,233,251,-1,233,236,253,-1,233,254,251,-1,233,253,254,-1,236,235,253,-1,235,238,255,-1,235,256,253,-1,235,255,256,-1,238,237,255,-1,237,240,257,-1,237,258,255,-1,237,257,258,-1,240,239,257,-1,239,242,259,-1,239,260,257,-1,239,259,260,-1,242,241,259,-1,241,244,261,-1,241,262,259,-1,241,261,262,-1,244,243,261,-1,243,245,263,-1,243,264,261,-1,243,263,264,-1,245,246,263,-1,248,250,265,-1,248,266,267,-1,248,265,266,-1,248,268,229,-1,248,267,268,-1,250,249,265,-1,249,252,269,-1,249,270,265,-1,249,269,270,-1,252,251,269,-1,251,254,271,-1,251,272,269,-1,251,271,272,-1,254,253,271,-1,253,256,273,-1,253,274,271,-1};
			return value;
		}
		private int[] getIndexedFaceSet_7_19_coordIndex_3()
		{
			int[] value = {253,273,274,-1,256,255,273,-1,255,258,275,-1,255,276,273,-1,255,275,276,-1,258,257,275,-1,257,260,277,-1,257,278,275,-1,257,277,278,-1,260,259,277,-1,259,262,279,-1,259,280,277,-1,259,279,280,-1,262,261,279,-1,261,264,281,-1,261,282,279,-1,261,281,282,-1,264,263,281,-1,263,283,281,-1,263,284,283,-1,263,285,284,-1,263,246,285,-1,266,265,286,-1,266,286,267,-1,265,270,286,-1,270,269,286,-1,269,272,286,-1,272,271,286,-1,271,274,286,-1,274,273,286,-1,273,276,286,-1,276,275,286,-1,275,278,286,-1,278,277,286,-1,277,280,286,-1,280,279,286,-1,279,282,286,-1,282,281,286,-1,281,283,286,-1,283,284,286,-1,4,287,36,-1,4,3,287,-1,286,288,267,-1,286,284,288,-1,287,3,36,-1,3,40,57,-1,3,57,36,-1,40,39,56,-1,40,56,57,-1,39,78,95,-1,39,95,56,-1,78,77,94,-1,78,94,95,-1,77,116,133,-1,77,133,94,-1,116,115,132,-1,116,132,133,-1,115,154,171,-1,115,171,132,-1,154,153,170,-1,154,170,171,-1,153,192,209,-1,153,209,170,-1,192,191,208,-1,192,208,209,-1,191,230,247,-1,191,247,208,-1,230,229,246,-1,230,246,247,-1,229,268,285,-1,229,285,246,-1,268,267,284,-1,268,284,285,-1,267,288,284,-1};
			return value;
		}


		/** Define subarrays using type double[] */
		private double[] getCoordinate_8_19_point_1()
		{
			double[] value = {.068,.343,2.056,.067,.343,2.069,.134,.323,2.056,.068,.343,1.856,0.0,.35,2.056,.063,.343,2.082,.124,.323,2.107,.131,.323,2.082,.057,.343,2.094,.048,.343,2.104,.095,.323,2.151,.111,.323,2.13,.038,.343,2.113,.026,.343,2.119,.051,.323,2.18,.074,.323,2.167,.013,.343,2.123,0.0,.343,2.124,0.0,.323,2.19,.026,.323,2.187,-.013,.343,2.123,-.026,.343,2.119,-.051,.323,2.18,-.026,.323,2.187,-.038,.343,2.113,-.048,.343,2.104,-.095,.323,2.151,-.074,.323,2.167,-.057,.343,2.094,-.063,.343,2.082,-.124,.323,2.107,-.111,.323,2.13,-.067,.343,2.069,-.068,.343,2.056,-.134,.323,2.056,-.131,.323,2.082,-.068,.343,1.856,.191,.291,2.094,.194,.291,2.056,.194,.291,1.856,.134,.323,1.856,.162,.291,2.164,.18,.291,2.13,.108,.291,2.218,.137,.291,2.193,.038,.291,2.247,.074,.291,2.236,-.038,.291,2.247,0.0,.291,2.25,-.108,.291,2.218,-.074,.291,2.236,-.162,.291,2.164,-.137,.291,2.193,-.191,.291,2.094,-.18,.291,2.13,-.194,.291,2.056,-.194,.291,1.856,-.134,.323,1.856,.247,.247,2.056,.229,.247,2.151,.243,.247,2.104,.175,.247,2.231,.206,.247,2.193,.095,.247,2.285,.137,.247,2.262,0.0,.247,2.303,.048,.247,2.299,-.095,.247,2.285,-.048,.247,2.299,-.175,.247,2.231,-.137,.247,2.262,-.229,.247,2.151,-.206,.247,2.193,-.247,.247,2.056,-.243,.247,2.104,.285,.194,2.113,.291,.194,2.056,.291,.194,1.856,.247,.247,1.856,.242,.194,2.218,.269,.194,2.167,.162,.194,2.298,.206,.194,2.262,.057,.194,2.341,.111,.194,2.325,-.057,.194,2.341,0.0,.194,2.347,-.162,.194,2.298,-.111,.194,2.325,-.242,.194,2.218,-.206,.194,2.262,-.285,.194,2.113,-.269,.194,2.167,-.291,.194,2.056,-.291,.194,1.856,-.247,.247,1.856,.323,.134,2.056,.299,.134,2.18,.317,.134,2.119,.229,.134,2.285};
			return value;
		}
		private double[] getCoordinate_8_19_point_2()
		{
			double[] value = {.269,.134,2.236,.124,.134,2.355,.18,.134,2.325,0.0,.134,2.379,.063,.134,2.373,-.124,.134,2.355,-.063,.134,2.373,-.229,.134,2.285,-.18,.134,2.325,-.299,.134,2.18,-.269,.134,2.236,-.323,.134,2.056,-.317,.134,2.119,.337,.068,2.123,.343,.068,2.056,.343,.068,1.856,.323,.134,1.856,.285,.068,2.247,.317,.068,2.187,.191,.068,2.341,.243,.068,2.299,.067,.068,2.393,.131,.068,2.373,-.067,.068,2.393,0.0,.068,2.399,-.191,.068,2.341,-.131,.068,2.373,-.285,.068,2.247,-.243,.068,2.299,-.337,.068,2.123,-.317,.068,2.187,-.343,.068,2.056,-.343,.068,1.856,-.323,.134,1.856,.35,0.0,2.056,.323,0.0,2.19,.343,0.0,2.124,.247,0.0,2.303,.291,0.0,2.25,.134,0.0,2.379,.194,0.0,2.347,0.0,0.0,2.406,.068,0.0,2.399,-.134,0.0,2.379,-.068,0.0,2.399,-.247,0.0,2.303,-.194,0.0,2.347,-.323,0.0,2.19,-.291,0.0,2.25,-.35,0.0,2.056,-.343,0.0,2.124,.337,-.068,2.123,.343,-.068,2.056,.343,-.068,1.856,.35,0.0,1.856,.285,-.068,2.247,.317,-.068,2.187,.191,-.068,2.341,.243,-.068,2.299,.067,-.068,2.393,.131,-.068,2.373,-.067,-.068,2.393,0.0,-.068,2.399,-.191,-.068,2.341,-.131,-.068,2.373,-.285,-.068,2.247,-.243,-.068,2.299,-.337,-.068,2.123,-.317,-.068,2.187,-.343,-.068,2.056,-.343,-.068,1.856,-.35,0.0,1.856,.323,-.134,2.056,.299,-.134,2.18,.317,-.134,2.119,.229,-.134,2.285,.269,-.134,2.236,.124,-.134,2.355,.18,-.134,2.325,0.0,-.134,2.379,.063,-.134,2.373,-.124,-.134,2.355,-.063,-.134,2.373,-.229,-.134,2.285,-.18,-.134,2.325,-.299,-.134,2.18,-.269,-.134,2.236,-.323,-.134,2.056,-.317,-.134,2.119,.285,-.194,2.113,.291,-.194,2.056,.291,-.194,1.856,.323,-.134,1.856,.242,-.194,2.218,.269,-.194,2.167,.162,-.194,2.298,.206,-.194,2.262,.057,-.194,2.341,.111,-.194,2.325,-.057,-.194,2.341};
			return value;
		}
		private double[] getCoordinate_8_19_point_3()
		{
			double[] value = {0.0,-.194,2.347,-.162,-.194,2.298,-.111,-.194,2.325,-.242,-.194,2.218,-.206,-.194,2.262,-.285,-.194,2.113,-.269,-.194,2.167,-.291,-.194,2.056,-.291,-.194,1.856,-.323,-.134,1.856,.247,-.247,2.056,.229,-.247,2.151,.243,-.247,2.104,.175,-.247,2.231,.206,-.247,2.193,.095,-.247,2.285,.137,-.247,2.262,0.0,-.247,2.303,.048,-.247,2.299,-.095,-.247,2.285,-.048,-.247,2.299,-.175,-.247,2.231,-.137,-.247,2.262,-.229,-.247,2.151,-.206,-.247,2.193,-.247,-.247,2.056,-.243,-.247,2.104,.191,-.291,2.094,.194,-.291,2.056,.194,-.291,1.856,.247,-.247,1.856,.162,-.291,2.164,.18,-.291,2.13,.108,-.291,2.218,.137,-.291,2.193,.038,-.291,2.247,.074,-.291,2.236,-.038,-.291,2.247,0.0,-.291,2.25,-.108,-.291,2.218,-.074,-.291,2.236,-.162,-.291,2.164,-.137,-.291,2.193,-.191,-.291,2.094,-.18,-.291,2.13,-.194,-.291,2.056,-.194,-.291,1.856,-.247,-.247,1.856,.134,-.323,2.056,.124,-.323,2.107,.131,-.323,2.082,.095,-.323,2.151,.111,-.323,2.13,.051,-.323,2.18,.074,-.323,2.167,0.0,-.323,2.19,.026,-.323,2.187,-.051,-.323,2.18,-.026,-.323,2.187,-.095,-.323,2.151,-.074,-.323,2.167,-.124,-.323,2.107,-.111,-.323,2.13,-.134,-.323,2.056,-.131,-.323,2.082,.067,-.343,2.069,.068,-.343,2.056,.068,-.343,1.856,.134,-.323,1.856,.057,-.343,2.094,.063,-.343,2.082,.038,-.343,2.113,.048,-.343,2.104,.013,-.343,2.123,.026,-.343,2.119,-.013,-.343,2.123,0.0,-.343,2.124,-.038,-.343,2.113,-.026,-.343,2.119,-.057,-.343,2.094,-.048,-.343,2.104,-.067,-.343,2.069,-.063,-.343,2.082,-.068,-.343,2.056,-.068,-.343,1.856,-.134,-.323,1.856,0.0,-.35,2.056,0.0,.35,1.856,0.0,-.35,1.856};
			return value;
		}


		/** Define subarrays using type int[] */
		private int[] getIndexedFaceSet_7_24_coordIndex_1()
		{
			int[] value = {0,1,2,-1,0,3,1,-1,0,4,3,-1,0,5,4,-1,0,6,7,-1,0,2,6,-1,0,7,5,-1,1,8,2,-1,1,9,8,-1,1,3,9,-1,8,10,11,-1,8,12,10,-1,8,9,12,-1,8,13,2,-1,8,11,13,-1,10,14,11,-1,10,15,14,-1,10,12,15,-1,14,16,17,-1,14,18,16,-1,14,15,18,-1,14,19,11,-1,14,17,19,-1,16,20,17,-1,16,21,20,-1,16,18,21,-1,20,22,23,-1,20,24,22,-1,20,21,24,-1,20,25,17,-1,20,23,25,-1,22,26,23,-1,22,27,26,-1,22,24,27,-1,26,27,28,-1,26,29,23,-1,26,28,29,-1,27,24,28,-1,24,21,30,-1,24,31,28,-1,24,30,31,-1,21,18,30,-1,18,15,32,-1,18,33,30,-1,18,32,33,-1,15,12,32,-1,12,9,34,-1,12,35,32,-1,12,34,35,-1,9,3,34,-1,3,4,36,-1,3,37,34,-1,3,36,37,-1,4,38,36,-1,4,5,38,-1,38,39,40,-1,38,41,39,-1,38,5,41,-1,38,42,36,-1,38,40,42,-1,39,43,40,-1,39,44,43,-1,39,41,44,-1,43,45,46,-1,43,47,45,-1,43,44,47,-1,43,48,40,-1,43,46,48,-1,45,49,46,-1,45,50,49,-1,45,47,50,-1,49,51,52,-1,49,53,51,-1,49,50,53,-1,49,54,46,-1,49,52,54,-1,51,55,52,-1,51,56,55,-1,51,53,56,-1,55,56,57,-1,55,58,52,-1,55,57,58,-1,56,53,57,-1,53,50,59,-1,53,60,57,-1,53,59,60,-1,50,47,59,-1,47,44,61,-1,47,62,59,-1,47,61,62,-1,44,41,61,-1,41,5,7,-1,41,63,61,-1,41,7,63,-1,6,2,34,-1,6,34,37,-1,6,37,7,-1,2,13,35,-1,2,35,34,-1,13,11,32,-1,13,32,35,-1,11,19,33,-1,11,33,32,-1,19,17,30,-1,19,30,33,-1,17,25,31,-1,17,31,30,-1,25,23,28,-1,25,28,31,-1,23,29,28,-1,37,36,7,-1,36,42,63,-1,36,63,7,-1,42,40,61,-1,42,61,63,-1,40,48,62,-1,40,62,61,-1,48,46,59,-1,48,59,62,-1,46,54,60,-1,46,60,59,-1,54,52,57,-1,54,57,60,-1,52,58,57,-1};
			return value;
		}


		/** Define subarrays using type int[] */
		private int[] getIndexedFaceSet_8_29_coordIndex_1()
		{
			int[] value = {0,1,2,-1,0,3,1,-1,0,4,3,-1,0,5,4,-1,0,6,7,-1,0,2,6,-1,0,7,5,-1,1,8,2,-1,1,9,8,-1,1,3,9,-1,8,10,11,-1,8,12,10,-1,8,9,12,-1,8,13,2,-1,8,11,13,-1,10,14,11,-1,10,15,14,-1,10,12,15,-1,14,16,17,-1,14,18,16,-1,14,15,18,-1,14,19,11,-1,14,17,19,-1,16,20,17,-1,16,21,20,-1,16,18,21,-1,20,22,23,-1,20,24,22,-1,20,21,24,-1,20,25,17,-1,20,23,25,-1,22,26,23,-1,22,27,26,-1,22,24,27,-1,26,27,28,-1,26,29,23,-1,26,28,29,-1,27,24,28,-1,24,21,30,-1,24,31,28,-1,24,30,31,-1,21,18,30,-1,18,15,32,-1,18,33,30,-1,18,32,33,-1,15,12,32,-1,12,9,34,-1,12,35,32,-1,12,34,35,-1,9,3,34,-1,3,4,36,-1,3,37,34,-1,3,36,37,-1,4,38,36,-1,4,5,38,-1,38,39,40,-1,38,41,39,-1,38,5,41,-1,38,42,36,-1,38,40,42,-1,39,43,40,-1,39,44,43,-1,39,41,44,-1,43,45,46,-1,43,47,45,-1,43,44,47,-1,43,48,40,-1,43,46,48,-1,45,49,46,-1,45,50,49,-1,45,47,50,-1,49,51,52,-1,49,53,51,-1,49,50,53,-1,49,54,46,-1,49,52,54,-1,51,55,52,-1,51,56,55,-1,51,53,56,-1,55,56,57,-1,55,58,52,-1,55,57,58,-1,56,53,57,-1,53,50,59,-1,53,60,57,-1,53,59,60,-1,50,47,59,-1,47,44,61,-1,47,62,59,-1,47,61,62,-1,44,41,61,-1,41,5,7,-1,41,63,61,-1,41,7,63,-1,6,2,34,-1,6,34,37,-1,6,37,7,-1,2,13,35,-1,2,35,34,-1,13,11,32,-1,13,32,35,-1,11,19,33,-1,11,33,32,-1,19,17,30,-1,19,30,33,-1,17,25,31,-1,17,31,30,-1,25,23,28,-1,25,28,31,-1,23,29,28,-1,37,36,7,-1,36,42,63,-1,36,63,7,-1,42,40,61,-1,42,61,63,-1,40,48,62,-1,40,62,61,-1,48,46,59,-1,48,59,62,-1,46,54,60,-1,46,60,59,-1,54,52,57,-1,54,57,60,-1,52,58,57,-1};
			return value;
		}

		/** Large attribute array: IndexedFaceSet coordIndex field, scene-graph level=7, element #19, 2296 total numbers.
		 * 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 MFInt32 getIndexedFaceSet_7_19_coordIndex()
		{
			MFInt32 IndexedFaceSet_7_19_coordIndex = new MFInt32()/*2.finalize*/
				.append(new MFInt32(getIndexedFaceSet_7_19_coordIndex_1()))
				.append(new MFInt32(getIndexedFaceSet_7_19_coordIndex_2()))
				.append(new MFInt32(getIndexedFaceSet_7_19_coordIndex_3()));
			return IndexedFaceSet_7_19_coordIndex;
		}
		/** Large attribute array: Coordinate point field, scene-graph level=8, element #19, 867 total numbers made up of 289 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_8_19_point()
		{
			MFVec3f Coordinate_8_19_point = new MFVec3f()/*2.finalize*/
				.append(new MFVec3f(getCoordinate_8_19_point_1()))
				.append(new MFVec3f(getCoordinate_8_19_point_2()))
				.append(new MFVec3f(getCoordinate_8_19_point_3()));
			return Coordinate_8_19_point;
		}
		/** Large attribute array: IndexedFaceSet coordIndex field, scene-graph level=7, element #24, 496 total numbers.
		 * 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 MFInt32 getIndexedFaceSet_7_24_coordIndex()
		{
			MFInt32 IndexedFaceSet_7_24_coordIndex = new MFInt32()/*2.finalize*/
				.append(new MFInt32(getIndexedFaceSet_7_24_coordIndex_1()));
			return IndexedFaceSet_7_24_coordIndex;
		}
		/** Large attribute array: IndexedFaceSet coordIndex field, scene-graph level=8, element #29, 496 total numbers.
		 * 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 MFInt32 getIndexedFaceSet_8_29_coordIndex()
		{
			MFInt32 IndexedFaceSet_8_29_coordIndex = new MFInt32()/*2.finalize*/
				.append(new MFInt32(getIndexedFaceSet_8_29_coordIndex_1()));
			return IndexedFaceSet_8_29_coordIndex;
		}

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

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