~forsslundsystems/forssim/caseRevisionhandling

« back to all changes in this revision

Viewing changes to models/cylinder/x3d/footdim.x3d

  • Committer: par.hellstrom at hiq
  • Date: 2009-01-15 10:45:42 UTC
  • Revision ID: par.hellstrom@hiq.se-20090115104542-57tb4qysd96xkah6
added new models dir with cylinder.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<Collision enabled="FALSE" >
 
2
  <!-- GNU/Linux -->
 
3
  <ImportLibrary library="libMedX3D.so" />
 
4
  <ImportLibrary library="libforssim.so" />
 
5
 
 
6
  <!-- Windows -->
 
7
  <ImportLibrary library="MedX3D_vc8.dll" />
 
8
  <ImportLibrary library="forssim.dll" />
 
9
 
 
10
  <DeviceInfo>
 
11
    <AnyDevice DEF="device" positionCalibration="1 0 0 0
 
12
                                                 0 1 0 0
 
13
                                                 0 0 1 0
 
14
                                                 0 0 0 1" >
 
15
      <Group containerField="stylus">
 
16
              <Shape>
 
17
                <Sphere radius="0.003" DEF="Stylus_sphere"/>
 
18
                <Appearance DEF="Stylus_a">
 
19
                  <Material emissiveColor='1 0 0' />
 
20
                </Appearance>
 
21
              </Shape>
 
22
              <Transform translation="0 0 0.03" rotation="1 0 0 -1.570796" >
 
23
                <Shape>
 
24
                  <Cone bottomRadius="0.003" height="0.05"/>
 
25
                          <Appearance USE="Stylus_a"/>
 
26
                </Shape>
 
27
              </Transform>
 
28
     </Group>      
 
29
    </AnyDevice>
 
30
  </DeviceInfo>
 
31
 
 
32
    <IMPORT inlineDEF='H3D_EXPORTS' exportedDEF='HDEV' AS='HDEV' />
 
33
 
 
34
    <Background skyColor="1 1 1 "/>
 
35
    <Viewpoint position="0 0 0.10"/>
 
36
 
 
37
 
 
38
<VolumeModel DEF='VM' segmentField="data/foot128_segmented.nrrd" >
 
39
                <Image3DTexture containerField="imageField" url="data/foot128.nrrd" DEF="imageField" />
 
40
                <Image3DTexture containerField="imageOrigField" url="data/foot128.nrrd" DEF="imageOrigField" />
 
41
        </VolumeModel>  
 
42
 
 
43
 
 
44
    <ADrillableNode DEF='DN' 
 
45
                cutRadius='0.0008'
 
46
          drillSpeed='3'
 
47
          transfer='0.1 0.31'
 
48
         output='1 1 1'>
 
49
                <VolumeModel containerField="volumeModel" USE="VM" /> 
 
50
    </ADrillableNode>
 
51
 
 
52
    <ADrillForce DEF='DF' PID='1.0 0 -0.1' 
 
53
                         voxelSide='0.0003' 
 
54
                         bitDiameter='0.006' 
 
55
                         iso = '0.02'>
 
56
        <VolumeModel containerField="volumeModel" USE="VM" /> 
 
57
    </ADrillForce>
 
58
 
 
59
    <MaterialAt DEF='SM' 
 
60
                         transfer='0.03 0.2'
 
61
                         output='0 1 2'> 
 
62
        <VolumeModel containerField="volumeModel" USE="VM" /> 
 
63
    </MaterialAt>
 
64
 
 
65
    <Switch whichChoice="1" DEF="renderMethod">
 
66
      <Shape>
 
67
        <Appearance>
 
68
          <Material
 
69
            ambientIntensity='0.2'
 
70
            diffuseColor='1.0 1.0 1.0'
 
71
            emissiveColor='0 0 0'
 
72
            shininess='0.2'
 
73
            specularColor='0 0 0'
 
74
            transparency='0'
 
75
        />
 
76
        </Appearance>
 
