package Savage.ShipsMilitary.PatrolCraftNavalAcademyBrazil; /* Copyright (c) 1995-2019 held by the author(s). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Web3D Consortium (http://www.web3D.org) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import java.util.*; import org.web3d.x3d.jsail.Core.*; import org.web3d.x3d.jsail.fields.*; import org.web3d.x3d.jsail.Geometry3D.*; import org.web3d.x3d.jsail.Navigation.*; import org.web3d.x3d.jsail.Rendering.*; import org.web3d.x3d.jsail.Shape.*; // Javadoc annotations follow, see below for source. /** *

Brazilian Naval Academy Training Ship.

Related links: NavigationLights.java source, NavigationLights catalog page, X3D Resources, X3D Scene Authoring Hints, and X3D Tooltips.

meta tags   Document Metadata
title NavigationLights.x3d
description Brazilian Naval Academy Training Ship
creator Claudio Coreixas
created 20 October 2009
modified 13 November 2009
reference http://www.en.mar.mil.br
subject ships parts
identifier https://savage.nps.edu/Savage/ShipsMilitary/PatrolCraft-NavalAcademy-Brazil/NavigationLights.x3d
generator X3D-Edit, https://savage.nps.edu/X3D-Edit
license ../../license.html
 

This program uses the X3D Java Scene Access Interface Library (X3DJSAIL). It has been produced using the X3dToJava.xslt stylesheet to create Java source code from an .x3d model.

* @author Claudio Coreixas */ public class NavigationLights { /** Default constructor to create this object. */ public NavigationLights () { initialize(); } /** Create and initialize the X3D model for this object. */ public final void initialize() { x3dModel = new X3DObject().setProfile(X3DObject.PROFILE_INTERCHANGE).setVersion(X3DObject.VERSION_3_2) .setHead(new headObject() .addMeta(new metaObject().setName(metaObject.NAME_TITLE ).setContent("NavigationLights.x3d")) .addMeta(new metaObject().setName(metaObject.NAME_DESCRIPTION).setContent("Brazilian Naval Academy Training Ship")) .addMeta(new metaObject().setName(metaObject.NAME_CREATOR ).setContent("Claudio Coreixas")) .addMeta(new metaObject().setName(metaObject.NAME_CREATED ).setContent("20 October 2009")) .addMeta(new metaObject().setName(metaObject.NAME_MODIFIED ).setContent("13 November 2009")) .addMeta(new metaObject().setName(metaObject.NAME_REFERENCE ).setContent("http://www.en.mar.mil.br")) .addMeta(new metaObject().setName(metaObject.NAME_SUBJECT ).setContent("ships parts")) .addMeta(new metaObject().setName(metaObject.NAME_IDENTIFIER ).setContent("https://savage.nps.edu/Savage/ShipsMilitary/PatrolCraft-NavalAcademy-Brazil/NavigationLights.x3d")) .addMeta(new metaObject().setName(metaObject.NAME_GENERATOR ).setContent("X3D-Edit, https://savage.nps.edu/X3D-Edit")) .addMeta(new metaObject().setName(metaObject.NAME_LICENSE ).setContent("../../license.html"))) .setScene(new SceneObject() .addChild(new ViewpointObject("basic").setDescription("basic view").setPosition(6.0f,1.9f,6.0f)) .addChild(new NavigationInfoObject().setHeadlight(false).setType(new String[] {"EXAMINE"})) .addChild(new ShapeObject("stbSideLightGray") .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setDiffuseColor(0.82f,0.78f,0.74f))) .setGeometry(new IndexedFaceSetObject("stbSideLightGrayIFS").setDEF("stbSideLightGrayIFS").setCreaseAngle(1.5f).setSolid(false).setCoordIndex(new int[] {1,12,11,0,-1,1,2,13,0,-1,2,3,13,-1,3,4,5,13,-1,5,6,13,-1,13,6,7,-1,13,7,8,9,-1,13,9,10,-1,13,10,11,0,-1}) .setCoord(new CoordinateObject("stbSideLightGrayCOORD").setPoint(new MFVec3fObject(new float[] {5.9f,1.9f,1.001f,5.9f,1.9f,1.1f,6.1f,1.9f,1.1f,6.138f,1.9f,1.092f,6.171f,1.9f,1.071f,6.192f,1.9f,1.038f,6.2f,1.9f,1.001f,6.192f,1.938f,1.001f,6.171f,1.971f,1.001f,6.138f,1.971f,1.001f,6.100f,1.971f,1.001f,5.9f,1.971f,1.001f,5.9f,1.971f,1.1f,6.1f,1.9f,1.001f}))))) .addChild(new ShapeObject("stbSideLightBlack") .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setDiffuseColor(0.0f,0.0f,0.0f))) .setGeometry(new IndexedFaceSetObject("stbSideLightBlackIFS").setDEF("stbSideLightBlackIFS").setCreaseAngle(1.5f).setSolid(false).setCoordIndex(new int[] {1,12,11,0,-1,1,2,13,0,-1,2,3,13,-1,3,4,5,13,-1,5,6,13,-1,13,6,7,-1,13,7,8,9,-1,13,9,10,-1,13,10,11,0,-1}) .setCoord(new CoordinateObject("stbSideLightBlackCOORD").setPoint(new MFVec3fObject(new float[] {5.901f,1.901f,1.002f,5.901f,1.901f,1.100f,6.100f,1.901f,1.100f,6.138f,1.901f,1.092f,6.171f,1.901f,1.071f,6.192f,1.901f,1.038f,6.200f,1.901f,1.002f,6.192f,1.938f,1.002f,6.171f,1.971f,1.002f,6.138f,1.971f,1.002f,6.100f,1.971f,1.002f,5.901f,1.971f,1.002f,5.901f,1.971f,1.100f,6.100f,1.901f,1.002f}))))) .addChild(new ShapeObject("stbSideLightBulbDome") .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setAmbientIntensity(0.04f).setDiffuseColor(0.0f,0.419608f,0.094118f).setShininess(0.09f))) .setGeometry(new IndexedFaceSetObject("stbSideLightBulbDomeIFS").setDEF("stbSideLightBulbDomeIFS").setCreaseAngle(1.5f).setSolid(false).setCoordIndex(new int[] {0,1,15,-1,1,2,14,15,-1,2,3,13,14,-1,3,4,12,13,-1,4,5,11,12,-1,5,6,10,11,-1,6,7,9,10,-1,7,8,9,-1,16,17,31,-1,17,18,30,31,-1,18,19,29,30,-1,19,20,28,29,-1,20,21,27,28,-1,21,22,26,27,-1,22,23,25,26,-1,23,24,25,-1,33,36,42,32,-1,41,34,35,47,-1,0,16,17,1,-1,1,17,18,2,-1,2,18,19,3,-1,3,19,20,4,-1,4,20,21,5,-1,5,21,22,6,-1,6,22,23,7,-1,7,23,24,8,-1,8,24,25,9,-1,9,25,26,10,-1,10,26,27,11,-1,11,41,40,12,-1,12,40,39,13,-1,13,39,38,14,-1,14,38,37,15,-1,15,37,36,0,-1,47,27,28,46,-1,46,28,29,45,-1,45,29,30,44,-1,44,30,31,43,-1,43,31,0,42,-1}) .setCoord(new CoordinateObject("stbSideLightBulbDomeCOORD").setPoint(getstbSideLightBulbDomeCOORD_5_26_point())))) .addChild(new ShapeObject("stbSideLightBulbGlass") .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setAmbientIntensity(1f).setDiffuseColor(0.062745f,0.780392f,0.0f).setEmissiveColor(0.101961f,0.6f,0.0f).setShininess(0.46f))) .setGeometry(new IndexedFaceSetObject("stbSideLightBulbGlassIFS").setDEF("stbSideLightBulbGlassIFS").setCreaseAngle(1.5f).setSolid(false).setCoordIndex(new int[] {41,47,46,40,-1,40,46,45,39,-1,39,45,44,38,-1,38,44,43,37,-1,37,43,42,36,-1}) .setCoord(new CoordinateObject("stbSideLightBulbGlassCOORD").setPoint(getstbSideLightBulbGlassCOORD_5_31_point())))) .addChild(new ShapeObject("portSideLightGray") .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setDiffuseColor(0.82f,0.78f,0.74f))) .setGeometry(new IndexedFaceSetObject("portSideLightGrayIFS").setDEF("portSideLightGrayIFS").setCreaseAngle(1.5f).setSolid(false).setCoordIndex(new int[] {1,12,11,0,-1,1,2,13,0,-1,2,3,13,-1,3,4,5,13,-1,5,6,13,-1,13,6,7,-1,13,7,8,9,-1,13,9,10,-1,13,10,11,0,-1}) .setCoord(new CoordinateObject("portSideLightGrayCOORD").setPoint(new MFVec3fObject(new float[] {5.900f,1.900f,-1.001f,5.900f,1.900f,-1.100f,6.100f,1.900f,-1.100f,6.138f,1.900f,-1.092f,6.171f,1.900f,-1.071f,6.192f,1.900f,-1.038f,6.200f,1.900f,-1.001f,6.192f,1.938f,-1.001f,6.171f,1.971f,-1.001f,6.138f,1.971f,-1.001f,6.100f,1.971f,-1.001f,5.900f,1.971f,-1.001f,5.900f,1.971f,-1.100f,6.100f,1.900f,-1.001f}))))) .addChild(new ShapeObject("portSideLightBlack") .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setDiffuseColor(0.0f,0.0f,0.0f))) .setGeometry(new IndexedFaceSetObject("portSideLightBlackIFS").setDEF("portSideLightBlackIFS").setCreaseAngle(1.5f).setSolid(false).setCoordIndex(new int[] {1,12,11,0,-1,1,2,13,0,-1,2,3,13,-1,3,4,5,13,-1,5,6,13,-1,13,6,7,-1,13,7,8,9,-1,13,9,10,-1,13,10,11,0,-1}) .setCoord(new CoordinateObject("portSideLightBlackCOORD").setPoint(new MFVec3fObject(new float[] {5.901f,1.901f,-1.002f,5.901f,1.901f,-1.100f,6.100f,1.901f,-1.100f,6.138f,1.901f,-1.092f,6.171f,1.901f,-1.071f,6.192f,1.901f,-1.038f,6.200f,1.901f,-1.002f,6.192f,1.938f,-1.002f,6.171f,1.971f,-1.002f,6.138f,1.971f,-1.002f,6.100f,1.971f,-1.002f,5.901f,1.971f,-1.002f,5.901f,1.971f,-1.100f,6.100f,1.901f,-1.002f}))))) .addChild(new ShapeObject("portSideLightBulbDome") .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setAmbientIntensity(0.04f).setDiffuseColor(0.639216f,0.0f,0.039216f).setShininess(0.09f))) .setGeometry(new IndexedFaceSetObject("portSideLightBulbDomeIFS").setDEF("portSideLightBulbDomeIFS").setCreaseAngle(1.5f).setSolid(false).setCoordIndex(new int[] {0,1,15,-1,1,2,14,15,-1,2,3,13,14,-1,3,4,12,13,-1,4,5,11,12,-1,5,6,10,11,-1,6,7,9,10,-1,7,8,9,-1,16,17,31,-1,17,18,30,31,-1,18,19,29,30,-1,19,20,28,29,-1,20,21,27,28,-1,21,22,26,27,-1,22,23,25,26,-1,23,24,25,-1,33,36,42,32,-1,41,34,35,47,-1,0,16,17,1,-1,1,17,18,2,-1,2,18,19,3,-1,3,19,20,4,-1,4,20,21,5,-1,5,21,22,6,-1,6,22,23,7,-1,7,23,24,8,-1,8,24,25,9,-1,9,25,26,10,-1,10,26,27,11,-1,11,41,40,12,-1,12,40,39,13,-1,13,39,38,14,-1,14,38,37,15,-1,15,37,36,0,-1,47,27,28,46,-1,46,28,29,45,-1,45,29,30,44,-1,44,30,31,43,-1,43,31,0,42,-1}) .setCoord(new CoordinateObject("portSideLightBulbDomeCOORD").setPoint(new MFVec3fObject(new float[] {6.010f,1.980f,-1.050f,6.007f,1.980f,-1.035f,5.998f,1.980f,-1.022f,5.985f,1.980f,-1.013f,5.970f,1.980f,-1.010f,5.955f,1.980f,-1.013f,5.942f,1.980f,-1.022f,5.933f,1.980f,-1.035f,5.930f,1.980f,-1.050f,5.933f,1.980f,-1.065f,5.942f,1.980f,-1.078f,5.955f,1.980f,-1.087f,5.970f,1.980f,-1.090f,5.985f,1.980f,-1.087f,5.998f,1.980f,-1.078f,6.007f,1.980f,-1.065f,6.010f,1.901f,-1.050f,6.007f,1.901f,-1.035f,5.998f,1.901f,-1.022f,5.985f,1.901f,-1.013f,5.970f,1.901f,-1.010f,5.955f,1.901f,-1.013f,5.942f,1.901f,-1.022f,5.933f,1.901f,-1.035f,5.930f,1.901f,-1.050f,5.933f,1.901f,-1.065f,5.942f,1.901f,-1.078f,5.955f,1.901f,-1.087f,5.970f,1.901f,-1.090f,5.985f,1.901f,-1.087f,5.998f,1.901f,-1.078f,6.007f,1.901f,-1.065f,6.025f,1.915f,-1.050f,6.025f,1.965f,-1.050f,5.949f,1.965f,-1.101f,5.949f,1.915f,-1.101f,6.010f,1.965f,-1.050f,6.007f,1.965f,-1.065f,5.998f,1.965f,-1.078f,5.985f,1.965f,-1.087f,5.970f,1.965f,-1.090f,5.955f,1.965f,-1.087f,6.010f,1.915f,-1.050f,6.007f,1.915f,-1.065f,5.998f,1.915f,-1.078f,5.985f,1.915f,-1.087f,5.970f,1.915f,-1.090f,5.955f,1.915f,-1.087f}))))) .addChild(new ShapeObject("portSideLightBulbGlass") .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setAmbientIntensity(1f).setDiffuseColor(1.0f,0.12549f,0.101961f).setEmissiveColor(1.0f,0.121569f,0.121569f).setShininess(0.58f).setTransparency(0.13f))) .setGeometry(new IndexedFaceSetObject("portSideLightBulbGlassIFS").setDEF("portSideLightBulbGlassIFS").setCreaseAngle(1.5f).setSolid(false).setCoordIndex(new int[] {41,47,46,40,-1,40,46,45,39,-1,39,45,44,38,-1,38,44,43,37,-1,37,43,42,36,-1}) .setCoord(new CoordinateObject("portSideLightBulbGlassCOORD").setPoint(new MFVec3fObject(new float[] {6.010f,1.980f,-1.050f,6.007f,1.980f,-1.035f,5.998f,1.980f,-1.022f,5.985f,1.980f,-1.013f,5.970f,1.980f,-1.010f,5.955f,1.980f,-1.013f,5.942f,1.980f,-1.022f,5.933f,1.980f,-1.035f,5.930f,1.980f,-1.050f,5.933f,1.980f,-1.065f,5.942f,1.980f,-1.078f,5.955f,1.980f,-1.087f,5.970f,1.980f,-1.090f,5.985f,1.980f,-1.087f,5.998f,1.980f,-1.078f,6.007f,1.980f,-1.065f,6.010f,1.901f,-1.050f,6.007f,1.901f,-1.035f,5.998f,1.901f,-1.022f,5.985f,1.901f,-1.013f,5.970f,1.901f,-1.010f,5.955f,1.901f,-1.013f,5.942f,1.901f,-1.022f,5.933f,1.901f,-1.035f,5.930f,1.901f,-1.050f,5.933f,1.901f,-1.065f,5.942f,1.901f,-1.078f,5.955f,1.901f,-1.087f,5.970f,1.901f,-1.090f,5.985f,1.901f,-1.087f,5.998f,1.901f,-1.078f,6.007f,1.901f,-1.065f,6.025f,1.915f,-1.050f,6.025f,1.965f,-1.050f,5.949f,1.965f,-1.101f,5.949f,1.915f,-1.101f,6.010f,1.965f,-1.050f,6.007f,1.965f,-1.065f,5.998f,1.965f,-1.078f,5.985f,1.965f,-1.087f,5.970f,1.965f,-1.090f,5.955f,1.965f,-1.087f,6.010f,1.915f,-1.050f,6.007f,1.915f,-1.065f,5.998f,1.915f,-1.078f,5.985f,1.915f,-1.087f,5.970f,1.915f,-1.090f,5.955f,1.915f,-1.087f,0.0f,0.0f,0.0f})))))); } // end of initialize() method /** Large attribute array: Coordinate DEF='stbSideLightBulbDomeCOORD' point field, scene-graph level=5, element #26, 144 total numbers made up of 48 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 MFVec3fObject getstbSideLightBulbDomeCOORD_5_26_point() { MFVec3fObject stbSideLightBulbDomeCOORD_5_26_point = new MFVec3fObject(new float[] {6.010f,1.98f,1.050f,6.007f,1.98f,1.035f,5.998f,1.98f,1.022f,5.985f,1.98f,1.013f,5.970f,1.98f,1.010f,5.955f,1.98f,1.013f,5.942f,1.98f,1.022f,5.933f,1.98f,1.035f,5.930f,1.98f,1.050f,5.933f,1.98f,1.065f,5.942f,1.98f,1.078f,5.955f,1.98f,1.087f,5.970f,1.98f,1.090f,5.985f,1.98f,1.087f,5.998f,1.98f,1.078f,6.007f,1.98f,1.065f,6.01f,1.901f,1.05f,6.007f,1.901f,1.03470002f,5.998f,1.901f,1.021726993f,5.985f,1.901f,1.013053968f,5.970f,1.901f,1.010000013f,5.955f,1.901f,1.0130296f,5.942f,1.901f,1.021681964f,5.933f,1.901f,1.034641178f,5.930f,1.901f,1.049936294f,5.933f,1.901f,1.065241099f,5.942f,1.901f,1.078227906f,5.955f,1.901f,1.086921571f,5.970f,1.901f,1.089999886f,5.985f,1.901f,1.086994674f,5.998f,1.901f,1.078362994f,6.007f,1.901f,1.065417625f,6.025f,1.915f,1.05f,6.025f,1.965f,1.05f,5.948841186f,1.965f,1.10076716f,5.948841186f,1.915f,1.10076716f,6.01f,1.965f,1.05f,6.006909305f,1.965f,1.065417625f,5.998205329f,1.965f,1.078362994f,5.985211644f,1.965f,1.086994674f,5.969904441f,1.965f,1.089999886f,5.954611771f,1.965f,1.086921571f,6.01f,1.915f,1.05f,6.006909305f,1.915f,1.065417625f,5.998205329f,1.915f,1.078362994f,5.985211644f,1.915f,1.086994674f,5.969904441f,1.915f,1.089999886f,5.954611771f,1.915f,1.086921571f}); return stbSideLightBulbDomeCOORD_5_26_point; } /** Large attribute array: Coordinate DEF='stbSideLightBulbGlassCOORD' point field, scene-graph level=5, element #31, 147 total numbers made up of 49 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 MFVec3fObject getstbSideLightBulbGlassCOORD_5_31_point() { MFVec3fObject stbSideLightBulbGlassCOORD_5_31_point = new MFVec3fObject(new float[] {6.010f,1.98f,1.050f,6.007f,1.98f,1.035f,5.998f,1.98f,1.022f,5.985f,1.98f,1.013f,5.970f,1.98f,1.010f,5.955f,1.98f,1.013f,5.942f,1.98f,1.022f,5.933f,1.98f,1.035f,5.930f,1.98f,1.050f,5.933f,1.98f,1.065f,5.942f,1.98f,1.078f,5.955f,1.98f,1.087f,5.970f,1.98f,1.090f,5.985f,1.98f,1.087f,5.998f,1.98f,1.078f,6.007f,1.98f,1.065f,6.01f,1.901f,1.05f,6.007f,1.901f,1.03470002f,5.998f,1.901f,1.021726993f,5.985f,1.901f,1.013053968f,5.970f,1.901f,1.010000013f,5.955f,1.901f,1.0130296f,5.942f,1.901f,1.021681964f,5.933f,1.901f,1.034641178f,5.930f,1.901f,1.049936294f,5.933f,1.901f,1.065241099f,5.942f,1.901f,1.078227906f,5.955f,1.901f,1.086921571f,5.970f,1.901f,1.089999886f,5.985f,1.901f,1.086994674f,5.998f,1.901f,1.078362994f,6.007f,1.901f,1.065417625f,6.025f,1.915f,1.05f,6.025f,1.965f,1.05f,5.948841186f,1.965f,1.10076716f,5.948841186f,1.915f,1.10076716f,6.01f,1.965f,1.05f,6.006909305f,1.965f,1.065417625f,5.998205329f,1.965f,1.078362994f,5.985211644f,1.965f,1.086994674f,5.969904441f,1.965f,1.089999886f,5.954611771f,1.965f,1.086921571f,6.01f,1.915f,1.05f,6.006909305f,1.915f,1.065417625f,5.998205329f,1.915f,1.078362994f,5.985211644f,1.915f,1.086994674f,5.969904441f,1.915f,1.089999886f,5.954611771f,1.915f,1.086921571f,0.0f,0.0f,0.0f}); return stbSideLightBulbGlassCOORD_5_31_point; } /** The initialized model object, created within initialize() method. */ private X3DObject x3dModel; /** Provide a * shallow copy * of the X3D model. * @see X3DObject * @return NavigationLights model */ public X3DObject 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 X3DObject.handleArguments(args) * @see X3DObject.validationReport() * @see CommandLine * @see CommandLine.USAGE * @see ConfigurationProperties */ public static void main(String args[]) { X3DObject thisExampleX3dObject = new NavigationLights().getX3dModel(); 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(X3DObject.FILE_EXTENSION_X3D) || arg.toLowerCase().endsWith(X3DObject.FILE_EXTENSION_CLASSICVRML) || arg.toLowerCase().endsWith(X3DObject.FILE_EXTENSION_X3DB) || arg.toLowerCase().endsWith(X3DObject.FILE_EXTENSION_VRML97) || arg.toLowerCase().endsWith(X3DObject.FILE_EXTENSION_EXI) || arg.toLowerCase().endsWith(X3DObject.FILE_EXTENSION_GZIP) || arg.toLowerCase().endsWith(X3DObject.FILE_EXTENSION_ZIP) || arg.toLowerCase().endsWith(X3DObject.FILE_EXTENSION_HTML) || arg.toLowerCase().endsWith(X3DObject.FILE_EXTENSION_XHTML)) { argumentsLoadNewModel = true; fileName = arg; } } } if (argumentsLoadNewModel) System.out.println("WARNING: \"NavigationLights\" 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 thisExampleX3dObject.handleArguments(args); if (validate) { System.out.print("Java program \"NavigationLights\" self-validation test results: "); String validationResults = thisExampleX3dObject.validationReport(); System.out.println(validationResults); } } }