Inheritance diagram for Eaagles::BasicGL::Rotators:


Public Member Functions | |
| Rotators () | |
| LCreal | getRotationAngleRad () const |
| LCreal | getRotationAngleDeg () const |
| bool | setRotationAngleRad (const LCreal angle) |
| bool | setRotationAngleDeg (const LCreal angle) |
| virtual void | draw () |
| virtual bool | event (const int event, Basic::LcObject *const obj=0) |
Private Member Functions | |
| bool | onUpdateRotateRad (const Basic::LcAngle *const rotation) |
| bool | onUpdateRotateRad (const Basic::LcNumber *const rotation) |
| bool | onUpdateRotateDeg (const Basic::LcNumber *const rotation) |
Private Attributes | |
| LCreal | myRotation |
A simple graphic that rotates, and can accept either degrees or radians
Inputs:
UPDATE_VALUE = updates our rotation in RADIANS
UPDATE_VALUE2 = updates our rotation in DEGREES
Note: Since we convert statically to radians any time we pass an LcAngle as
an event argument, there is no need to have an event function that converts
an LcAngle to degrees. You can pass an LcDegrees as an even argument using
UPDATE_VALUE, and it will automatically convert to radians. That is why there
is no onUpdateRotateDeg with an LcAngle argument.
| Eaagles::BasicGL::Rotators::Rotators | ( | ) |
Constructor. Initializes the myRotation variable (how much the compass is to be rotated in radians) to 0.0.
| LCreal Eaagles::BasicGL::Rotators::getRotationAngleRad | ( | ) | const [inline] |
Returns the angle in radians.
| LCreal Eaagles::BasicGL::Rotators::getRotationAngleDeg | ( | ) | const [inline] |
Returns the angle in degrees.
| bool Eaagles::BasicGL::Rotators::setRotationAngleRad | ( | const LCreal | angle | ) |
Sets the rotation angle (rad).
| bool Eaagles::BasicGL::Rotators::setRotationAngleDeg | ( | const LCreal | angle | ) |
Sets the rotation angle (deg).
| void Eaagles::BasicGL::Rotators::draw | ( | ) | [virtual] |
Draws the object and its components with the defined attributes (e.g., color, line width, transformation matrix).
Reimplemented from Eaagles::BasicGL::LcGraphic.
| virtual bool Eaagles::BasicGL::Rotators::event | ( | const int | event, | |
| Basic::LcObject *const | obj = 0 | |||
| ) | [virtual] |
Sends the 'event' message with optional argument 'obj'. Returns true if the 'event' has been received and used. Derived classes will provided event() handlers, as needed. Event() can be called from an updateTC() routines, therefore,the event message must be processed quickly (i.e., no waits)
Reimplemented from Eaagles::Basic::LcComponent.
| bool Eaagles::BasicGL::Rotators::onUpdateRotateRad | ( | const Basic::LcAngle *const | rotation | ) | [private] |
Event callback. Updates the rotation value in radians.
| bool Eaagles::BasicGL::Rotators::onUpdateRotateRad | ( | const Basic::LcNumber *const | rotation | ) | [private] |
Event callback. Updates the rotation value in radians.
| bool Eaagles::BasicGL::Rotators::onUpdateRotateDeg | ( | const Basic::LcNumber *const | rotation | ) | [private] |
Updates the rotation value in degrees. We don't need a rotate degree for Basic::LcAngle, because if an angle is sent, it is automatically converted to radians
LCreal Eaagles::BasicGL::Rotators::myRotation [private] |
How much we are going to rotate the compass (radians).
1.5.0