132
Chapter 11: Sensors
Updating csPlaneSensor
csPlaneSensor is not updated automatically. You customarily update it explicitly when
pointer device events are detected, using one of the following methods:
csPlaneSensor::updateSensors();
csWindow::updateSensors();
The difference between the methods is that the csPlaneSensor version includes pointer
device coordinates.
Note: csPlaneSensor inherits updateSensors() from the abstract, base class,
csPickSensor.
Limiting Translations
While the csPlaneSensor is active, it generates translation and trackPoint events.
Translation events represent two-dimensional translations in the XY plane based on the
motion of the pointer device. The translation value is clamped to the range defined in the
following methods:
csPlaneSensor::minPosition();
csPlaneSensor::maxPosition();
If the X or Y component of maxPosition is equal to the corresponding component in
minPosition, that component is constrained to the specified value.
Unclamped Translations
You can create unclamped translations in two ways:
• Setting maxPosition component values less than minPosition values.
• Using trackPoint events.
If the X or Y component values of csPlaneSensor::maxPosition() are less than the
corresponding component values in csPlaneSensor::minPosition(), the translations in
that component’s direction are unclamped.