#VRML V2.0 utf8 # Ass. 4 MULTIMEDIA AUTHORING 2007-2008 WorldInfo { title "Product" info ["(C) Copyright 2007 V.G. Stolte & " "Nick Peterman"] } Viewpoint { position 2.5 -2 110 } NavigationInfo { headlight TRUE type "EXAMINE" } Background { skyColor [ 0.1 0.2 0.7, 0.1 0.5 1.0, 1.0 1.0 1.0 ] skyAngle [ 1.309, 1.571 ] groundAngle [ 1.309, 1.571 ] } NavigationInfo { type [ "EXAMINE", "ANY" ] } Anchor { children [ Transform { translation 2 4.5 75 children [ Shape { appearance Appearance { material Material { diffuseColor 1 0 0 emissiveColor 1 .5 0 } } geometry Text { string "Our MP3 Player stand:" fontStyle FontStyle { size 1 justify "MIDDLE" } } } ] } ] } EXTERNPROTO logo [ field SFColor textcolor field SFFloat doorzichtigheid ] ["logo.wrl"] Transform { translation 20 8 75 #rotation 1 0 0 -1.1 #scale 0.5 0.5 0.5 children [ logo { textcolor 1 1 1 } ] } EXTERNPROTO stand [ field SFColor textcolor field SFFloat doorzichtigheid ] ["stand.wrl"] EXTERNPROTO lamp [ field SFColor textcolor field SFFloat doorzichtigheid ] ["lamp.wrl"] Transform { translation 12 -7 95 rotation 0 1 0 -2.5 scale 7 7 7 children [ lamp { textcolor 1 1 1 } ] } EXTERNPROTO lamp2 [ field SFColor textcolor field SFFloat doorzichtigheid ] ["lamp.wrl"] Transform { translation -8 -7 95 rotation 0 1 0 2.5 scale 7 7 7 children [ lamp2 { textcolor 1 1 1 } ] } ## EXTERNPROTO lamp3 [ ##field SFColor textcolor ## field SFFloat doorzichtigheid ##] ##["lamp.wrl"] ## Transform { ## translation -10 -7 75 ## rotation 0 1 0 1 ## scale 7 7 7 ## children [ ## lamp3 { ## textcolor 1 1 1 ## ## } ##] ##} ##EXTERNPROTO lamp4 [ ## field SFColor textcolor ## field SFFloat doorzichtigheid ##] ##["lamp.wrl"] ## Transform { ## translation 12 -7 75 ## rotation 0 1 0 -1 ## scale 7 7 7 ## children [ ## lamp4 { ## textcolor 1 1 1 ## } ## ] ##} EXTERNPROTO product [ field SFColor textcolor field SFFloat doorzichtigheid ] ["product2a.wrl"] Transform { translation 3 16 50 rotation 0.0 1.0 0.0 0 scaleOrientation 1 1 1 1 children [ product { textcolor 1 1 1 } ] } DEF Triangle Transform { #translation 7 -2 2 # rotation 1 0 0 -1.1 #scale 0.5 0.5 0.5 children [ stand { textcolor 1 1 1 } ] } # CODE FOR THE TIMER DEF Clock TimeSensor { cycleInterval 10 loop TRUE } # CODE FOR THE INTERPOLATOR MAKING THE ROTATION DEF Spin OrientationInterpolator { key [0.0 0.5 1.0] keyValue [0.0 1.0 0.0 0.0, 0.0 1.0 0.0 -3.14, 0.0 1.0 0.0 -6.28] } Transform { translation 3 -7 -150 children [ Shape { appearance Appearance { material Material { diffuseColor 1 1 1 } } geometry Box { size 100 135 .5 } } ] } Transform { translation 45 -7 -150 rotation 0 1 0 -1 children [ Shape { appearance Appearance { material Material { diffuseColor 1 1 1 } } geometry Box { size 100 150 .5 } } ] } Transform { translation -35 -7 -150 rotation 0 1 0 1 children [ Shape { appearance Appearance { material Material { diffuseColor 1 1 1 } } geometry Box { size 100 150 .5 } } ] } # ROUTES NEEDED FOR ROTATION ROUTE Clock.fraction_changed TO Spin.set_fraction ROUTE Spin.value_changed TO Triangle.set_rotation SpotLight { on TRUE direction 1.0 -1.0 -1.0 location -10.0 10.0 10.0 color 1.0 0.1 0.1 } SpotLight { on TRUE direction -1.0 -1.0 -1.0 location 10.0 10.0 10.0 color 1.0 0.1 0.1 } DirectionalLight { on TRUE direction 0.0 -1.0 1.0 intensity 0.1 } DirectionalLight { on TRUE direction 0.0 1.0 1.0 intensity 0.1 }