u4.wrl

 tank.wrl  cafe.wrl  stavba.wrl  sibenice.wrl  tw.wrl  tree.wrl  hud.wrl  garaz2.wrl  fence.wrl  table.wrl  u4.wrl 
Zpět Zpět
   1 : #VRML V2.0 utf8
   2 : 
   3 : WorldInfo {
   4 :  info ["Author: Jakub Zemlicka, Martin Petricek, Tomas Kazmar"]
   5 :  title "Uloha 4"
   6 : }
   7 : 
   8 : NavigationInfo {
   9 :  headlight FALSE
  10 : }
  11 : 
  12 : Background {
  13 :  skyColor [.1 .2 .2]
  14 :  groundColor [.1 .2 .1]
  15 : }
  16 : 
  17 : DirectionalLight {
  18 :  intensity .3
  19 :  ambientIntensity .3
  20 :  direction -20 -8 -2
  21 : }
  22 : 
  23 : Viewpoint {
  24 :  description "Daleko 1"
  25 :  position 27 40 70
  26 :  orientation 0.717 -0.69 -0.1 -0.681
  27 :  jump FALSE
  28 : }
  29 : 
  30 : Viewpoint {
  31 :  description "Daleko 2"
  32 :  position -20 40 70
  33 :  orientation -0.717 -0.69 -0.1 0.681
  34 :  jump FALSE
  35 : }
  36 : 
  37 : Viewpoint {
  38 :  description "Stredni 1"
  39 :  position 25 1.6 21
  40 :  orientation 0 1 0 1.1
  41 :  jump FALSE
  42 : }
  43 : 
  44 : Viewpoint {
  45 :  description "Stredni 2"
  46 :  position 23 1.6 23
  47 :  orientation 0 1 0 0.6
  48 :  jump FALSE
  49 : }
  50 : 
  51 : Viewpoint {
  52 :  description "Blizko 1"
  53 :  position -11.37 1.6 17.41
  54 :  orientation -0.6 0.8 0.05 0.2
  55 :  jump FALSE
  56 : }
  57 : 
  58 : Viewpoint {
  59 :  description "Blizko 2"
  60 :  position -12 1.6 17.5
  61 :  orientation -0.93 0.35 0 0.18
  62 :  jump FALSE
  63 : }
  64 : 
  65 : EXTERNPROTO Tank [
  66 :  exposedField SFVec3f pos
  67 :  exposedField SFRotation rot
  68 :  exposedField SFInt32 lod
  69 :  exposedField SFColor wheelColor
  70 :  exposedField SFColor wheelDarkColor
  71 :  exposedField SFNode tex
  72 :  field MFFloat lodRanges
  73 :  exposedField SFColor light
  74 :  exposedField SFFloat lightIntensity
  75 :  eventIn SFBool lightOn
  76 :  exposedField SFTime startRotation
  77 :  exposedField SFTime stopRotation
  78 :  eventIn SFFloat rotSpeed
  79 : ] "tank.wrl#Tank"
  80 : 
  81 : EXTERNPROTO TankTex [
  82 :  field MFString tex
  83 : ] "tank.wrl#TankTex"
  84 : PROTO Pink[]{
  85 :  Appearance {
  86 :   material Material {
  87 :    diffuseColor .9 .5 .9
  88 :    ambientIntensity .6
  89 :    specularColor .3 .1 .3
  90 :   }
  91 :  }
  92 : }
  93 : 
  94 : EXTERNPROTO	Kafemlynek [ 
  95 :  exposedField SFInt32 lod
  96 :  exposedField MFString	texture
  97 :  exposedField SFColor Color
  98 :  field MFFloat lodRanges
  99 :  field SFVec3f rot
 100 :  field SFColor lightcolor
 101 :  eventIn SFBool lightOn
 102 :  exposedField SFTime startRotation
 103 :  exposedField SFTime stopRotation
 104 :  eventIn SFFloat rotSpeed
 105 : ] "cafe.wrl#Kafemlynek"
 106 : 
 107 : 
 108 : EXTERNPROTO TW [
 109 :  exposedField SFNode plastic
 110 :  exposedField SFNode steel
 111 :  exposedField SFColor light
 112 :  eventIn SFBool lightOn
 113 :  exposedField SFTime startRotation
 114 :  exposedField SFTime stopRotation
 115 :  eventIn SFFloat rotSpeed
 116 : ] "tw.wrl#TW"
 117 : 
 118 : Transform {
 119 :  translation 7 0 8
 120 :  children [
 121 :   Viewpoint {
 122 :    description "Stul 1"
 123 :    position -2.2 1.6 -2.5
 124 :    orientation 0.717 -0.69 -0.1 -0.681
 125 :    jump FALSE
 126 :   }
 127 :   Transform {
 128 :    scale .08 .08 .08
 129 :    translation -3.35 .77 -4.3
 130 :    children DEF T1 Tank { rot 0 1 0 1.54 lightIntensity 10 light 1 0 0 lod 1 pos 0 1.3 0 tex TankTex{ tex "tank1.png"} wheelColor .6 .4 0 wheelDarkColor .3 .3 0}
 131 :   }
 132 :   Transform { translation -3.2 .77 -3.8 children DEF KAFE1 Kafemlynek {lod 1 texture "drevo.jpg" Color 1 1 1 lightcolor 0 0 1} rotation 0 1 0 .5}
 133 :   Transform { translation -2.7 .77 -3.7 children DEF TW1 TW {
 134 :     light 0 1 0
 135 :     plastic Appearance {
 136 :      texture ImageTexture { url ["marble02_sm.png"] }
 137 :      material Material {
 138 :       diffuseColor .47 .53 .6
 139 :       specularColor .32 .4 .4
 140 :       emissiveColor .07 .08 .09
 141 :       ambientIntensity .0667
 142 :       shininess .54
 143 :      }
 144 :     }
 145 :     steel Appearance {
 146 :      texture ImageTexture { url ["metal.png"] }
 147 :      material Material {
 148 :       diffuseColor .61 .61 .61
 149 :       specularColor .39 .39 .39
 150 :       ambientIntensity .25
 151 :       shininess .11
 152 :      }
 153 :     }
 154 :    }
 155 :    rotation 0 1 0 .1}
 156 :   Transform { translation -3 0 -4.2 children DEF Table Inline { url "table.wrl#Table" } }
 157 :  ]
 158 : }
 159 : Transform {
 160 :  translation 5 0 0
 161 :  children [
 162 :   Transform { translation 0 0 0 children Inline { url "garaz2.wrl" } }
 163 :   DEF T2 Tank { lightIntensity 1.5 light 0 1 0 lod 1 pos -18 1.3 10 rot 0 1 0 4   tex Pink{} wheelColor .8 .4 .8 wheelDarkColor .6 .5 .6}
 164 :   DEF T3 Tank { lightIntensity 10 light 1 0 1 lod 1 pos 12 1.3 13 rot 0 1 0 2.8 tex TankTex{} wheelColor 0 .4 0 wheelDarkColor 0 .1 0}
 165 :  ]
 166 : }
 167 : 
 168 : Transform {
 169 :  rotation 0 1 0 1.4
 170 :  translation 23 0 18
 171 :  children Group {
 172 :   children [
 173 :    Transform { translation -3.2 .77 -3.8 children DEF KAFE2 Kafemlynek {lod 1 texture "mahagon_md.jpg" lightcolor 0 1 0} rotation 0 1 0 .5}
 174 :    Transform { translation -2.7 .77 -3.7 children DEF TW2 TW {
 175 :      light 1 0 0 
 176 :      plastic Appearance {
 177 :       texture ImageTexture { url ["wood25_sm.png"] }
 178 :       material Material {}
 179 :      }
 180 :      steel Appearance {
 181 :       texture ImageTexture {
 182 :        url ["gold2_sm.png"]
 183 :       }
 184 :       material Material {}
 185 :      }
 186 :     }			
 187 :     rotation 0 1 0 .1}
 188 :    Transform { translation -3 0 -4.2 children USE Table }
 189 :   ]
 190 :  }
 191 : }
 192 : 
 193 : Transform {
 194 :  center -3 0 -4.2
 195 :  translation -9 0 19
 196 :  children Group {
 197 :   children [
 198 :    Transform { translation -3.2 .77 -3.8 children DEF KAFE3 Kafemlynek {lod 1 texture "cafe8.png" Color 1 1 1 lightcolor 1 0 0} rotation 0 1 0 .5}
 199 :    Transform { translation -2.7 .77 -3.7 children DEF TW3 TW {light 0 0 1} rotation 0 1 0 .1}
 200 :    Transform { translation -3 0 -4.2 children USE Table }
 201 :   ]
 202 :  }
 203 : }
 204 : 
 205 : EXTERNPROTO Tree [ exposedField SFVec3f pos] "tree.wrl#Tree"
 206 : Transform { translation  12 0   14 children Tree{} rotation 0 1 0 1 scale 1 1 1.3 }
 207 : Transform { translation  10 0   15 children Tree{} rotation 0 1 0 2 scale 1 1.3 1.1 }
 208 : Transform { translation   8 0   17 children Tree{} rotation 0 1 0 3 scale 1.1 1.1 1.4 }
 209 : Transform { translation   6 0   16 children Tree{} rotation 0 1 0 4 scale 1.5 1.2 1 }
 210 : Transform { translation   4 0   18 children Tree{} rotation 0 1 0 5 scale 1.2 1.4 1 }
 211 : 
 212 : EXTERNPROTO Stavba [] "stavba.wrl#Stavba"
 213 : Transform { translation -14 0   -7 children Stavba{} rotation 0 1 0 1.57 }
 214 : 
 215 : EXTERNPROTO Sibenice [] "sibenice.wrl#Sibenice"
 216 : Transform { translation  12 0    9 children Sibenice{} rotation 0 1 0 1.57 }
 217 : 
 218 : 
 219 : EXTERNPROTO HudSystem [
 220 :  eventOut SFTime button1touchOn
 221 :  eventOut SFTime button1touchOff
 222 :  eventOut SFBool button2touch
 223 :  eventOut SFFloat slider
 224 :  exposedField SFVec3f pos
 225 :  exposedField SFRotation rot
 226 : ] "hud.wrl#HudSystem"
 227 : 
 228 : DEF H HudSystem {}
 229 : ROUTE H.button1touchOn TO T1.startRotation
 230 : ROUTE H.button1touchOff TO T1.stopRotation
 231 : ROUTE H.button2touch TO T1.lightOn
 232 : ROUTE H.slider TO T1.rotSpeed
 233 : ROUTE H.button1touchOn TO T2.startRotation
 234 : ROUTE H.button1touchOff TO T2.stopRotation
 235 : ROUTE H.button2touch TO T2.lightOn
 236 : ROUTE H.slider TO T2.rotSpeed
 237 : ROUTE H.button1touchOn TO T3.startRotation
 238 : ROUTE H.button1touchOff TO T3.stopRotation
 239 : ROUTE H.button2touch TO T3.lightOn
 240 : ROUTE H.slider TO T3.rotSpeed
 241 : 
 242 : ROUTE H.button1touchOn TO TW1.startRotation
 243 : ROUTE H.button1touchOff TO TW1.stopRotation
 244 : ROUTE H.button2touch TO TW1.lightOn
 245 : ROUTE H.slider TO TW1.rotSpeed
 246 : ROUTE H.button1touchOn TO TW2.startRotation
 247 : ROUTE H.button1touchOff TO TW2.stopRotation
 248 : ROUTE H.button2touch TO TW2.lightOn
 249 : ROUTE H.slider TO TW2.rotSpeed
 250 : ROUTE H.button1touchOn TO TW3.startRotation
 251 : ROUTE H.button1touchOff TO TW3.stopRotation
 252 : ROUTE H.button2touch TO TW3.lightOn
 253 : ROUTE H.slider TO TW3.rotSpeed
 254 : 
 255 : ROUTE H.button1touchOn TO KAFE1.startRotation
 256 : ROUTE H.button1touchOff TO KAFE1.stopRotation
 257 : ROUTE H.button2touch TO KAFE1.lightOn
 258 : ROUTE H.slider TO KAFE1.rotSpeed
 259 : ROUTE H.button1touchOn TO KAFE2.startRotation
 260 : ROUTE H.button1touchOff TO KAFE2.stopRotation
 261 : ROUTE H.button2touch TO KAFE2.lightOn
 262 : ROUTE H.slider TO KAFE2.rotSpeed
 263 : ROUTE H.button1touchOn TO KAFE3.startRotation
 264 : ROUTE H.button1touchOff TO KAFE3.stopRotation
 265 : ROUTE H.button2touch TO KAFE3.lightOn
 266 : ROUTE H.slider TO KAFE3.rotSpeed