package Savage.HarborEquipment.NavigationAids;

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

// Javadoc metadata annotations follow, see below for X3DJSAIL Java source code.
/**
 * <p> Light Post Prototype, with options for Light On/Off and Light Glow Scale. </p>
 <p> Related links: Catalog page <a href="../../../../HarborEquipment/NavigationAids/LightPostPrototypeIndex.html" target="_blank">LightPostPrototype</a>,  source <a href="../../../../HarborEquipment/NavigationAids/LightPostPrototype.java">LightPostPrototype.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="../../../../HarborEquipment/NavigationAids/LightPostPrototype.x3d">LightPostPrototype.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> description </i> </td>
			<td> Light Post Prototype, with options for Light On/Off and Light Glow Scale. </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> Planet 9 Studios, Inc., San Francisco, CA </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> producer </i> </td>
			<td> Christian Greuel, Director of Art and Production </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> modelers </i> </td>
			<td> Danny Lee, Christian Greuel </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="http://www.planet9.com" target="_blank">http://www.planet9.com</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> IHO S -57: <a href="http://www.caris.com/s" target="_blank">http://www.caris.com/s</a> -57 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> translator </i> </td>
			<td> Xj3D Format Converter </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 17 August 2006 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> translated </i> </td>
			<td> 18 August 2006 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> modified </i> </td>
			<td> 20 October 2019 </td>
		</tr>
		<tr style="color:red">
			<td style="text-align:right; vertical-align: text-top;"> <i> error </i> </td>
			<td> floating-point array error </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> license </i> </td>
			<td> <a href="../../../../HarborEquipment/NavigationAids/../../license.html">../../license.html</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/HarborEquipment/NavigationAids/LightPostPrototype.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/HarborEquipment/NavigationAids/LightPostPrototype.x3d</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 Planet 9 Studios, Inc., San Francisco, CA
 */

