X3D Model Documentation: CompassRosePrototype.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2 
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
  3  <X3D profile='Immersive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'>
  4       <head>
  5            <meta name='titlecontent=' CompassRosePrototype.x3d '/>
  6            <meta name='descriptioncontent='Definition of the CompassRose prototype, a heads-up display (HUD) showing heading for current viewpoint direction.'/>
  7            <meta name='creatorcontent='Christian Greuel, Director of Art & Production, Planet 9 Studios, Inc.'/>
  8            <meta name='translatorcontent=' Xeena VRML importer, X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html '/>
  9            <meta name='createdcontent='1 August 2006'/>
 10            <meta name='translatedcontent='14 October 2006'/>
 11            <meta name='modifiedcontent='14 June 20'/>
 12            <meta name='Imagecontent='Textures/CompassHeadings.png'/>
 13            <meta name='referencecontent='originals/CompassRosePrototype.wrl'/>
 14            <meta name='subjectcontent='compass rose heads-up display HUD'/>
 15            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CompassRosePrototype.x3d '/>
 16            <meta name='generatorcontent=' X3D-Edit, https://www.web3d.org/x3d/content/README.X3D-Edit.html '/>
 17            <meta name='generatorcontent=' Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html '/>
 18       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: Compass, CompassProx, CompassRose, FixedLocation, Headings, LocationOffset, Needle, RoseScript

Index for ProtoDeclare definition: CompassRose
-->
 19       <Scene>
 20            <WorldInfo info='"Christian Greuel, Director of Art & Production"title='Compass Rose Prototype'/>
 21            <ProtoDeclare name='CompassRose'>
 22                 <ProtoInterface>
 23                      <field name='sizetype='SFVec3fvalue='1.0 1.0 1.0accessType='initializeOnly'/>
 24                      <field name='locationOffsettype='SFVec3fvalue='0.0 0.0 0.0accessType='initializeOnly'/>
 25                 </ProtoInterface>
 26                 <ProtoBody>
 27                      <Group DEF='CompassRose'>
 28                           <ProximitySensor DEF='CompassProxsize='1.0E9 1.0E9 1.0E9'>
 29                                <IS>
 30                                     <connect nodeField='centerprotoField='locationOffset'/>
 31                                </IS>
 32                           </ProximitySensor>
 33                           <Transform DEF='FixedLocation'>
 34                                <Transform DEF='LocationOffset'>
 35                                     <IS>
 36                                          <connect nodeField='translationprotoField='locationOffset'/>
 37                                          <connect nodeField='scaleprotoField='size'/>
 38                                     </IS>
 39                                     <Transform scale='0.02 0.02 0.02translation='0.0 0.0 -0.2'>
 40                                          <Group DEF='Compass'>
 41                                               <Transform DEF='Needle'>
 42                                                    <Shape>
 43                                                         <Appearance>
 44                                                              <ImageTexture   url=' "Textures/CompassNeedle.png " "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/Textures/CompassNeedle.png " '/>
 45                                                         </Appearance>
 46                                                         <IndexedFaceSet coordIndex='1 2 3 -1 1 3 0 -1texCoordIndex='1 2 3 -1 1 3 0 -1'>
 47                                                              <Coordinate point='0.5 0.5 0.0 -0.5 0.5 0.0 -0.5 -0.5 0.0 0.5 -0.5 0.0'/>
 48                                                              <TextureCoordinate point='1.0 1.0 0.0 1.0 0.0 0.0 1.0 0.0'/>
 49                                                         </IndexedFaceSet>
 50                                                    </Shape>
 51                                               </Transform>
 52 
                                             <!-- Transform Headings is a DEF node that has 1 USE node: USE_1 -->
                                             <Transform DEF='Headings'>
 53                                                    <Shape>
 54                                                         <Appearance>
 55                                                              <ImageTexture   url=' "Textures/CompassHeadings.png " "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/Textures/CompassHeadings.png " '/>
 56                                                         </Appearance>
 57                                                         <IndexedFaceSet coordIndex='1 2 3 -1 1 3 0 -1texCoordIndex='1 2 3 -1 1 3 0 -1'>
 58                                                              <Coordinate point='0.5 0.5 0.0 -0.5 0.5 0.0 -0.5 -0.5 0.0 0.5 -0.5 0.0'/>
 59                                                              <TextureCoordinate point='1.0 1.0 0.0 1.0 0.0 0.0 1.0 0.0'/>
 60                                                         </IndexedFaceSet>
 61                                                    </Shape>
 62                                               </Transform>
 63                                               <Script DEF='RoseScript'>
 64                                                    <field name='rottype='SFRotationvalue='0.0 1.0 0.0 0.0accessType='initializeOnly'/>
 65                                                    <field name='dirtype='SFNodeaccessType='initializeOnly'>
 66                                                         <Transform USE='Headings'/>
 67                                                    </field>
 68                                                    <field name='proxrottype='SFRotationaccessType='inputOnly'/>
  <![CDATA[
                    
ecmascript:
	function proxrot(v) {
		rot[0] = 0;
		rot[1] = 0;
		rot[2] = v[1];
		rot[3] = -v[3];
		dir.set_rotation = rot;
	}

                  
]]>
 70                                               </Script>
 71                                          </Group>
 72                                     </Transform>
 73                                </Transform>
 74                           </Transform>
 75                      </Group>
 76                 </ProtoBody>
 77            </ProtoDeclare>
 78       </Scene>
 79  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: Compass, CompassProx, CompassRose, FixedLocation, Headings, LocationOffset, Needle, RoseScript

Index for ProtoDeclare definition: CompassRose
-->
X3D Tooltips element index: Appearance, connect, Coordinate, field, Group, head, ImageTexture, IndexedFaceSet, IS, meta, ProtoBody, ProtoDeclare, ProtoInterface, ProximitySensor, Scene, Script, Shape, TextureCoordinate, Transform, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and field types

Event Graph ROUTE Table with 0 ROUTE connections total, showing X3D event-model relationships for this scene.

Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.


Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CompassRosePrototypeIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CompassRosePrototype.x3d -->

<!-- Color-coding legend: X3D terminology <X3dNode  DEF='idNamefield='value'/> matches XML terminology <XmlElement  DEF='idNameattribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
    <ProtoDeclare name='ProtoName'> <field name='fieldName'/> </ProtoDeclare> -->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->