package Savage.ShipsMilitary.CarrierSaratogaUnitedStates; /* 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.Grouping.*; import org.web3d.x3d.jsail.Navigation.*; import org.web3d.x3d.jsail.Shape.*; // Javadoc annotations follow, see below for source. /** *

This is the lowest detail hull - dimensions are extracted from photos.

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

meta tags   Document Metadata
title hull05.x3d
description This is the lowest detail hull - dimensions are extracted from photos.
creator Keith Jude Ho
created 15 February 2001
modified 14 January 2014
identifier https://savage.nps.edu/Savage/ShipsMilitary/Carrier-Saratoga-UnitedStates/hull05.x3d
generator X3D-Edit 3.2, 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 Keith Jude Ho */ public class hull05 { /** Default constructor to create this object. */ public hull05 () { initialize(); } /** Create and initialize the X3D model for this object. */ public final void initialize() { x3dModel = new X3DObject().setProfile(X3DObject.PROFILE_IMMERSIVE).setVersion(X3DObject.VERSION_3_0) .setHead(new headObject() .addMeta(new metaObject().setName(metaObject.NAME_TITLE ).setContent("hull05.x3d")) .addMeta(new metaObject().setName(metaObject.NAME_DESCRIPTION).setContent("This is the lowest detail hull - dimensions are extracted from photos.")) .addMeta(new metaObject().setName(metaObject.NAME_CREATOR ).setContent("Keith Jude Ho")) .addMeta(new metaObject().setName(metaObject.NAME_CREATED ).setContent("15 February 2001")) .addMeta(new metaObject().setName(metaObject.NAME_MODIFIED ).setContent("14 January 2014")) .addMeta(new metaObject().setName(metaObject.NAME_IDENTIFIER ).setContent("https://savage.nps.edu/Savage/ShipsMilitary/Carrier-Saratoga-UnitedStates/hull05.x3d")) .addMeta(new metaObject().setName(metaObject.NAME_GENERATOR ).setContent("X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit")) .addMeta(new metaObject().setName(metaObject.NAME_LICENSE ).setContent("../../license.html"))) .setScene(new SceneObject() .addChild(new ViewpointObject().setPosition(10.0f,0.0f,80.0f)) .addChild(new TransformObject() .addChild(new GroupObject() .addChild(new TransformObject() .addComments(" Front Left Of Carrier ") .addChild(new TransformObject().setRotation(0.0f,0.0f,1.0f,-1.57f).setTranslation(-0.1f,0.0f,20.0f) .addChild(new ShapeObject() .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject("GRAY").setDiffuseColor(0.7f,0.7f,0.7f).setShininess(0.3f))) .setGeometry(new ExtrusionObject().setBeginCap(false).setCrossSection(new MFVec2fObject(new float[] {0.0f,0.0f,5.0f,-5.0f,15.0f,-5.0f})).setEndCap(false).setScale(new MFVec2fObject(new float[] {1.0f,1.0f,1.0f,0.9f,1.0f,0.8f,1.0f,0.7f,1.0f,0.6f,1.0f,0.5f,1.0f,0.4f,1.0f,0.3f,1.0f,0.2f,1.0f,0.1f,1.0f,0.01f,1.0f,0.01f,1.0f,0.01f,1.0f,0.01f,1.0f,0.01f})).setSolid(false).setSpine(new MFVec3fObject(new float[] {0.0f,0.0f,0.0f,0.0f,5.0f,0.0f,0.0f,10.0f,0.0f,0.0f,15.0f,0.0f,0.0f,20.0f,0.0f,0.0f,25.0f,0.0f,0.0f,30.0f,0.0f,0.0f,35.0f,0.0f,0.0f,40.0f,0.0f,0.0f,45.0f,0.0f,0.0f,50.0f,0.0f,0.0f,55.0f,0.0f,0.0f,60.0f,0.0f,0.0f,65.0f,0.0f,0.0f,70.0f,0.0f})))))) .addChild(new TransformObject() .addComments(" Front Right Of Ship ") .addChild(new TransformObject().setRotation(0.0f,0.0f,1.0f,-1.57f).setTranslation(-0.1f,0.0f,-20.0f) .addChild(new ShapeObject() .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setUSE("GRAY"))) .setGeometry(new ExtrusionObject().setBeginCap(false).setCrossSection(new MFVec2fObject(new float[] {0.0f,0.0f,5.0f,5.0f,15.0f,5.0f})).setEndCap(false).setScale(new MFVec2fObject(new float[] {1.0f,1.0f,1.0f,0.9f,1.0f,0.8f,1.0f,0.7f,1.0f,0.6f,1.0f,0.5f,1.0f,0.4f,1.0f,0.3f,1.0f,0.2f,1.0f,0.1f,1.0f,0.01f,1.0f,0.01f,1.0f,0.01f,1.0f,0.01f,1.0f,0.01f})).setSolid(false).setSpine(new MFVec3fObject(new float[] {0.0f,0.0f,0.0f,0.0f,5.0f,0.0f,0.0f,10.0f,0.0f,0.0f,15.0f,0.0f,0.0f,20.0f,0.0f,0.0f,25.0f,0.0f,0.0f,30.0f,0.0f,0.0f,35.0f,0.0f,0.0f,40.0f,0.0f,0.0f,45.0f,0.0f,0.0f,50.0f,0.0f,0.0f,55.0f,0.0f,0.0f,60.0f,0.0f,0.0f,65.0f,0.0f,0.0f,70.0f,0.0f})))))) .addChild(new TransformObject() .addComments(" This is the rear left of ship ") .addChild(new TransformObject().setRotation(0.0f,0.0f,1.0f,-1.57f).setTranslation(69.9f,0.0f,20.0f) .addChild(new ShapeObject() .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setUSE("GRAY"))) .setGeometry(new ExtrusionObject().setBeginCap(false).setCrossSection(new MFVec2fObject(new float[] {0.0f,0.0f,3.0f,0.0f,6.0f,-8.0f,10.0f,-10.0f,10.0f,-20.0f})).setEndCap(false).setScale(new MFVec2fObject(new float[] {1.5f,0.01f,1.45f,0.01f,1.4f,0.01f,1.35f,0.01f,1.3f,0.01f,1.25f,0.1f,1.2f,0.2f,1.15f,0.3f,1.1f,0.4f,1.05f,0.5f,1.0f,0.6f,1.0f,0.7f,1.0f,0.8f,1.0f,0.9f,1.0f,1.0f})).setSolid(false).setSpine(new MFVec3fObject(new float[] {0.0f,0.0f,0.0f,0.0f,5.0f,0.0f,0.0f,10.0f,0.0f,0.0f,15.0f,0.0f,0.0f,20.0f,0.0f,0.0f,25.0f,0.0f,0.0f,30.0f,0.0f,0.0f,35.0f,0.0f,0.0f,40.0f,0.0f,0.0f,45.0f,0.0f,0.0f,50.0f,0.0f,0.0f,55.0f,0.0f,0.0f,60.0f,0.0f,0.0f,65.0f,0.0f,0.0f,70.0f,0.0f})))))) .addChild(new TransformObject() .addComments(" This is the rear right of ship. ") .addChild(new TransformObject().setRotation(0.0f,0.0f,1.0f,-1.57f).setTranslation(69.9f,0.0f,-20.0f) .addChild(new ShapeObject() .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setUSE("GRAY"))) .setGeometry(new ExtrusionObject().setBeginCap(false).setCrossSection(new MFVec2fObject(new float[] {0.0f,0.0f,3.0f,0.0f,6.0f,8.0f,10.0f,10.0f,10.0f,20.0f})).setEndCap(false).setScale(new MFVec2fObject(new float[] {1.5f,0.01f,1.45f,0.01f,1.4f,0.01f,1.35f,0.01f,1.3f,0.01f,1.25f,0.1f,1.2f,0.2f,1.15f,0.3f,1.1f,0.4f,1.05f,0.5f,1.0f,0.6f,1.0f,0.7f,1.0f,0.8f,1.0f,0.9f,1.0f,1.0f})).setSolid(false).setSpine(new MFVec3fObject(new float[] {0.0f,0.0f,0.0f,0.0f,5.0f,0.0f,0.0f,10.0f,0.0f,0.0f,15.0f,0.0f,0.0f,20.0f,0.0f,0.0f,25.0f,0.0f,0.0f,30.0f,0.0f,0.0f,35.0f,0.0f,0.0f,40.0f,0.0f,0.0f,45.0f,0.0f,0.0f,50.0f,0.0f,0.0f,55.0f,0.0f,0.0f,60.0f,0.0f,0.0f,65.0f,0.0f,0.0f,70.0f,0.0f})))))) .addChild(new TransformObject() .addComments(" This is the base of the carrier. It is the front portion of the base. ") .addChild(new TransformObject().setRotation(0.0f,0.0f,1.0f,-1.57f) .addChild(new ShapeObject() .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setUSE("GRAY"))) .setGeometry(new ExtrusionObject().setBeginCap(false).setCrossSection(new MFVec2fObject(new float[] {15.0f,15.0f,20.0f,0.0f,15.0f,-15.0f})).setEndCap(false).setScale(new MFVec2fObject(new float[] {1.0f,1.0f,1.0f,1.033f,1.0f,1.066f,1.0f,1.099f,1.0f,1.132f,1.0f,1.165f,1.0f,1.198f,1.0f,1.231f,1.0f,1.264f,1.0f,1.297f,1.0f,1.33f,1.0f,1.33f,1.0f,1.33f,1.0f,1.33f,1.0f,1.33f})).setSolid(false).setSpine(new MFVec3fObject(new float[] {0.0f,0.0f,0.0f,0.0f,5.0f,0.0f,0.0f,10.0f,0.0f,0.0f,15.0f,0.0f,0.0f,20.0f,0.0f,0.0f,25.0f,0.0f,0.0f,30.0f,0.0f,0.0f,35.0f,0.0f,0.0f,40.0f,0.0f,0.0f,45.0f,0.0f,0.0f,50.0f,0.0f,0.0f,55.0f,0.0f,0.0f,60.0f,0.0f,0.0f,65.0f,0.0f,0.0f,70.0f,0.0f})))))) .addChild(new TransformObject() .addComments(" This is the rear base of carrier. It sweeps upwards towards the deck. ") .addChild(new TransformObject().setRotation(0.0f,0.0f,1.0f,-1.57f).setTranslation(69.9f,0.0f,0.0f) .addChild(new ShapeObject() .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setUSE("GRAY"))) .setGeometry(new ExtrusionObject().setBeginCap(false).setCrossSection(new MFVec2fObject(new float[] {15.0f,20.0f,20.0f,0.0f,15.0f,-20.0f})).setEndCap(false).setScale(new MFVec2fObject(new float[] {1.0f,1.0f,0.9667f,1.0f,0.9334f,1.0f,0.9001f,1.0f,0.8668f,1.0f,0.8335f,0.9f,0.8002f,0.8f,0.7669f,0.7f,0.7336f,0.6f,0.7003f,0.5f,0.667f,0.4f,0.667f,0.3f,0.667f,0.2f,0.667f,0.1f,0.667f,0.01f})).setSolid(false).setSpine(new MFVec3fObject(new float[] {0.0f,0.0f,0.0f,0.0f,5.0f,0.0f,0.0f,10.0f,0.0f,0.0f,15.0f,0.0f,0.0f,20.0f,0.0f,0.0f,25.0f,0.0f,0.0f,30.0f,0.0f,0.0f,35.0f,0.0f,0.0f,40.0f,0.0f,0.0f,45.0f,0.0f,0.0f,50.0f,0.0f,0.0f,55.0f,0.0f,0.0f,60.0f,0.0f,0.0f,65.0f,0.0f,0.0f,70.0f,0.0f})))))) .addChild(new TransformObject() .addComments(" This is the rear end of the ship. Required to provide a face to the end of ship ") .addChild(new TransformObject().setRotation(0.0f,0.0f,1.0f,-1.57f).setTranslation(139.8f,0.0f,0.0f) .addChild(new ShapeObject() .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setUSE("GRAY"))) .setGeometry(new ExtrusionObject().setCrossSection(new MFVec2fObject(new float[] {0.0f,20.0f,3.0f,20.0f,6.0f,12.0f,10.0f,10.0f,10.0f,0.0f,10.0f,-10.0f,6.0f,-12.0f,3.0f,-20.0f,0.0f,-20.0f,0.0f,20.0f})).setSolid(false))))) .addChild(new TransformObject().setRotation(0.0f,0.0f,1.0f,1.57f) .addChild(new TransformObject().setRotation(0.0f,1.0f,0.0f,3.14f).setTranslation(0.1f,0.0f,0.0f) .addComments(" This is the front part of the hull. A simple cross section and extruded by rotating the orientation along the spine ") .addChild(new ShapeObject() .addComments(" Left Front Hull ") .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setUSE("GRAY"))) .setGeometry(new ExtrusionObject().setBeginCap(false).setCrossSection(new MFVec2fObject(new float[] {0.0f,20.0f,5.0f,15.0f,15.0f,15.0f,20.0f,0.0f})).setEndCap(false).setOrientation(new MFRotationObject(new float[] {1.0f,0.0f,0.0f,0.0f,1.0f,0.0f,0.0f,-0.785f,1.0f,0.0f,0.0f,-1.571f})).setScale(new MFVec2fObject(new float[] {1.0f,1.0f,1.0f,0.8f,1.0f,1.5f})).setSolid(false).setSpine(new MFVec3fObject(new float[] {0.0f,0.0f,0.0f,0.0f,2.5f,0.0f,0.0f,5.0f,0.0f})))) .addChild(new ShapeObject() .addComments(" RIght Front Hull ") .setAppearance(new AppearanceObject() .setMaterial(new MaterialObject().setUSE("GRAY"))) .setGeometry(new ExtrusionObject().setBeginCap(false).setCrossSection(new MFVec2fObject(new float[] {0.0f,-20.0f,5.0f,-15.0f,15.0f,-15.0f,20.0f,-0.0f})).setEndCap(false).setOrientation(new MFRotationObject(new float[] {1.0f,0.0f,0.0f,0.0f,1.0f,0.0f,0.0f,0.785f,1.0f,0.0f,0.0f,1.571f})).setScale(new MFVec2fObject(new float[] {1.0f,1.0f,1.0f,0.8f,1.0f,1.5f})).setSolid(false).setSpine(new MFVec3fObject(new float[] {0.0f,0.0f,0.0f,0.0f,2.5f,0.0f,0.0f,5.0f,0.0f}))))))))); } // end of initialize() method /** The initialized model object, created within initialize() method. */ private X3DObject x3dModel; /** Provide a * shallow copy * of the X3D model. * @see X3DObject * @return hull05 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 hull05().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: \"hull05\" 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 \"hull05\" self-validation test results: "); String validationResults = thisExampleX3dObject.validationReport(); System.out.println(validationResults); } } }