Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE X3D PUBLIC 'ISO//Web3D//DTD X3D 3.2//EN' 'http://www.web3d.org/specifications/x3d-3.2.dtd'>
<X3D xmlns:cfn='_xml/_xsd/CommonFunctions' xmlns:cvs='CVSInfo' xmlns:fn='http://www.w3.org/2005/xpath-functions' xmlns:lfn='local_functions' xmlns:ss='urn:schemas-microsoft-com:office:spreadsheet' xmlns:v2kfn='_xml/_xsd/V2Kfunctions' xmlns:x3d='http://www.web3d.org/specifications/x3d-3.2.xsd' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' profile='Immersive' version='3.2' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.2.xsd'>
<Engine DEF='engine'>
<RenderJob DEF='render'>
<WindowGroup>
<Window position='10 50' size='933,700' fullScreen='false'/>
</WindowGroup>
</RenderJob>
</Engine>
<Scene>
<Background skyColor='0 0 0'/>
<ProximitySensor DEF='HereIAm' enabled='true' size='10000000 10000000 10000000'/>
<ProtoDeclare name='Spin_Proto'>
<ProtoInterface>
<field name='spin_position' accessType='inputOnly' type='SFVec3f'/>
<field name='spin_scale' accessType='inputOnly' type='SFVec3f'/>
<field name='spin_rotation' accessType='inputOnly' type='SFRotation'/>
<field name='spin_color' accessType='inputOnly' type='SFColor'/>
</ProtoInterface>
<ProtoBody>
<Group>
<Transform DEF='Spin'>
<IS>
<connect nodeField='scale' protoField='spin_scale'/>
<connect nodeField='translation' protoField='spin_position'/>
<connect nodeField='rotation' protoField='spin_rotation'/>
</IS>
<Transform translation='0 0.375 0'>
<Shape>
<Cone bottomRadius='0.25' bottom='true' solid='true' height='0.25' side='true'/>
<Appearance>
<Material DEF='ConeColor'>
<IS>
<connect nodeField='diffuseColor' protoField='spin_color'/>
</IS>
</Material>
</Appearance>
</Shape>
</Transform>
<Transform translation='0 -0.125 0'>
<Shape>
<Cylinder radius='0.1' height='0.75'/>
<Appearance>
<Material DEF='CylinderColor'>
<IS>
<connect nodeField='diffuseColor' protoField='spin_color'/>
</IS>
</Material>
</Appearance>
</Shape>
</Transform>
</Transform>
</Group>
</ProtoBody>
</ProtoDeclare>
<Transform DEF='ArrowsHUD'>
<Transform DEF='Arrows' translation='-4.5 -3 -10' scale='0.75 0.75 0.75'>
<Group DEF='ArrowGreen'>
<Shape>
<Cylinder DEF='ArrowCylinder' radius='0.025' top='false'/>
<Appearance DEF='Green'>
<Material diffuseColor='0 1 0'/>
</Appearance>
</Shape>
<Transform translation='0 1 0'>
<Shape>
<Cone DEF='ArrowCone' bottomRadius='0.05' height='0.1'/>
<Appearance USE='Green'/>
</Shape>
</Transform>
<Transform translation='0 1.1 0'>
<Billboard>
<Shape>
<Appearance DEF='LabelAppearance'>
<Material diffuseColor='1 1 0'/>
</Appearance>
<Text string='Y'>
<FontStyle DEF='LabelFont' size='0.25'/>
</Text>
</Shape>
</Billboard>
</Transform>
</Group>
<Group DEF='ArrowBlue'>
<Transform rotation='0 0 1 -1.57079'>
<Shape>
<Cylinder USE='ArrowCylinder'/>
<Appearance DEF='Blue'>
<Material diffuseColor='0 0 1'/>
</Appearance>
</Shape>
<Transform translation='0 1 0'>
<Shape>
<Cone USE='ArrowCone'/>
<Appearance USE='Blue'/>
</Shape>
</Transform>
<Transform rotation='0 0 1 1.57079' translation='0.072 1.1 0'>
<Billboard>
<Shape>
<Appearance USE='LabelAppearance'/>
<Text string='X'>
<FontStyle USE='LabelFont'/>
</Text>
</Shape>
</Billboard>
</Transform>
</Transform>
</Group>
<Group DEF='ArrowRed'>
<Transform rotation='1 0 0 1.57079'>
<Shape>
<Cylinder USE='ArrowCylinder'/>
<Appearance DEF='Red'>
<Material diffuseColor='1 0 0'/>
</Appearance>
</Shape>
<Transform translation='0 1 0'>
<Shape>
<Cone USE='ArrowCone'/>
<Appearance USE='Red'/>
</Shape>
</Transform>
<Transform rotation='1 0 0 -1.57079' translation='0 1.1 0.072'>
<Billboard>
<Shape>
<Appearance USE='LabelAppearance'/>
<Text string='Z'>
<FontStyle USE='LabelFont'/>
</Text>
</Shape>
</Billboard>
</Transform>
</Transform>
</Group>
</Transform>
</Transform>
<Script DEF='ChangeRot' >
<field accessType='inputOnly' type='SFRotation' name='orientation'/>
<field accessType='outputOnly' name='CoordRot' type='SFRotation'/>
<![CDATA[javascript:
function orientation(orientation){
CoordRot= new SFRotation(orientation[0], orientation[1], orientation[2], -orientation[3]);
}
]]>
<ROUTE fromNode='HereIAm' fromField='orientation_changed' toNode='ArrowsHUD' toField='rotation'/>
<ROUTE fromNode='HereIAm' fromField='position_changed' toNode='ArrowsHUD' toField='translation'/>
<ROUTE fromNode='HereIAm' fromField='orientation_changed' toNode='ChangeRot' toField='orientation'/>
<ROUTE fromNode='ChangeRot' fromField='CoordRot' toNode='Arrows' toField='set_rotation'/>
</Script>
</Scene>
</X3D>