#VRML V2.0 utf8 WorldInfo { title "Etalage" info ["Gemaakt door Pim van den Broek & Natalie Vijlbrief" "vr0208@cs.vu.nl"] } NavigationInfo{ type "EXAMINE" } ######################################## # # # Etalage # # # ######################################## # Muren PROTO print_muur [ exposedField SFVec3f translation 0 0 0 exposedField SFVec3f scale 1 1 1 exposedField SFRotation rotation 0 0 0 0 field SFFloat height 0 ] { Transform { translation IS translation scale IS scale rotation IS rotation children [ Transform { children [ Shape { appearance Appearance { texture ImageTexture { url "steen.jpg" repeatS TRUE repeatT TRUE } } geometry Box { size 1 1 1 } } ] } ] } } Transform { children [ #achtermuur Transform { translation 0 0 -10 rotation 0 0 0 0 scale 20 10 1 children [ print_muur {} ] } # rechter muur Transform { translation 10.5 0 -3 rotation 0 1 0 1.57 scale 15 10 1 children [ print_muur {} ] } # linker muur Transform { translation -10.5 0 -3 rotation 0 1 0 1.57 scale 15 10 1 children [ print_muur {} ] } # Plafond Transform { translation 0 5.25 -3 scale 22 15 0.5 rotation 1 0 0 1.57 children [ print_muur {} ] } ] } # Grond Transform { translation 0 -4.8 -3 scale 20 14.9 0.5 rotation 1 0 0 1.57 children [ Transform { children [ Shape { appearance Appearance { texture ImageTexture { url "wood2.jpg" repeatS TRUE repeatT TRUE } } geometry Box { size 1 1 1 } } ] } ] } # Etalageglas Transform { translation 0 0.25 4.45 rotation 0 0 0 0 scale 20 9.5 0.1 children [ DEF GLAS Transform { children [ Shape { appearance Appearance { material Material { transparency 0.45 diffuseColor 0.5 0.5 0.6 emissiveColor 0.5 0.5 0.6 } } geometry Box { size 1 1 1 } } ] } ] } #Achterplank Transform { translation 0 0 -7.4 scale 6 0.15 12 rotation 0 1 0 1.57 children [ Transform { children [ Shape { appearance Appearance { texture ImageTexture { url "wood3.jpg" repeatS TRUE repeatT TRUE } } geometry Box { size 1 1 1 } } ] } ] } # linker plank Transform { translation -8.0 0 -3.45 scale 4 0.15 14 children [ Transform { children [ Shape { appearance Appearance { texture ImageTexture { url "wood3.jpg" repeatS TRUE repeatT TRUE } } geometry Box { size 1 1 1 } } ] } ] } # rechter plank Transform { translation 8.0 0 -3.45 scale 4 0.15 14 children [ Transform { children [ Shape { appearance Appearance { texture ImageTexture { url "wood3.jpg" repeatS TRUE repeatT TRUE } } geometry Box { size 1 1 1 } } ] } ] } ######################################## # # # Steen # # # ######################################## Group { children [ Transform { translation 8 0 15 rotation 0 1 0 1.57 children [ DEF SENSOR PlaneSensor { maxPosition 9.5 0 minPosition 0 0 } DEF SLIDER Transform { children [ Shape { appearance Appearance { material Material { diffuseColor 0.8 0.6 0.6 shininess 0 } } geometry Sphere { radius 1 } } ] } ] } ] } ######################################## # # # Lampjes # # # ######################################## EXTERNPROTO lavalamp [ exposedField SFVec3f translation exposedField SFVec3f scale exposedField MFString url exposedField SFColor content_color ][ "lavalamp.wrl#lavalamp" ] Transform { translation 2 1.89 -6 scale 0.6 0.6 0.6 children [ lavalamp { content_color 0 1 0 } ] } Transform { translation 6 1.89 -6 scale 0.6 0.6 0.6 children [ lavalamp { content_color 1 0 0 } ] } Transform { translation -2 1.29 -6 scale 0.4 0.4 0.4 children [ lavalamp { content_color 1 0 0 } ] } Transform { translation -6 1.29 -6 scale 0.4 0.4 0.4 children [ lavalamp { content_color 1 0 0 } ] } ######################################## # # # Add Viewpoints # # # ######################################## Viewpoint { position 5 3 35 description "Start" } Viewpoint { position 0 0 20 description "Overview" } Viewpoint { position -5 0 10 description "Left" } Viewpoint { position 5 0 10 description "Right" } ######################################## # # # Scripts etc # # # ######################################## DEF STONESCRIPT Script { eventIn SFVec3f translation_changed eventOut SFVec3f glas_translation url "javascript: function translation_changed() { if (translation_changed == '9.5 0 0') { glas_translation = '1000 1000 1000'; } } " } ROUTE SENSOR.translation_changed TO SLIDER.translation ROUTE SENSOR.translation_changed TO STONESCRIPT.translation_changed ROUTE STONESCRIPT.glas_translation TO GLAS.translation