package X3dForAdvancedModeling.GeometricShapes;

/*
Copyright (c) 1995-2022 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 (https://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 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.Navigation.*;
import org.web3d.x3d.jsail.Rendering.*;
import org.web3d.x3d.jsail.Shape.*;
import org.web3d.x3d.jsail.Text.*;

// Javadoc annotations follow, see below for Java source code.
/**
 * <p> RoundedRectangleComparison shows three RoundedRectangle shapes using polygons/lines/points rendering. Note that reuse of RoundedRectangle geometry requires only Interchange profile, but Text requires Immersive profile. </p>
 <p> Related links: <a href="../../../GeometricShapes/RoundedRectangleComparison.java">RoundedRectangleComparison.java</a> source, <a href="../../../GeometricShapes/RoundedRectangleComparisonIndex.html" target="_top">RoundedRectangleComparison catalog page</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="../../../GeometricShapes/RoundedRectangleComparison.x3d">RoundedRectangleComparison.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> description </i> </td>
			<td> RoundedRectangleComparison shows three RoundedRectangle shapes using polygons/lines/points rendering. Note that reuse of RoundedRectangle geometry requires only Interchange profile, but Text requires Immersive profile. </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 8 November 2014 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> modified </i> </td>
			<td> 20 October 2019 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> Image </i> </td>
			<td> <a href="../../../GeometricShapes/RoundedRectangleComparison.png">RoundedRectangleComparison.png</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="../../../GeometricShapes/RoundedRectanglePrimitives.x3d">RoundedRectanglePrimitives.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="../../../GeometricShapes/RoundedRectangle2D.x3d">RoundedRectangle2D.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> RoundedRectangleDesign.vsd </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> RoundedRectangleDesign.png </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="../../../GeometricShapes/RoundedRectangleDesign.svg">RoundedRectangleDesign.svg</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> Don Brutzman </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://en.wikipedia.org/wiki/Squircle" target="_blank">https://en.wikipedia.org/wiki/Squircle</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://en.wiktionary.org/wiki/roundrect" target="_blank">https://en.wiktionary.org/wiki/roundrect</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> info </i> </td>
			<td> Development of this scene added new features to X3D-Edit </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> identifier </i> </td>
			<td> <a href="https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/RoundedRectangleComparison.x3d" target="_blank">https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/RoundedRectangleComparison.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> generator </i> </td>
			<td> X3D-Edit 3.3, <a href="https://savage.nps.edu/X3D-Edit" target="_blank">https://savage.nps.edu/X3D-Edit</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> license </i> </td>
			<td> <a href="../../../GeometricShapes/../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 to create Java source code from an <code>.x3d</code> model.
	</p>

	* @author Don Brutzman
 */

public class RoundedRectangleComparison
{
	/** Default constructor to create this object. */
	public RoundedRectangleComparison ()
	{
	  initialize();
	}

