~holger-seelig/titania-library/trunk

« back to all changes in this revision

Viewing changes to Tests/Components/PointingDeviceSensor/lamp.x3d

  • Committer: Holger Seelig
  • Date: 2017-09-18 02:55:31 UTC
  • Revision ID: holger.seelig@yahoo.de-20170918025531-n60g34kd9bfs41t1
Updated prototypes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd">
 
3
<X3D profile='Full' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'>
 
4
  <head>
 
5
    <meta name='comment' content='World of Titania'/>
 
6
    <meta name='created' content='Tue, 14 Apr 2015 09:48:45 GMT'/>
 
7
    <meta name='creator' content='Holger Seelig'/>
 
8
    <meta name='generator' content='Titania V0.7.8, http://titania.create3000.de'/>
 
9
    <meta name='modified' content='Fri, 17 Apr 2015 09:15:59 GMT'/>
 
10
  </head>
 
11
  <Scene>
 
12
    <WorldInfo
 
13
        title='Desk lamp'
 
14
        info='"Copyright (c) 1996-97, David R. Nadeau"'/>
 
15
    <Viewpoint DEF='Entry'
 
16
        description='Entry View'
 
17
        position='0 0.15 1'/>
 
18
    <NavigationInfo/>
 
19
    <Transform>
 
20
      <Shape>
 
21
        <Appearance>
 
22
          <Material
 
23
              diffuseColor='0 0 0'
 
24
              emissiveColor='0.7 0.7 0.7'/>
 
25
        </Appearance>
 
26
        <Box
 
27
            size='2.25 0.01 2.25'/>
 
28
      </Shape>
 
29
    </Transform>
 
30
    <Transform
 
31
        translation='0 0.01 0'
 
32
        rotation='1 0 0 1.571'>
 
33
      <PlaneSensor DEF='MoveLamp'/>
 
34
      <Transform DEF='Lamp'
 
35
          rotation='-1 -0 -0 1.571'>
 
36
        <Shape>
 
37
          <Appearance>
 
38
            <Material
 
39
                diffuseColor='0.5 0.5 0.5'/>
 
40
          </Appearance>
 
41
          <Cylinder
 
42
              height='0.01'
 
43
              radius='0.1'/>
 
44
        </Shape>
 
45
        <Group>
 
46
          <CylinderSensor DEF='MoveFirstArm'/>
 
47
          <Transform DEF='FirstArm'>
 
48
            <Transform
 
49
                translation='0 0.15 0'
 
50
                rotation='-1 -0 -0 0.7'
 
51
                center='0 -0.15 0'>
 
52
              <Shape DEF='LampArm'>
 
53
                <Appearance DEF='Red'>
 
54
                  <Material
 
55
                      diffuseColor='1 0.2 0.2'/>
 
56
                </Appearance>
 
57
                <Cylinder
 
58
                    height='0.3'
 
59
                    radius='0.01'/>
 
60
              </Shape>
 
61
              <Group>
 
62
                <CylinderSensor DEF='MoveSecondArm'/>
 
63
                <Transform DEF='SecondArm'>
 
64
                  <Transform
 
65
                      translation='0 0.3 0'
 
66
                      rotation='1 0 0 1.9'
 
67
                      center='0 -0.15 0'>
 
68
                    <Shape USE='LampArm'/>
 
69
                    <Group>
 
70
                      <Transform
 
71
                          translation='0 0.16 0'>
 
72
                        <SphereSensor DEF='MoveLampShade'
 
73
                            offset='-1 -0 -0 1.25'/>
 
74
                        <Transform DEF='LampShade'
 
75
                            rotation='-1 0 0 1.25'>
 
76
                          <Transform
 
77
                              translation='0 -0.075 0'>
 
78
                            <Shape>
 
79
                              <Appearance USE='Red'/>
 
80
                              <Cone
 
81
                                  bottom='false'
 
82
                                  height='0.15'
 
83
                                  bottomRadius='0.12'/>
 
84
                            </Shape>
 
85
                            <Transform
 
86
                                translation='0 0.075 7.2955e-10'>
 
87
                              <Shape>
 
88
                                <Appearance>
 
89
                                  <Material
 
90
                                      diffuseColor='1 1 1'/>
 
91
                                </Appearance>
 
92
                                <Cylinder
 
93
                                    height='0.03'
 
94
                                    radius='0.007'/>
 
95
                              </Shape>
 
96
                            </Transform>
 
97
                            <Transform
 
98
                                translation='0 -0.05 7.2955e-10'>
 
99
                              <Shape>
 
100
                                <Appearance>
 
101
                                  <Material
 
102
                                      diffuseColor='0 0 0'
 
103
                                      emissiveColor='1 1 1'/>
 
104
                                </Appearance>
 
105
                                <Sphere
 
106
                                    radius='0.05'/>
 
107
                              </Shape>
 
108
                            </Transform>
 
109
                          </Transform>
 
110
                        </Transform>
 
111
                      </Transform>
 
112
                    </Group>
 
113
                  </Transform>
 
114
                </Transform>
 
115
              </Group>
 
116
            </Transform>
 
117
          </Transform>
 
118
        </Group>
 
119
      </Transform>
 
120
    </Transform>
 
121
    <ROUTE fromNode='MoveLamp' fromField='translation_changed' toNode='Lamp' toField='set_translation'/>
 
122
    <ROUTE fromNode='MoveFirstArm' fromField='rotation_changed' toNode='FirstArm' toField='set_rotation'/>
 
123
    <ROUTE fromNode='MoveSecondArm' fromField='rotation_changed' toNode='SecondArm' toField='set_rotation'/>
 
124
    <ROUTE fromNode='MoveLampShade' fromField='rotation_changed' toNode='LampShade' toField='set_rotation'/>
 
125
  </Scene>
 
126
</X3D>