| Cover | TOC | Chap | Prev Chap | Prev Fig | Next Fig | Next Chap |
|
Figure 9.6
Two shapes that rotate when the viewer drags them. |
|
|
Click on the image to view the VRML scene. |
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright (c) 1997
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
children [
Group {
children [
DEF Shape1 Transform {
children Shape {
appearance DEF White Appearance {
material Material { }
}
geometry Box { }
}
},
DEF Shape1Sensor SphereSensor { }
]
},
Group {
children [
DEF Shape2 Transform {
translation 2.5 0.0 0.0
children Shape {
appearance USE White
geometry Cone { }
}
},
DEF Shape2Sensor SphereSensor { }
]
}
]
}
ROUTE Shape1Sensor.rotation_changed TO Shape1.set_rotation
ROUTE Shape2Sensor.rotation_changed TO Shape2.set_rotation