| 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='title' content='CompassRosePrototype.x3d'/> |
| 6 | <meta name='description' content='Definition of the CompassRose prototype, a heads-up display (HUD) showing heading for current viewpoint direction.'/> |
| 7 | <meta name='creator' content='Christian Greuel, Director of Art & Production, Planet 9 Studios, Inc.'/> |
| 8 | <meta name='translator' content='Xeena VRML importer, X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html'/> |
| 9 | <meta name='created' content='1 August 2006'/> |
| 10 | <meta name='translated' content='14 October 2006'/> |
| 11 | <meta name='modified' content='14 June 20'/> |
| 12 |
<meta name='Image' content='Textures/CompassHeadings.png' />
|
| 13 | <meta name='reference' content='originals/CompassRosePrototype.wrl'/> |
| 14 | <meta name='subject' content='compass rose heads-up display HUD'/> |
| 15 | <meta name='identifier' content='https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/CompassRosePrototype.x3d'/> |
| 16 | <meta name='generator' content='X3D-Edit, https://www.web3d.org/x3d/content/README.X3D-Edit.html'/> |
| 17 | <meta name='generator' content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/> |
| 18 | </head> |
| 19 | <Scene> |
| 20 | <WorldInfo info='"Christian Greuel, Director of Art & Production"' title='Compass Rose Prototype'/> |
| 21 | <ProtoDeclare name='CompassRose'> |
| 22 | <ProtoInterface> |
| 23 | <field name='size' type='SFVec3f' value='1.0 1.0 1.0' accessType='initializeOnly'/> |
| 24 | <field name='locationOffset' type='SFVec3f' value='0.0 0.0 0.0' accessType='initializeOnly'/> |
| 25 | </ProtoInterface> |
| 26 | <ProtoBody> |
| 27 | <Group DEF='CompassRose'> |
| 28 | <ProximitySensor DEF='CompassProx' size='1.0E9 1.0E9 1.0E9'> |
| 29 | <IS> |
| 30 | <connect nodeField='center' protoField='locationOffset'/> |
| 31 | </IS> |
| 32 | </ProximitySensor> |
| 33 | <Transform DEF='FixedLocation'> |
| 34 | <Transform DEF='LocationOffset'> |
| 35 | <IS> |
| 36 | <connect nodeField='translation' protoField='locationOffset'/> |
| 37 | <connect nodeField='scale' protoField='size'/> |
| 38 | </IS> |
| 39 | <Transform scale='0.02 0.02 0.02' translation='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://savage.nps.edu/Savage/Tools/HeadsUpDisplays/Textures/CompassNeedle.png
" '/>
|
| 45 | </Appearance> |
| 46 | <IndexedFaceSet coordIndex='1 2 3 -1 1 3 0 -1' texCoordIndex='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 | |
| 53 | <Shape> |
| 54 | <Appearance> |
| 55 |
<ImageTexture
url=' "Textures/CompassHeadings.png
" "https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/Textures/CompassHeadings.png
" '/>
|
| 56 | </Appearance> |
| 57 | <IndexedFaceSet coordIndex='1 2 3 -1 1 3 0 -1' texCoordIndex='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='rot' type='SFRotation' value='0.0 1.0 0.0 0.0' accessType='initializeOnly'/> |
| 65 | <field name='dir' type='SFNode' accessType='initializeOnly'> |
| 66 | <Transform USE='Headings'/> |
| 67 | </field> |
| 68 | <field name='proxrot' type='SFRotation' accessType='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> |
<!--
Color-coding legend: X3D terminology
<X3dNode
DEF='idName' field='value'/>
matches XML terminology
<XmlElement
DEF='idName' attribute='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>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->