CS248 - VRML Tutorial - Slide 16

Sensor Example


DEF TIMER TimeSensor { cycleInterval 10 startTime 0 loop FALSE } DEF SPIN OrientationInterpolator { .... } ROUTE TIMER.fraction_changed TO SPIN.set_fraction DEF OBJECT_TO_SPIN Transform { children [ DEF A_TOUCH_SENSOR TouchSensor {} Shape { ... } ] } ROUTE SPIN.value_changed TO OBJECT_TO_SPIN.rotation ROUTE A_TOUCH_SENSOR.touchTime TO TIMER.startTime


Slide 16 - 2/20/97 - Copyright © 1997 Reid Gershbein