A SERVICE OF

logo

128
Chapter 11: Sensors
Updating csSphereSensor
csSphereSensor is not updated automatically. You customarily update it explicitly when
pointer device events are detected, using one of the following methods:
csSphereSensor::updateSensors();
csWindow::updateSensors();
The difference between the methods is that the arguments to the csSphereSensor version
includes pointer device coordinates.
Note: csSphereSensor inherits updateSensors() from its abstract, base class,
csPickSensor.
Setting Up csSphereSensor
The typical use of a csSphereSensor is to connect it with a transformation node. The
effect of the sensor when combined with a transformation node is to rotate associated
geometries spherically in local or world space according to the dragging motion of a
pointer device: dragging the pointer device to the right spins the front of the geometry to
the right; dragging the pointer device up spins the front of the geometry up.
Scope of csSphereSensor
A csSphereSensor is associated with all geometry in the scene graph below the parent
node of the csSphereSensor, as shown in Figure 11-2.