	/** Create and initialize the X3D model for this object. */
	public final void initialize()
	{
  x3dModel = new X3D().setProfile(X3D.PROFILE_IMMERSIVE).setVersion(X3D.VERSION_3_3)
  .setHead(new head()
    .addMeta(new meta().setName(meta.NAME_TITLE      ).setContent("RoundedRectangleComparison.x3d"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("RoundedRectangleComparison shows three RoundedRectangle shapes using polygons/lines/points rendering. Note that reuse of RoundedRectangle geometry requires only Interchange profile, but Text requires Immersive profile."))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("8 November 2014"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("20 October 2019"))
    .addMeta(new meta().setName(meta.NAME_IMAGE      ).setContent("RoundedRectangleComparison.png"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("RoundedRectanglePrimitives.x3d"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("RoundedRectangle2D.x3d"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("RoundedRectangleDesign.vsd"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("RoundedRectangleDesign.png"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("RoundedRectangleDesign.svg"))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("Don Brutzman"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://en.wikipedia.org/wiki/Squircle"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("https://en.wiktionary.org/wiki/roundrect"))
    .addMeta(new meta().setName(meta.NAME_INFO       ).setContent("Development of this scene added new features to X3D-Edit"))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/RoundedRectangleComparison.x3d"))
    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit"))
    .addMeta(new meta().setName(meta.NAME_LICENSE    ).setContent("../license.html")))
  .setScene(new Scene()
    .addChild(new WorldInfo().setTitle("RoundedRectangleComparison.x3d"))
    .addChild(new Background().setSkyColor(new MFColor(new double[] {0.1,0.1,0.1})))
    .addChild(new Viewpoint().setDescription("RoundedRectangle Comparison").setPosition(0.0,0.0,7.0))
    .addChild(new Viewpoint().setDescription("Polygons RoundedRectangle").setPosition(-2.0,0.0,3.0))
    .addChild(new Viewpoint().setDescription("Lines RoundedRectangle").setPosition(0.0,0.0,3.0))
    .addChild(new Viewpoint().setDescription("Points RoundedRectangle").setPosition(2.0,0.0,3.0))
    .addChild(new Transform().setTranslation(-2.0,0.0,0.0)
      .addChild(new Shape("polygonsRoundedRectangle")
        .addComments(" RoundedRectangle with 44 perimeter points + 4 internal points on each level ")
        .setGeometry(new IndexedFaceSet().setCreaseAngle(6.28).setSolid(false).setCoordIndex(getIndexedFaceSet_5_25_coordIndex())
          .setCoord(new Coordinate("PointArray2x1x0.2").setPoint(getPointArray2x1x0_2_6_25_point())))
        .setAppearance(new Appearance()
          .addComments(" Polygon color is primarily defined by diffuseColor ")
          .setMaterial(new Material("PeriwinkleDiffuse").setDiffuseColor(0.8,0.8,1.0))))
      .addChild(new Transform().setTranslation(0.0,-1.5,0.0)
        .addChild(new Shape()
          .setGeometry(new Text().setString(new String[] {"Polygons"})
            .setFontStyle(new FontStyle("SmallCenteredFont").setFamily(new String[] {"SANS"}).setJustify(FontStyle.JUSTIFY_MIDDLE_MIDDLE).setSize(0.2).setCssStyle("BOLD")))
          .setAppearance(new Appearance()
            .setMaterial(new Material().setUSE("PeriwinkleDiffuse"))))))
    .addChild(new Shape("linesRoundedRectangle")
      .setGeometry(new IndexedLineSet().setCoordIndex(getIndexedLineSet_4_37_coordIndex())
        .setCoord(new Coordinate().setUSE("PointArray2x1x0.2")))
      .setAppearance(new Appearance()
        .addComments(" Line color is only! defined by emissiveColor ")
        .setMaterial(new Material("PeriwinkleEmissive").setEmissiveColor(0.8,0.8,1.0))))
    .addChild(new Transform().setTranslation(0.0,-1.5,0.0)
      .addChild(new Shape()
        .setGeometry(new Text().setString(new String[] {"Lines"})
          .setFontStyle(new FontStyle().setUSE("SmallCenteredFont")))
        .setAppearance(new Appearance()
          .setMaterial(new Material().setUSE("PeriwinkleDiffuse")))))
    .addChild(new Transform().setTranslation(2.0,0.0,0.0)
      .addChild(new Shape("pointsRoundedRectangle")
        .setGeometry(new PointSet()
          .setCoord(new Coordinate().setUSE("PointArray2x1x0.2")))
        .setAppearance(new Appearance()
          .addComments(" Point color is only! defined by emissiveColor ")
          .setMaterial(new Material().setUSE("PeriwinkleEmissive"))))
      .addChild(new Transform().setTranslation(0.0,-1.5,0.0)
        .addChild(new Shape()
          .setGeometry(new Text().setString(new String[] {"Points"})
            .setFontStyle(new FontStyle().setUSE("SmallCenteredFont")))
          .setAppearance(new Appearance()
            .setMaterial(new Material().setUSE("PeriwinkleDiffuse")))))));
    }
	// end of initialize() method

		/** Define subarrays using type int[] */
		private int[] getIndexedFaceSet_5_25_coordIndex_1()
		{
			int[] value = {0,1,2,3,0,-1,0,14,15,1,0,-1,1,25,26,2,1,-1,2,36,37,3,2,-1,3,47,4,0,3,-1,0,4,5,6,7,8,9,10,11,12,13,14,0,-1,1,15,16,17,18,19,20,21,22,23,24,25,1,-1,2,26,27,28,29,30,31,32,33,34,35,36,2,-1,3,37,38,39,40,41,42,43,44,45,46,47,3,-1,48,49,50,51,48,-1,48,62,63,49,48,-1,49,73,74,50,49,-1,50,84,85,51,50,-1,51,95,52,48,51,-1,48,52,53,54,55,56,57,58,59,60,61,62,48,-1,49,63,64,65,66,67,68,69,70,71,72,73,49,-1,50,74,75,76,77,78,79,80,81,82,83,84,50,-1,51,85,86,87,88,89,90,91,92,93,94,95,51,-1,5,4,52,53,-1,6,5,53,54,-1,7,6,54,55,-1,8,7,55,56,-1,9,8,56,57,-1,10,9,57,58,-1,11,10,58,59,-1,12,11,59,60,-1,13,12,60,61,-1,14,13,61,62,-1,15,14,62,63,-1,16,15,63,64,-1,17,16,64,65,-1,18,17,65,66,-1,19,18,66,67,-1,20,19,67,68,-1,21,20,68,69,-1,22,21,69,70,-1,23,22,70,71,-1,24,23,71,72,-1,25,24,72,73,-1,26,25,73,74,-1,27,26,74,75,-1,28,27,75,76,-1,29,28,76,77,-1,30,29,77,78,-1,31,30,78,79,-1,32,31,79,80,-1,33,32,80,81,-1,34,33,81,82,-1,35,34,82,83,-1,36,35,83,84,-1,37,36,84,85,-1,38,37,85,86,-1,39,38,86,87,-1,40,39,87,88,-1,41,40,88,89,-1,42,41,89,90,-1,43,42,90,91,-1,44,43,91,92,-1,45,44,92,93,-1,46,45,93,94,-1,47,46,94,95,-1,47,95,52,4,-1};
			return value;
		}



		/** Define subarrays using type int[] */
		private int[] getIndexedLineSet_4_37_coordIndex_1()
		{
			int[] value = {0,1,2,3,0,-1,0,14,15,1,0,-1,1,25,26,2,1,-1,2,36,37,3,2,-1,3,47,4,0,3,-1,0,4,5,6,7,8,9,10,11,12,13,14,0,-1,1,15,16,17,18,19,20,21,22,23,24,25,1,-1,2,26,27,28,29,30,31,32,33,34,35,36,2,-1,3,37,38,39,40,41,42,43,44,45,46,47,3,-1,48,49,50,51,48,-1,48,62,63,49,48,-1,49,73,74,50,49,-1,50,84,85,51,50,-1,51,95,52,48,51,-1,48,52,53,54,55,56,57,58,59,60,61,62,48,-1,49,63,64,65,66,67,68,69,70,71,72,73,49,-1,50,74,75,76,77,78,79,80,81,82,83,84,50,-1,51,85,86,87,88,89,90,91,92,93,94,95,51,-1,5,4,52,53,-1,6,5,53,54,-1,7,6,54,55,-1,8,7,55,56,-1,9,8,56,57,-1,10,9,57,58,-1,11,10,58,59,-1,12,11,59,60,-1,13,12,60,61,-1,14,13,61,62,-1,15,14,62,63,-1,16,15,63,64,-1,17,16,64,65,-1,18,17,65,66,-1,19,18,66,67,-1,20,19,67,68,-1,21,20,68,69,-1,22,21,69,70,-1,23,22,70,71,-1,24,23,71,72,-1,25,24,72,73,-1,26,25,73,74,-1,27,26,74,75,-1,28,27,75,76,-1,29,28,76,77,-1,30,29,77,78,-1,31,30,78,79,-1,32,31,79,80,-1,33,32,80,81,-1,34,33,81,82,-1,35,34,82,83,-1,36,35,83,84,-1,37,36,84,85,-1,38,37,85,86,-1,39,38,86,87,-1,40,39,87,88,-1,41,40,88,89,-1,42,41,89,90,-1,43,42,90,91,-1,44,43,91,92,-1,45,44,92,93,-1,46,45,93,94,-1,47,46,94,95,-1,47,95,52,4,-1};
			return value;
		}

		/** Large attribute array: IndexedFaceSet coordIndex field, scene-graph level=5, element #25, 392 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_5_25_coordIndex()
		{
			MFInt32 IndexedFaceSet_5_25_coordIndex = new MFInt32()/*2.finalize*/
				.append(new MFInt32(getIndexedFaceSet_5_25_coordIndex_1()));
			return IndexedFaceSet_5_25_coordIndex;
		}
		/** Large attribute array: Coordinate DEF='PointArray2x1x0.2' point field, scene-graph level=6, element #25, 288 total numbers made up of 96 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 getPointArray2x1x0_2_6_25_point()
		{
			MFVec3f PointArray2x1x0_2_6_25_point = new MFVec3f(new double[] {0.450,0.900,0.100,0.450,-0.900,0.100,-0.450,-0.900,0.100,-0.450,0.900,0.100,0.450,1.000,0.100,0.466,0.999,0.100,0.481,0.995,0.100,0.495,0.989,0.100,0.509,0.981,0.100,0.521,0.971,0.100,0.531,0.959,0.100,0.539,0.945,0.100,0.545,0.931,0.100,0.549,0.916,0.100,0.550,0.900,0.100,0.550,-0.900,0.100,0.549,-0.916,0.100,0.545,-0.931,0.100,0.539,-0.945,0.100,0.531,-0.959,0.100,0.521,-0.971,0.100,0.509,-0.981,0.100,0.495,-0.989,0.100,0.481,-0.995,0.100,0.466,-0.999,0.100,0.450,-1.000,0.100,-0.450,-1.000,0.100,-0.466,-0.999,0.100,-0.481,-0.995,0.100,-0.495,-0.989,0.100,-0.509,-0.981,0.100,-0.521,-0.971,0.100,-0.531,-0.959,0.100,-0.539,-0.945,0.100,-0.545,-0.931,0.100,-0.549,-0.916,0.100,-0.550,-0.900,0.100,-0.550,0.900,0.100,-0.549,0.916,0.100,-0.545,0.931,0.100,-0.539,0.945,0.100,-0.531,0.959,0.100,-0.521,0.971,0.100,-0.509,0.981,0.100,-0.495,0.989,0.100,-0.481,0.995,0.100,-0.466,0.999,0.100,-0.450,1.000,0.100,0.450,0.900,-0.100,0.450,-0.900,-0.100,-0.450,-0.900,-0.100,-0.450,0.900,-0.100,0.450,1.000,-0.100,0.466,0.999,-0.100,0.481,0.995,-0.100,0.495,0.989,-0.100,0.509,0.981,-0.100,0.521,0.971,-0.100,0.531,0.959,-0.100,0.539,0.945,-0.100,0.545,0.931,-0.100,0.549,0.916,-0.100,0.550,0.900,-0.100,0.550,-0.900,-0.100,0.549,-0.916,-0.100,0.545,-0.931,-0.100,0.539,-0.945,-0.100,0.531,-0.959,-0.100,0.521,-0.971,-0.100,0.509,-0.981,-0.100,0.495,-0.989,-0.100,0.481,-0.995,-0.100,0.466,-0.999,-0.100,0.450,-1.000,-0.100,-0.450,-1.000,-0.100,-0.466,-0.999,-0.100,-0.481,-0.995,-0.100,-0.495,-0.989,-0.100,-0.509,-0.981,-0.100,-0.521,-0.971,-0.100,-0.531,-0.959,-0.100,-0.539,-0.945,-0.100,-0.545,-0.931,-0.100,-0.549,-0.916,-0.100,-0.550,-0.900,-0.100,-0.550,0.900,-0.100,-0.549,0.916,-0.100,-0.545,0.931,-0.100,-0.539,0.945,-0.100,-0.531,0.959,-0.100,-0.521,0.971,-0.100,-0.509,0.981,-0.100,-0.495,0.989,-0.100,-0.481,0.995,-0.100,-0.466,0.999,-0.100,-0.450,1.000,-0.100});
			return PointArray2x1x0_2_6_25_point;
		}
		/** Large attribute array: IndexedLineSet coordIndex field, scene-graph level=4, element #37, 392 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 getIndexedLineSet_4_37_coordIndex()
		{
			MFInt32 IndexedLineSet_4_37_coordIndex = new MFInt32()/*2.finalize*/
				.append(new MFInt32(getIndexedLineSet_4_37_coordIndex_1()));
			return IndexedLineSet_4_37_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 RoundedRectangleComparison 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[])
    {
        X3D thisExampleX3dModel = new RoundedRectangleComparison().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(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: \"X3dForAdvancedModeling.GeometricShapes.RoundedRectangleComparison\" 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.print("Java program \"X3dForAdvancedModeling.GeometricShapes.RoundedRectangleComparison\" self-validation test results: ");
			String validationResults = thisExampleX3dModel.validationReport();
            if (validationResults.startsWith("\n"))
                System.out.println();
			System.out.println(validationResults.trim());
		}
    }
}
