hud.wrl

#VRML V2.0 utf8

# Global objects
WorldInfo {
   title "Floppy's VRML Workshop HUD Example"
   info ["(C) Copyright 1999 Vapour Technology"
         "guide@web3dguide.org.uk"]
}
NavigationInfo {
   headlight FALSE
   type ["WALK", "ANY"]
}
DEF SENSOR ProximitySensor {
   size 10 10 10
   center 0 0 10
}

# Real-World objects
Transform {
   children [
      DirectionalLight {
         ambientIntensity 0.8
      }
      Transform {
         translation 3 0 0
         children [
            Shape {
               appearance Appearance {
                  material Material {
                     diffuseColor 0 0 1
                  }
               }
               geometry Cone {}
            }
         ]
      }
      Shape {
         appearance Appearance {
            material Material {
               diffuseColor 0 1 0
            }
         }
         geometry Sphere {}
      }
      Transform {
         translation -3 0 0
         children [
            Shape {
               appearance Appearance {
                  material Material {
                     diffuseColor 1 0 0
                  }
               }
               geometry Box {}
            }
         ]
      }
   ]
}

#HUD objects
DEF HUDVIEW Viewpoint {
   description "HUD View"
   position 0 0 10
}
DEF HUD Transform {
   translation 0 0 10
   children [
      Collision {
         collide FALSE
         children [
            DirectionalLight {
               ambientIntensity 0.8
            }
            Transform {
               translation 0 -0.075 -0.2
               children [
                  Shape {
                     appearance Appearance {
                        material Material {
                           diffuseColor 1 0 1
                        }
                     }
                     geometry Box {
                        size 0.03 0.03 0.000000001
                     }
                  }
               ]
            }
         ]
      }
   ]
}  

ROUTE SENSOR.orientation_changed TO HUD.set_rotation
ROUTE SENSOR.position_changed TO HUD.set_translation
ROUTE SENSOR.position_changed TO SENSOR.set_center

Generated by GNU enscript 1.6.1.