77
        <MarchingCubes DEF='MC' isovalue='0.02' >
 
78
          <DebugOptions drawBound='FALSE'/>
 
79
          <Image3DTexture containerField="voxels" USE="imageField" />
 
80
        </MarchingCubes>
 
81
      </Shape>
 
82
 
 
83
      <VolumeData DEF="volume"
 
84
                  rayStep="0.01"
 
85
                  useSlicing="false">
 
86
        <Image3DTexture containerField="voxels"  USE="imageField"/>
 
87
        <OpacityMapVolumeStyle>
 
88
          <WindowFunctionTexture DEF='WFT' containerField='transferFunction' windowCenter='120' windowWidth='50' />
 
89
        </OpacityMapVolumeStyle>
 
90
      </VolumeData>
 
91
      <ROUTE fromNode="VM" fromField="dimensions" toNode="volume" toField="dimensions"/>
 
92
 
 
93
      <VolumeData DEF="transferHardness"
 
94
                  rayStep="0.01"
 
95
                  useSlicing="false">
 
96
        <Image3DTexture containerField="voxels"  USE="imageField"/>
 
97
 
 
98
          <OpacityMapVolumeStyle>
 
99
            <ImageTexture containerField='transferFunction' url="data/footTransferHardness.png" />
 
100
          </OpacityMapVolumeStyle>
 
101
      <ROUTE fromNode="VM" fromField="dimensions" toNode="transferHardness" toField="dimensions"/>
 
102
          
 
103
 
 
104
 
 
105
      </VolumeData>
 
106
      <VolumeData DEF="transferSkin"
 
107
                  rayStep="0.01"
 
108
                  useSlicing="false">
 
109
        <Image3DTexture containerField="voxels"  USE="imageField"/>
 
110
        <OpacityMapVolumeStyle>
 
111
          <ImageTexture containerField='transferFunction' url="data/footTransferSkin.png" />
 
112
        </OpacityMapVolumeStyle>
 
113
      </VolumeData>
 
114
      <ROUTE fromNode="VM" fromField="dimensions" toNode="transferHardness" toField="transferSkin"/>
 
115
 
 
116
    </Switch>
 
117
 
 
118
    <PythonScript DEF="SettingsScript" url="settings.py" />
 
119
        <PythonScript DEF="SoundScript" url="sound.py" />
 
120
    <KeySensor DEF="KS" />
 
121
 
 
122
    <!-- Routes to/from PythonScript -->
 
123
    <ROUTE fromNode="KS" fromField="keyPress" 
 
124
        toNode="SettingsScript" toField="keyManager" />
 
125
    <ROUTE fromNode="SettingsScript" fromField="renderMethod" 
 
126
        toNode="renderMethod" toField="whichChoice" />
 
127
    <ROUTE fromNode="SettingsScript" fromField="f_windowCenter" 
 
128
           toNode="WFT" toField="windowCenter" />
 
129
    <ROUTE fromNode="SettingsScript" fromField="f_windowWidth" 
 
130
           toNode="WFT" toField="windowWidth" />
 
131
 
 
132
    <ROUTE fromNode="SettingsScript" fromField="f_cutRadius" 
 
133
           toNode="DN" toField="cutRadius" />
 
134
    <ROUTE fromNode="SettingsScript" fromField="f_drillSpeed" 
 
135
           toNode="DN" toField="drillSpeed" />
 
136
 
 
137
        <ROUTE fromNode="HDEV" fromField="mainButton" toNode="SoundScript" toField="setButton" />
 
138
   
 
139
 
 
140
    <ROUTE fromNode="HDEV" fromField="trackerPosition" toNode="DN" toField="position" />
 
141
    <ROUTE fromNode="HDEV" fromField="mainButton" toNode="DN" toField="isActive" />
 
142
        <ROUTE fromNode="HDEV" fromField="trackerPosition" toNode="SM" toField="position" />
 
143
 
 
144
 
 
145
 
 
146
 
 
147
  </Collision>