#VRML V2.0 utf8 # file: kelp.wrl # Testing the kelp proto node # requires kelp_proto.wrl and bulb.wrl # Joe Cannon # CS-4700 # # 5/15 removed viewpoints except Far Away, changed time step to 5.5sec # 5/21 - made base natural color, awaiting holdfast image # 6/8 - removed all viewpoints, all done in main tank.wrl # EXTERNPROTO Charlie [ exposedField SFVec3f frontSideBladeHeight exposedField SFVec3f rightSideBladeHeight exposedField SFVec3f rearSideBladeHeight exposedField SFVec3f leftSideBladeHeight exposedField SFVec3f frontBladeSize exposedField SFVec3f rightBladeSize exposedField SFVec3f rearBladeSize exposedField SFVec3f leftBladeSize ] "kelp_proto.wrl#Kelp" # Group { children [ # Viewpoint { # description "Kelp Far Away" # position 0 4 15 } # the base Transform { children [ Shape { appearance Appearance { material Material { diffuseColor 0.882 0.757 0.184 } }# Appearance geometry Cone { bottomRadius 1.5 height 1.0 } }# Shape ] }# base Transform # The kelp Transform { children [ # the default DEF Kelp1 Transform { scale 0.3 0.3 0.3 children [ Charlie { } ] } DEF Kelp2 Transform { rotation 0.0 1.0 0.0 5.5 translation -0.5 0.0 0.0 scale 0.29 0.29 0.29 children [ Charlie { frontSideBladeHeight 0.0 23.0 0.0 rightSideBladeHeight 0.0 20.0 0.0 rearSideBladeHeight 0.0 15.0 0.0 leftSideBladeHeight 0.0 6.0 0.0 frontBladeSize 0.4 0.4 0.4 rightBladeSize 0.4 0.4 0.4 rearBladeSize 0.7 0.7 0.7 leftBladeSize 0.7 0.7 0.7 } ] } DEF Kelp3 Transform { translation 0.5 0.0 0.5 scale 0.3 0.3 0.3 children [ Charlie { frontSideBladeHeight 0.0 8.0 0.0 rightSideBladeHeight 0.0 16.0 0.0 rearSideBladeHeight 0.0 18.0 0.0 leftSideBladeHeight 0.0 13.0 0.0 frontBladeSize 0.7 0.7 0.7 rightBladeSize 0.7 0.7 0.7 rearBladeSize 0.4 0.4 0.4 leftBladeSize 0.7 0.7 0.7 } ] } ] },# KelpBunch Transform # Animation Clock DEF Clock TimeSensor { cycleInterval 5.5 loop TRUE }, # Kelp Animation path DEF KelpPath OrientationInterpolator { key [ 0.0, 0.25, 0.5, 0.75, 1.0 ] keyValue [ 0.0 0.0 1.0 0.1 0.0 0.0 1.0 0.0 0.0 0.0 1.0 -0.1 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.1 ] }, ] }#Group ROUTE Clock.fraction_changed TO KelpPath.set_fraction ROUTE KelpPath.value_changed TO Kelp1.set_rotation ROUTE KelpPath.value_changed TO Kelp2.set_rotation ROUTE KelpPath.value_changed TO Kelp3.set_rotation