media @ VU
web3d-x-spheresensor.vr
web3d-x-spheresensor.vr
(wrl
)
[ flux /
bitmanagement /
cortona /
octaga
]
Web3D/VR
sphere sensor
object proto
PROTO SphereTransform [
exposedField SFVec3f sphereTranslation 0 0 0
exposedField SFRotation sphereRotation 0 0 0 0
exposedField SFColor sphereColor 1 1 1
exposedField SFFloat sphereRadius 1.0
]
{
Transform {
translation IS sphereTranslation
rotation IS sphereRotation
children [
Shape {
appearance Appearance {
material Material {
diffuseColor IS sphereColor
}
}
geometry Sphere {
radius IS sphereRadius
}
}
]
}
}
the scene group
Group {
children [
Group {
children [
DEF SENSOR SphereSensor {
}
some objects
DEF SPHERE_1 SphereTransform {
sphereRadius 3.0
sphereColor 1 0 0
}
DEF SPHERE_2 SphereTransform {
sphereRadius 2.0
sphereTranslation 5 0 0
sphereColor 1 1 0
}
DEF SPHERE_3 SphereTransform {
sphereRadius 1.0
sphereTranslation 8 0 0
sphereColor 1 1 1
}
]
}
]
}
event routing
ROUTE SENSOR.rotation_changed TO SPHERE_1.sphereRotation
ROUTE SENSOR.rotation_changed TO SPHERE_2.sphereRotation
ROUTE SENSOR.rotation_changed TO SPHERE_3.sphereRotation
(C) A. Eliëns
21/5/2007
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.