public class LightPostPrototype
{
	/** Default constructor to create this object. */
	public LightPostPrototype ()
	{
	  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("LightPostPrototype.x3d"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("Light Post Prototype, with options for Light On/Off and Light Glow Scale."))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("Planet 9 Studios, Inc., San Francisco, CA"))
    .addMeta(new meta().setName("producer").setContent("Christian Greuel, Director of Art and Production"))
    .addMeta(new meta().setName("modelers").setContent("Danny Lee, Christian Greuel"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("http://www.planet9.com"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("IHO S -57: http://www.caris.com/s -57"))
    .addMeta(new meta().setName(meta.NAME_TRANSLATOR ).setContent("Xj3D Format Converter"))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("17 August 2006"))
    .addMeta(new meta().setName(meta.NAME_TRANSLATED ).setContent("18 August 2006"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("20 October 2019"))
    .addMeta(new meta().setName(meta.NAME_ERROR      ).setContent("floating-point array error"))
    .addMeta(new meta().setName(meta.NAME_LICENSE    ).setContent("../../license.html"))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://www.web3d.org/x3d/content/examples/Savage/HarborEquipment/NavigationAids/LightPostPrototype.x3d")))
  .setScene(new Scene()
    .addChild(new WorldInfo().setTitle("LightPostPrototype.x3d"))
    .addChild(new ProtoDeclare("LightPost").setName("LightPost")
      .setProtoInterface(new ProtoInterface()
        .addField(new field().setName("LightType").setType(field.TYPE_SFINT32).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setValue(1))
        .addField(new field().setName("LightGlow").setType(field.TYPE_SFVEC3F).setAccessType(field.ACCESSTYPE_INPUTOUTPUT).setValue(new SFVec3f(1.0,1.0,1.0))))
      .setProtoBody(new ProtoBody()
        .addChild(new Group("LightPostGeometry")
          .addChild(new Group("LightPostPile")
            .addChild(new Shape()
              .setAppearance(new Appearance()
                .setMaterial(new Material("Post_1").setAmbientIntensity(0.0).setDiffuseColor(0.588235,0.588235,0.588235).setShininess(0.145))
                .setTexture(new ImageTexture().setUrl(new String[] {"Textures/BeaconStand06.jpg","https://www.web3d.org/x3d/content/examples/Savage/HarborEquipment/NavigationAids/Textures/BeaconStand06.jpg"})))
              .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {0,9,8,-1,0,1,9,-1,1,10,9,-1,1,2,10,-1,2,11,10,-1,2,3,11,-1,3,12,11,-1,3,4,12,-1,4,13,12,-1,4,5,13,-1,5,14,13,-1,5,6,14,-1,6,15,14,-1,6,7,15,-1,7,8,15,-1,7,0,8,-1}).setNormalIndex(new int[] {9,9,9,-1,9,9,9,-1,11,11,11,-1,11,11,11,-1,18,18,18,-1,18,18,18,-1,16,16,16,-1,16,16,16,-1,0,0,0,-1,0,0,0,-1,2,2,2,-1,2,2,2,-1,17,17,17,-1,17,17,17,-1,15,15,15,-1,15,15,15,-1}).setTexCoordIndex(new int[] {0,9,8,-1,0,1,9,-1,1,10,9,-1,1,2,10,-1,16,11,17,-1,16,3,11,-1,3,12,11,-1,3,4,12,-1,4,13,12,-1,4,5,13,-1,5,14,13,-1,5,6,14,-1,6,15,14,-1,6,7,15,-1,7,8,15,-1,7,0,8,-1})
                .setCoord(new Coordinate("LightPostPile-COORD").setPoint(new MFVec3f(new double[] {0.0,0.0,0.0865,0.061165,0.0,0.061165,0.0865,0.0,0.0,0.061165,0.0,-0.061165,0.0,0.0,-0.0865,-0.061165,0.0,-0.061165,-0.0865,0.0,0.0,-0.061165,0.0,0.061165,0.0,8.77929,0.0865,0.061165,8.77929,0.061165,0.0865,8.77929,0.0,0.061165,8.77929,-0.061165,0.0,8.77929,-0.0865,-0.061165,8.77929,-0.061165,-0.0865,8.77929,0.0,-0.061165,8.77929,0.061165,0.028183,8.77929,0.05061,0.057711,8.77929,-5.32E-4,0.028183,8.77929,-0.051675,-0.030871,8.77929,-0.051675,-0.060398,8.77929,-5.32E-4,-0.030871,8.77929,0.05061,0.057711,8.96436,-5.32E-4,0.028183,8.96436,-0.051675,-0.030871,8.96436,-0.051675,-0.060398,8.96436,-5.32E-4,-0.030871,8.96436,0.05061,0.028183,8.96436,0.05061,0.09812,8.98243,-5.32E-4,0.048388,8.98243,-0.086671,-0.051075,8.98243,-0.086671,-0.100808,8.98243,-5.32E-4,-0.051075,8.98243,0.085605,0.048388,8.98243,0.085605})))
                .setNormal(new Normal("Post_2").setVector(new MFVec3f(new double[] {-0.3826,0.0,-0.9238,0.5,0.0,0.866,-0.9238,0.0,-0.3826,1.0,0.0,0.0,-0.4999,0.0,0.866,0.4999,0.0,-0.866,-1.0,0.0,0.0,0.204,-0.9129,0.3534,0.0,1.0,0.0,0.3826,0.0,0.9238,-0.5,0.0,-0.866,0.9238,0.0,0.3826,-0.204,-0.9129,0.3534,0.204,-0.9129,-0.3534,0.4081,-0.9129,0.0,-0.3826,0.0,0.9238,0.3826,0.0,-0.9238,-0.9238,0.0,0.3826,0.9238,0.0,-0.3826,-0.204,-0.9129,-0.3534,-0.4081,-0.9129,0.0})))
                .setTexCoord(new TextureCoordinate("LightPostPile-TEXCOORD").setPoint(new MFVec2f(new double[] {2.25,0.235249,2.625,0.235249,3.0,0.235249,0.375,0.235249,0.75,0.235249,1.125,0.235249,1.5,0.235249,1.875,0.235249,2.25,0.963385,2.625,0.963385,3.0,0.963385,0.375,0.963385,0.75,0.963385,1.125,0.963385,1.5,0.963385,1.875,0.963385,0.0,0.235249,0.0,0.963385,3.0,4.99E-4,1.4612,1.4612,1.85934,0.5,0.5,1.85934,-0.461196,1.4612,-0.859337,0.5,-0.461196,-0.461196,0.5,-0.859337,1.4612,-0.461196,2.37433,4.99E-4,3.62567,4.99E-4,0.374334,4.99E-4,1.0,4.99E-4,1.62567,4.99E-4,3.0,0.428459,3.62567,0.428459,0.374334,0.428459,1.0,0.428459,1.62567,0.428459,2.37433,0.428459,3.0,0.485885,3.62567,0.485885,0.374334,0.485885,1.0,0.485885,1.62567,0.485885,2.37433,0.485885,-0.374334,4.99E-4,-0.374334,0.428459,-1.0,0.485885,-0.374334,0.485885})))))
            .addChild(new Shape()
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("Post_1"))
                .setTexture(new ImageTexture().setUrl(new String[] {"Textures/BeaconStand03.jpg","https://www.web3d.org/x3d/content/examples/Savage/HarborEquipment/NavigationAids/Textures/BeaconStand03.jpg"})))
              .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {8,9,10,-1,8,10,11,-1,8,11,12,-1,8,12,13,-1,8,13,14,-1,8,14,15,-1}).setNormalIndex(new int[] {8,8,8,-1,8,8,8,-1,8,8,8,-1,8,8,8,-1,8,8,8,-1,8,8,8,-1}).setTexCoordIndex(new int[] {20,19,21,-1,20,21,22,-1,20,22,23,-1,20,23,24,-1,20,24,25,-1,20,25,26,-1})
                .setCoord(new Coordinate().setUSE("LightPostPile-COORD"))
                .setNormal(new Normal().setUSE("Post_2"))
                .setTexCoord(new TextureCoordinate().setUSE("LightPostPile-TEXCOORD"))))
            .addChild(new Shape()
              .setAppearance(new Appearance()
                .setMaterial(new Material().setUSE("Post_1"))
                .setTexture(new ImageTexture().setUrl(new String[] {"Textures/BuoyGreen07.jpg","https://www.web3d.org/x3d/content/examples/Savage/HarborEquipment/NavigationAids/Textures/BuoyGreen07.jpg"})))
              .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {17,23,22,-1,17,18,23,-1,18,24,23,-1,18,19,24,-1,19,25,24,-1,19,20,25,-1,20,26,25,-1,20,21,26,-1,21,27,26,-1,21,16,27,-1,16,22,27,-1,16,17,22,-1,28,29,30,-1,28,30,31,-1,28,31,32,-1,28,32,33,-1,22,23,29,-1,29,28,22,-1,23,24,30,-1,30,29,23,-1,24,25,31,-1,31,30,24,-1,25,26,32,-1,32,31,25,-1,26,27,33,-1,33,32,26,-1,27,22,28,-1,28,33,27,-1}).setNormalIndex(new int[] {3,5,3,-1,3,5,5,-1,5,10,5,-1,5,10,10,-1,10,6,10,-1,10,6,6,-1,6,4,6,-1,6,4,4,-1,4,1,4,-1,4,1,1,-1,1,3,1,-1,1,3,3,-1,8,8,8,-1,8,8,8,-1,8,8,8,-1,8,8,8,-1,14,13,13,-1,13,14,14,-1,13,19,19,-1,19,13,13,-1,19,20,20,-1,20,19,19,-1,20,12,12,-1,12,20,20,-1,12,7,7,-1,7,12,12,-1,7,14,14,-1,14,7,7,-1}).setTexCoordIndex(new int[] {18,33,32,-1,18,28,33,-1,44,34,45,-1,44,29,34,-1,29,35,34,-1,29,30,35,-1,30,36,35,-1,30,31,36,-1,31,37,36,-1,31,27,37,-1,27,32,37,-1,27,18,32,-1,46,47,40,-1,46,40,41,-1,38,41,42,-1,38,42,43,-1,32,33,39,-1,39,38,32,-1,45,34,40,-1,40,47,45,-1,34,35,41,-1,41,40,34,-1,35,36,42,-1,42,41,35,-1,36,37,43,-1,43,42,36,-1,37,32,38,-1,38,43,37,-1})
                .setCoord(new Coordinate().setUSE("LightPostPile-COORD"))
                .setNormal(new Normal().setUSE("Post_2"))
                .setTexCoord(new TextureCoordinate().setUSE("LightPostPile-TEXCOORD")))))
          .addChild(new Transform("LightPostDayboard1").setTranslation(0.0,8.594,0.0)
            .addChild(new Shape()
              .setAppearance(new Appearance("Post_3")
                .setMaterial(new Material().setUSE("Post_1"))
                .setTexture(new ImageTexture("Post_4").setUrl(new String[] {"Textures/DaybeaconWhite.jpg","https://www.web3d.org/x3d/content/examples/Savage/HarborEquipment/NavigationAids/Textures/DaybeaconWhite.jpg"})))
              .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {8,12,13,-1,13,5,8,-1,15,9,12,-1,9,15,6,-1}).setNormalIndex(new int[] {0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1}).setTexCoordIndex(new int[] {12,20,21,-1,21,11,12,-1,26,14,20,-1,14,26,8,-1})
                .setCoord(new Coordinate("LightPostDayboard1-COORD").setPoint(new MFVec3f(new double[] {2.75E-4,-0.340394,0.0962,-0.339843,-2.75E-4,0.0962,0.339843,2.75E-4,0.0962,-2.75E-4,0.340394,0.0962,-1.01E-4,-0.26277,0.0962,-0.262972,1.01E-4,0.0962,0.262609,2.62E-4,0.0962,-2.61E-4,0.263134,0.0962,-0.131435,-0.131435,0.0962,0.131436,0.131436,0.0962,0.170059,0.170059,0.0962,-0.170059,-0.170059,0.0962,0.0,0.0,0.0962,-0.131617,0.131617,0.0962,0.170059,-0.170059,0.0962,0.131254,-0.131254,0.0962,-0.170059,0.170059,0.0962,0.0,0.0,0.0962})))
                .setNormal(new Normal("Post_5").setVector(new MFVec3f(new double[] {0.0,0.0,1.0,0.0,0.0,-1.0})))
                .setTexCoord(new TextureCoordinate("LightPostDayboard1-TEXCOORD").setPoint(new MFVec2f(new double[] {0.999501,4.99E-4,0.002115,4.99E-4,0.997885,0.999501,4.99E-4,0.9995,0.948565,0.05045,0.050918,0.050449,0.948015,0.949551,0.050368,0.949551,0.999501,0.500153,0.499847,0.999501,0.500153,4.99E-4,4.99E-4,0.499847,0.250519,0.249981,0.500088,0.05045,0.750172,0.749329,0.500087,0.949551,0.5,0.9995,0.499919,0.949551,0.5,4.99E-4,0.499015,0.05045,0.500345,0.499654,0.250173,0.749673,0.050643,0.5,0.998693,0.5,0.94829,0.500001,0.94829,0.5,0.749826,0.250326,0.001307,0.5,0.499467,0.500001})))))
            .addChild(new Shape()
              .setAppearance(new Appearance("Post_6")
                .setMaterial(new Material().setAmbientIntensity(0.0).setDiffuseColor(0.752941,0.752941,0.752941).setShininess(0.145))
                .setTexture(new ImageTexture().setUSE("Post_4")))
              .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {10,3,7,-1,7,9,10,-1,14,15,4,-1,4,0,14,-1,11,0,4,-1,4,8,11,-1,16,13,7,-1,7,3,16,-1,10,9,6,-1,6,2,10,-1,11,8,5,-1,5,1,11,-1,14,2,6,-1,6,15,14,-1,16,1,5,-1,5,13,16,-1}).setNormalIndex(new int[] {0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1}).setTexCoordIndex(new int[] {16,3,7,-1,7,15,16,-1,23,25,4,-1,4,0,23,-1,18,0,4,-1,4,13,18,-1,27,22,7,-1,7,3,27,-1,16,15,6,-1,6,2,16,-1,18,13,5,-1,5,1,18,-1,23,2,6,-1,6,25,23,-1,27,1,5,-1,5,22,27,-1})
                .setCoord(new Coordinate().setUSE("LightPostDayboard1-COORD"))
                .setNormal(new Normal().setUSE("Post_5"))
                .setTexCoord(new TextureCoordinate().setUSE("LightPostDayboard1-TEXCOORD"))))
            .addChild(new Shape()
              .setAppearance(new Appearance("Post_7")
                .setMaterial(new Material().setUSE("Post_1"))
                .setTexture(new ImageTexture().setUrl(new String[] {"Textures/DaybeaconBack.jpg","https://www.web3d.org/x3d/content/examples/Savage/HarborEquipment/NavigationAids/Textures/DaybeaconBack.jpg"})))
              .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {17,14,0,-1,0,11,17,-1,16,17,11,-1,11,1,16,-1,10,2,14,-1,14,17,10,-1,3,10,17,-1,17,16,3,-1}).setNormalIndex(new int[] {1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1}).setTexCoordIndex(new int[] {28,24,4,-1,4,19,28,-1,22,28,19,-1,19,5,22,-1,17,6,24,-1,24,28,17,-1,7,17,28,-1,28,22,7,-1})
                .setCoord(new Coordinate().setUSE("LightPostDayboard1-COORD"))
                .setNormal(new Normal().setUSE("Post_5"))
                .setTexCoord(new TextureCoordinate().setUSE("LightPostDayboard1-TEXCOORD"))))
            .addChild(new Shape()
              .setAppearance(new Appearance("Post_8")
                .setMaterial(new Material().setUSE("Post_1"))
                .setTexture(new ImageTexture().setUrl(new String[] {"Textures/DaybeaconBlack.jpg","https://www.web3d.org/x3d/content/examples/Savage/HarborEquipment/NavigationAids/Textures/DaybeaconBlack.jpg"})))
              .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {15,12,8,-1,8,4,15,-1,9,7,13,-1,13,12,9,-1}).setNormalIndex(new int[] {0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1}).setTexCoordIndex(new int[] {26,20,12,-1,12,10,26,-1,14,9,21,-1,21,20,14,-1})
                .setCoord(new Coordinate().setUSE("LightPostDayboard1-COORD"))
                .setNormal(new Normal().setUSE("Post_5"))
                .setTexCoord(new TextureCoordinate().setUSE("LightPostDayboard1-TEXCOORD")))))
          .addChild(new Transform("LightPostDayboard2").setRotation(0.0,-1.0,0.0,-3.14159).setTranslation(0.0,8.594,0.0)
            .addChild(new Shape()
              .setAppearance(new Appearance().setUSE("Post_3"))
              .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {8,12,13,-1,13,5,8,-1,15,9,12,-1,9,15,6,-1}).setNormalIndex(new int[] {0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1}).setTexCoordIndex(new int[] {12,20,21,-1,21,11,12,-1,26,14,20,-1,14,26,8,-1})
                .setCoord(new Coordinate("LightPostDayboard2-COORD").setPoint(new MFVec3f(new double[] {2.75E-4,-0.340394,0.0962,-0.339843,-2.75E-4,0.0962,0.339843,2.75E-4,0.0962,-2.75E-4,0.340394,0.0962,-1.01E-4,-0.26277,0.0962,-0.262972,1.01E-4,0.0962,0.262609,2.62E-4,0.0962,-2.61E-4,0.263134,0.0962,-0.131435,-0.131435,0.0962,0.131436,0.131436,0.0962,0.170059,0.170059,0.0962,-0.170059,-0.170059,0.0962,0.0,0.0,0.0962,-0.131617,0.131617,0.0962,0.170059,-0.170059,0.0962,0.131254,-0.131254,0.0962,-0.170059,0.170059,0.0962,0.0,0.0,0.0962})))
                .setNormal(new Normal().setUSE("Post_5"))
                .setTexCoord(new TextureCoordinate("LightPostDayboard2-TEXCOORD").setPoint(new MFVec2f(new double[] {0.999501,4.99E-4,0.002115,4.99E-4,0.997885,0.999501,4.99E-4,0.9995,0.948565,0.05045,0.050918,0.050449,0.948015,0.949551,0.050368,0.949551,0.999501,0.500153,0.499847,0.999501,0.500153,4.99E-4,4.99E-4,0.499847,0.250519,0.249981,0.500088,0.05045,0.750172,0.749329,0.500087,0.949551,0.5,0.9995,0.499919,0.949551,0.5,4.99E-4,0.499015,0.05045,0.500345,0.499654,0.250173,0.749673,0.050643,0.5,0.998693,0.5,0.94829,0.500001,0.94829,0.5,0.749826,0.250326,0.001307,0.5,0.499467,0.500001})))))
            .addChild(new Shape()
              .setAppearance(new Appearance().setUSE("Post_6"))
              .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {10,3,7,-1,7,9,10,-1,14,15,4,-1,4,0,14,-1,11,0,4,-1,4,8,11,-1,16,13,7,-1,7,3,16,-1,10,9,6,-1,6,2,10,-1,11,8,5,-1,5,1,11,-1,14,2,6,-1,6,15,14,-1,16,1,5,-1,5,13,16,-1}).setNormalIndex(new int[] {0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1}).setTexCoordIndex(new int[] {16,3,7,-1,7,15,16,-1,23,25,4,-1,4,0,23,-1,18,0,4,-1,4,13,18,-1,27,22,7,-1,7,3,27,-1,16,15,6,-1,6,2,16,-1,18,13,5,-1,5,1,18,-1,23,2,6,-1,6,25,23,-1,27,1,5,-1,5,22,27,-1})
                .setCoord(new Coordinate().setUSE("LightPostDayboard2-COORD"))
                .setNormal(new Normal().setUSE("Post_5"))
                .setTexCoord(new TextureCoordinate().setUSE("LightPostDayboard2-TEXCOORD"))))
            .addChild(new Shape()
              .setAppearance(new Appearance().setUSE("Post_7"))
              .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {17,14,0,-1,0,11,17,-1,16,17,11,-1,11,1,16,-1,10,2,14,-1,14,17,10,-1,3,10,17,-1,17,16,3,-1}).setNormalIndex(new int[] {1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1}).setTexCoordIndex(new int[] {28,24,4,-1,4,19,28,-1,22,28,19,-1,19,5,22,-1,17,6,24,-1,24,28,17,-1,7,17,28,-1,28,22,7,-1})
                .setCoord(new Coordinate().setUSE("LightPostDayboard2-COORD"))
                .setNormal(new Normal().setUSE("Post_5"))
                .setTexCoord(new TextureCoordinate().setUSE("LightPostDayboard2-TEXCOORD"))))
            .addChild(new Shape()
              .setAppearance(new Appearance().setUSE("Post_8"))
              .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {15,12,8,-1,8,4,15,-1,9,7,13,-1,13,12,9,-1}).setNormalIndex(new int[] {0,0,0,-1,0,0,0,-1,0,0,0,-1,0,0,0,-1}).setTexCoordIndex(new int[] {26,20,12,-1,12,10,26,-1,14,9,21,-1,21,20,14,-1})
                .setCoord(new Coordinate().setUSE("LightPostDayboard2-COORD"))
                .setNormal(new Normal().setUSE("Post_5"))
                .setTexCoord(new TextureCoordinate().setUSE("LightPostDayboard2-TEXCOORD")))))
          .addChild(new Switch("LightWhite").setWhichChoice(-1)
            .setIS(new IS()
              .addConnect(new connect().setNodeField("whichChoice").setProtoField("LightType")))
            .addChild(new Transform("LightOffWhite").setTranslation(-0.003122,6.56572,-0.00303)
              .addChild(new Shape()
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setUSE("Post_1"))
                  .setTexture(new ImageTexture().setUrl(new String[] {"Textures/BuoyWhite07.jpg","https://www.web3d.org/x3d/content/examples/Savage/HarborEquipment/NavigationAids/Textures/BuoyWhite07.jpg"})))
                .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {0,2,1,-1,0,3,2,-1,0,4,3,-1,0,5,4,-1,0,6,5,-1,0,1,6,-1,3,10,9,-1,3,4,10,-1,4,11,10,-1,4,5,11,-1,5,12,11,-1,5,6,12,-1,6,7,12,-1,6,1,7,-1,8,13,14,-1,8,14,15,-1,8,15,16,-1,8,16,17,-1,7,8,13,-1,14,13,8,-1,9,10,15,-1,15,14,9,-1,10,11,16,-1,16,15,10,-1,11,12,17,-1,17,16,11,-1,12,7,8,-1,8,17,12,-1,1,18,7,-1,1,2,18,-1,2,9,18,-1,2,3,9,-1,7,18,13,-1,13,8,7,-1,18,9,14,-1,14,13,18,-1}).setNormalIndex(new int[] {13,18,7,-1,13,2,18,-1,13,5,2,-1,13,17,5,-1,13,12,17,-1,13,7,12,-1,2,4,3,-1,2,5,4,-1,5,15,4,-1,5,17,15,-1,17,11,15,-1,17,12,11,-1,12,8,11,-1,12,7,8,-1,0,9,10,-1,0,10,16,-1,0,16,6,-1,0,6,1,-1,8,0,9,-1,10,9,0,-1,3,4,16,-1,16,10,3,-1,4,15,6,-1,6,16,4,-1,15,11,1,-1,1,6,15,-1,11,8,0,-1,0,1,11,-1,7,14,8,-1,7,18,14,-1,18,3,14,-1,18,2,3,-1,8,14,9,-1,9,0,8,-1,14,3,10,-1,10,9,14,-1}).setTexCoordIndex(new int[] {0,2,1,-1,0,3,19,-1,0,4,3,-1,0,5,4,-1,0,6,5,-1,0,1,6,-1,3,10,9,-1,3,4,10,-1,4,11,10,-1,4,5,11,-1,5,12,11,-1,5,6,12,-1,6,7,12,-1,6,1,7,-1,20,21,14,-1,20,14,15,-1,20,15,16,-1,8,16,17,-1,7,8,13,-1,14,21,20,-1,9,10,15,-1,15,14,9,-1,10,11,16,-1,16,15,10,-1,11,12,17,-1,17,16,11,-1,12,7,8,-1,8,17,12,-1,1,18,7,-1,1,2,18,-1,19,9,22,-1,19,3,9,-1,7,18,13,-1,13,8,7,-1,22,9,14,-1,14,21,22,-1})
                  .setCoord(new Coordinate("Post_9").setPoint(new MFVec3f(new double[] {0.003149,2.41685,0.003059,0.06215,2.41685,0.00303,0.032623,2.41685,-0.048112,-0.026431,2.41685,-0.048112,-0.055905,2.41685,0.003059,-0.026378,2.41685,0.054202,0.032676,2.41685,0.054202,0.06215,2.53089,0.00303,0.03533,2.57828,0.00303,-0.026431,2.53089,-0.048112,-0.055905,2.53089,0.003059,-0.026378,2.53089,0.054202,0.032676,2.53089,0.054202,0.019213,2.57828,-0.024885,-0.013021,2.57828,-0.024885,-0.029085,2.57828,0.003059,-0.012968,2.57828,0.030975,0.019266,2.57828,0.030975,0.03257,2.53089,-0.048142})))
                  .setNormal(new Normal("Post_10").setVector(new MFVec3f(new double[] {0.4913,0.8237,0.2827,0.3046,0.7938,0.5262,-0.3965,-0.6099,-0.686,-0.4864,0.2367,-0.841,-0.9715,0.2367,4.0E-4,-0.7923,-0.61,4.0E-4,-0.3039,0.7939,0.5264,0.7923,-0.61,-4.0E-4,0.9762,0.212,0.0453,0.2976,0.4869,-0.8211,-0.3336,0.7461,-0.5761,0.4862,0.2367,0.8411,0.3965,-0.6099,0.686,0.0,-1.0,0.0,0.4852,0.2366,-0.8417,-0.4857,0.2366,0.8414,-0.6078,0.794,5.0E-4,-0.3962,-0.6099,0.6862,0.3962,-0.6099,-0.6862})))
                  .setTexCoord(new TextureCoordinate().setPoint(new MFVec2f(new double[] {2.0,0.486349,3.00028,0.486349,3.62636,0.486349,0.374691,0.486349,1.0,0.486349,1.62567,0.486349,2.37433,0.486349,3.00028,0.84887,3.0005,0.9995,0.374691,0.84887,1.0,0.84887,1.62567,0.84887,2.37433,0.84887,3.62694,0.9995,0.374988,0.9995,1.0,0.9995,1.62567,0.9995,2.37433,0.9995,3.62706,0.84887,-0.373638,0.486349,-0.999495,0.9995,-0.373059,0.9995,-0.372942,0.84887}))))))
            .addChild(new Transform("LightOnWhite").setTranslation(0.0,9.09678,0.0)
              .addChild(new Transform("LightOnWhiteBulb").setTranslation(-0.003122,-2.53106,-0.00303)
                .addChild(new Shape()
                  .setAppearance(new Appearance()
                    .setMaterial(new Material().setAmbientIntensity(0.0).setDiffuseColor(0.752941,0.752941,0.752941).setEmissiveColor(0.752941,0.752941,0.752941).setShininess(0.145)))
                  .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {0,2,1,-1,0,3,2,-1,0,4,3,-1,0,5,4,-1,0,6,5,-1,0,1,6,-1,3,10,9,-1,3,4,10,-1,4,11,10,-1,4,5,11,-1,5,12,11,-1,5,6,12,-1,6,7,12,-1,6,1,7,-1,8,13,14,-1,8,14,15,-1,8,15,16,-1,8,16,17,-1,7,8,13,-1,14,13,8,-1,9,10,15,-1,15,14,9,-1,10,11,16,-1,16,15,10,-1,11,12,17,-1,17,16,11,-1,12,7,8,-1,8,17,12,-1,1,18,7,-1,1,2,18,-1,2,9,18,-1,2,3,9,-1,7,18,13,-1,13,8,7,-1,18,9,14,-1,14,13,18,-1}).setNormalIndex(new int[] {13,18,7,-1,13,2,18,-1,13,5,2,-1,13,17,5,-1,13,12,17,-1,13,7,12,-1,2,4,3,-1,2,5,4,-1,5,15,4,-1,5,17,15,-1,17,11,15,-1,17,12,11,-1,12,8,11,-1,12,7,8,-1,0,9,10,-1,0,10,16,-1,0,16,6,-1,0,6,1,-1,8,0,9,-1,10,9,0,-1,3,4,16,-1,16,10,3,-1,4,15,6,-1,6,16,4,-1,15,11,1,-1,1,6,15,-1,11,8,0,-1,0,1,11,-1,7,14,8,-1,7,18,14,-1,18,3,14,-1,18,2,3,-1,8,14,9,-1,9,0,8,-1,14,3,10,-1,10,9,14,-1})
                    .setCoord(new Coordinate().setUSE("Post_9"))
                    .setNormal(new Normal().setUSE("Post_10")))))
              .addChild(new Billboard().setAxisOfRotation(0.0,0.0,0.0)
                .addChild(new Transform("LightOnWhiteGlow").setRotation(-1.0,0.0,0.0,-1.57079).setTranslation(0.0,0.0,-5.0E-5)
                  .setIS(new IS()
                    .addConnect(new connect().setNodeField("scale").setProtoField("LightGlow")))
                  .addChild(new Shape()
                    .setAppearance(new Appearance()
                      .setMaterial(new Material().setAmbientIntensity(0.0).setDiffuseColor(0.752941,0.752941,0.752941).setEmissiveColor(0.752941,0.752941,0.752941).setShininess(0.145).setTransparency(0.1))
                      .setTexture(new ImageTexture().setUrl(new String[] {"Textures/LightOnWhiteGlow.png","https://www.web3d.org/x3d/content/examples/Savage/HarborEquipment/NavigationAids/Textures/LightOnWhiteGlow.png"})))
                    .setGeometry(new IndexedFaceSet().setCoordIndex(new int[] {2,0,3,-1,1,3,0,-1}).setNormalIndex(new int[] {0,0,0,-1,0,0,0,-1}).setTexCoordIndex(new int[] {2,0,3,-1,1,3,0,-1})
                      .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {-0.5,0.0,0.5,0.5,0.0,0.5,-0.5,0.0,-0.5,0.5,0.0,-0.5})))
                      .setNormal(new Normal().setVector(new MFVec3f(new double[] {0.0,1.0,0.0})))
                      .setTexCoord(new TextureCoordinate().setPoint(new MFVec2f(new double[] {0.0,0.0,1.0,0.0,0.0,1.0,1.0,1.0}))))))))))))
    .addChild(new ProtoInstance("LightPost").setContainerField("children")));
            }
            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 LightPostPrototype 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 LightPostPrototype().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.HarborEquipment.NavigationAids.LightPostPrototype\" 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.HarborEquipment.NavigationAids.LightPostPrototype self-validation test confirmation: ");
                if (!validationResults.equals("success"))
                    System.out.println();
                System.out.println(validationResults.trim());

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