#VRML V2.0 utf8 # #
## RGB example DEF CAM1 Viewpoint { position 0 0 10 description "Camera 1" } DEF CAM2 Viewpoint { position 0 0 12 description "Camera 2" } DEF CAM3 Viewpoint { position 0 0 14 description "Camera 3" } NavigationInfo { type "EXAMINE" } PROTO BoxTransform [ exposedField SFRotation rotation 0 0 0 0.0 exposedField SFVec3f translation 0 0 0 exposedField SFColor boxcolor 1.0 1.0 1.0 exposedField SFVec3f size 2.0 2.0 2.0 ] { Transform { rotation IS rotation translation IS translation children [ Shape { appearance Appearance { material Material { diffuseColor IS boxcolor } } geometry Box { size IS size } } ] } } PROTO CylinderTransform [ exposedField SFRotation rotation 0 0 0 0.0 exposedField SFVec3f translation 0 0 0 field SFColor diffuseColor 1 1 1 field SFFloat radius 0.5 field SFFloat height 2.0 ] { Transform { rotation IS rotation translation IS translation children [ Shape { appearance Appearance { material Material { diffuseColor IS diffuseColor } } geometry Cylinder { radius IS radius height IS height } } ] } } PROTO TextTransform [ exposedField SFRotation rotation 0 0 0 0.0 exposedField SFVec3f translation 0 0 0 exposedField MFString text [ "undefined", "text" ] ] { Transform { rotation IS rotation translation IS translation scale 0.5 0.5 0 children [ Shape { appearance Appearance { material Material { diffuseColor 1.0 1.0 1.0 } } geometry Text { string IS text fontStyle FontStyle { family "SERIF" style "BOLD" justify "MIDDLE" } } } ] } } PROTO BoardTransform [ exposedField MFString text [ "Please", "wait", "...." ] exposedField SFRotation rotation 0 0 0 0.0 exposedField SFVec3f translation 0 0 0 ] { Transform { rotation IS rotation translation IS translation children [ Billboard { axisOfRotation 0 1 0 children [ BoxTransform { boxcolor 0.8 0.8 0.0 translation 0.0 0.0 -0.2 size 4 3 0.1 } TextTransform { text IS text } ] } ] } } PROTO RGBTransform [ exposedField SFRotation rotation 1 0 0 0.3 exposedField SFVec3f translation 0.0 0.0 0.0 exposedField SFVec3f boxposition 0.0 0.0 0.0 ## box exposedField SFColor boxcolor 1.0 1.0 1.0 eventOut SFBool isActive eventOut SFBool isOver eventOut SFVec3f hitPoint_changed exposedField SFFloat height 4.0 ] { Transform { rotation IS rotation translation IS translation children [ Group { children [ DEF TOUCH TouchSensor { isActive IS isActive isOver IS isOver hitPoint_changed IS hitPoint_changed } CylinderTransform { height IS height radius 0.1 rotation 0 0 1 1.57 } ] } DEF BOX BoxTransform { size 0.5 0.5 0.5 translation IS boxposition boxcolor IS boxcolor } ] } } Transform { rotation 0 0 0 0.0 translation 0.0 0.0 0.0 children [ DEF cylR RGBTransform { translation 2 1.0 0 } DEF cylG RGBTransform { translation 2 0.0 0 } DEF cylB RGBTransform { translation 2 -1.0 0 } DEF cube BoxTransform { rotation 1 1 1 0.5 translation 3.0 3.0 0.0 size 1.5 1.5 1.5 } DEF board BoardTransform { translation -4.0 2.0 -2.0 } ] } ## #