#VRML V2.0 utf8 # X3D-to-VRML-97 XSL translation autogenerated by X3dToVrml97.xslt # http://www.web3d.org/x3d/content/X3dToVrml97.xslt # Generated using XSLT processor: SAXON 8.7 from Saxonica # [X3D] VRML V3.0 utf8 # PROFILE Immersive # [X3D] version=3.0 # [X3D] noNamespaceSchemaLocation=http://www.web3d.org/specifications/x3d-3.0.xsd # [head] # META "title" "Geometry2dComponentPrototypes.x3d" # META "description" "X3D Geometry2D component nodes, implemented as prototypes for backwards compatibility with VRML 97. Arc2D specifies a 2D linear circular arc. ArcClose2D specifies a portion of a circle. Circle2D specifies a 2D circular line. Disk2D specifies a 2D circular disk. Polyline2D specifies 2D line segments. Polypoint2D specifies 2D points. Rectangle2D specifies a 2D rectangle. TriangleSet2D specifies 2D triangles. 2D nodes are considered particularly helpful for building user interfaces such as Heads-Up Displays (HUDs)." # META "creator" "Christos Kalogrias, Don Brutzman, Ken Curtin, Duane Davis" # META "created" "14 November 2003" # META "modified" "25 February 2007" # META "reference" "Geometry2dComponentExamples.x3d" # META "reference" "http://www.web3d.org/spec_editors/abstract/Part01/components/geometry2D.html" # META "subject" "Geometry2D component nodes (Arc2D ArcClose2D Circle2D Disk2D Polyline2D Polypoint2D Rectangle2D TriangleSet2D)" # META "identifier" "http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2dComponentPrototypes.x3d" # META "generator" "X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit" # META "license" "../license.html" # # # # # NPS MOVES Software License # # # # # # # # # # #

Copyright (c) 1995-2008 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:

# # # #

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.

# # # # [Scene] ========== ========== ========== # ==================== PROTO Disk2D [ field SFFloat innerRadius 0 field SFFloat outerRadius 1 ### Error: ProtoInterface is unreferenced in ProtoBody with no corresponding IS/connect/@protoField field SFBool solid FALSE ### Error: ProtoInterface is unreferenced in ProtoBody with no corresponding IS/connect/@protoField exposedField SFNode metadata NULL # [appinfo] Metadata node only # default NULL ] { ### Warning: ProtoBody child following first child will not be rendered, since the first child determines node type. (Authors can silence this warning by placing a comment as second child.) DEF DiskPointsIndex IndexedFaceSet { coord DEF Disk3DPoints Coordinate { } } Group { children [ DEF Disk2dToFaceSet3d Script { field SFFloat innerRadius IS innerRadius field SFFloat outerRadius IS outerRadius eventOut MFVec3f diskSet3d eventOut MFInt32 diskIndexSet3d url [ "javascript: // ### X3D Browser.print() not supported by all VRML97 viewers, instead simply use print() function initialize() { if (innerRadius < 0) { print ('[Disk2D] Warning: invalid value, innerRadius=' + value + ' must instead be >= 0'); } if (outerRadius < 0) { print ('[Disk2D] Warning: invalid value, outerRadius=' + value + ' must instead be >= 0'); } numOfPoints = 100.0; diskSet3d = new MFVec3f(); diskIndexSet3d = new MFInt32(); differAng = 2 * Math.PI/numOfPoints; for ( i=0 ; i<2*numOfPoints ; i++) { if ( i