| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/colorlineareffect.h>

Public Types | |
| enum | Mode { AUTO_REVERSE_EFFECT = 0x0001, MANUAL_REVERSE_EFFECT = 0x0002 } |
| Constructor to fade back and forth between two colors. More... | |
Public Member Functions | |
| ColorLinearEffect () | |
| ColorLinearEffect (SO< ColorAttribute > fxAttribute, const Color &fxEndColor, Mode mode=AUTO_REVERSE_EFFECT) | |
| ColorLinearEffect (SO< ColorAttribute > fxAttribute, double alpha, Mode mode=AUTO_REVERSE_EFFECT) | |
| Constructor to only change the alpha value. | |
| ColorLinearEffect (SO< ColorAttribute > fxAttribute, Mode mode=AUTO_REVERSE_EFFECT) | |
| Minimum constructor. | |
| virtual void | activate (int hint=BehaviorNode::NoHint) |
| virtual void | deactivate (int) |
| virtual BehaviorNode::InvalidationHint | handle (Event *) |
| void | reverseEffect () |
| Will switch start and end color / alpha values, so the next call to the effect will actually reverse it. Call only when mode is set to MANUAL_REVERSE_EFFECT. | |
| Color | getEndColor () const |
| void | setEndColor (const Color &fxEndColor) |
| double | getEndAlpha () const |
| void | setEndAlpha (double endAlpha) |
| Color | getStartColor () const |
| void | setStartColor (const Color &fxStartColor) |
| double | getStartAlpha () const |
| void | setStartAlpha (double alpha) |
| SO< ColorAttribute > | getColorAttribute () const |
| void | setColorAttribute (SO< ColorAttribute > val) |
| VRS_TYPEINFO (ColorLinearEffect, LeafBehavior) | |
| VRS_SERIALIZABLE (ColorLinearEffect) | |
Constructor to fade back and forth between two colors.
| fxAttribute | The ColorAttribute affected by the effect. All shapes belonging to this attribute will be changed accordingly | |
| fxEndColor | The color the transition will end with. The start color is taken from the fxAttribute | |
| mode | AUTO_REVERSE_EFFECT means that after the transition is finished start and end color are switched, so the next call of the effect will reverse it |
| VRS::ColorLinearEffect::ColorLinearEffect | ( | ) |
| VRS::ColorLinearEffect::ColorLinearEffect | ( | SO< ColorAttribute > | fxAttribute, | |
| const Color & | fxEndColor, | |||
| Mode | mode = AUTO_REVERSE_EFFECT | |||
| ) |
| VRS::ColorLinearEffect::ColorLinearEffect | ( | SO< ColorAttribute > | fxAttribute, | |
| double | alpha, | |||
| Mode | mode = AUTO_REVERSE_EFFECT | |||
| ) |
Constructor to only change the alpha value.
| fxAttribute | The ColorAttribute affected by the effect. All shapes belonging to this attribute will be changed accordingly | |
| alpha | The alpha value the transition will end with. The start alpha value is taken from the fxAttribute | |
| mode | AUTO_REVERSE_EFFECT means that after the transition is finished start and end color are switched, so the next call of the effect will reverse it |
| VRS::ColorLinearEffect::ColorLinearEffect | ( | SO< ColorAttribute > | fxAttribute, | |
| Mode | mode = AUTO_REVERSE_EFFECT | |||
| ) |
Minimum constructor.
Easy for fading in/out the shapes affected by the fxAttribute:
Depending on the alpha value of the fxAttribute 0 (1 respectively) the transition will change
the alpha value to 1 (0 respectively)
| fxAttribute | The ColorAttribute affected by the effect. All shapes belonging to this attribute will be changed accordingly | |
| mode | AUTO_REVERSE_EFFECT means that after the transition is finished start and end color are switched, so the next call of the effect will reverse it |
| virtual void VRS::ColorLinearEffect::activate | ( | int | hint = BehaviorNode::NoHint |
) | [virtual] |
Reimplemented from VRS::BehaviorNode.
| virtual void VRS::ColorLinearEffect::deactivate | ( | int | ) | [virtual] |
Reimplemented from VRS::BehaviorNode.
| virtual BehaviorNode::InvalidationHint VRS::ColorLinearEffect::handle | ( | Event * | event | ) | [virtual] |
'handle' receives and possibly propagates events. A behavior node returns an invalidation hint, indicating whether the associated canvas (if any) or the whole world (that is, all canvases) needs to be redrawn.
Implements VRS::BehaviorNode.
| void VRS::ColorLinearEffect::reverseEffect | ( | ) |
Will switch start and end color / alpha values, so the next call to the effect will actually reverse it. Call only when mode is set to MANUAL_REVERSE_EFFECT.
| Color VRS::ColorLinearEffect::getEndColor | ( | ) | const |
| void VRS::ColorLinearEffect::setEndColor | ( | const Color & | fxEndColor | ) |
| double VRS::ColorLinearEffect::getEndAlpha | ( | ) | const |
| void VRS::ColorLinearEffect::setEndAlpha | ( | double | endAlpha | ) |
| Color VRS::ColorLinearEffect::getStartColor | ( | ) | const |
| void VRS::ColorLinearEffect::setStartColor | ( | const Color & | fxStartColor | ) |
| double VRS::ColorLinearEffect::getStartAlpha | ( | ) | const |
| void VRS::ColorLinearEffect::setStartAlpha | ( | double | alpha | ) |
| SO<ColorAttribute> VRS::ColorLinearEffect::getColorAttribute | ( | ) | const [inline] |
| void VRS::ColorLinearEffect::setColorAttribute | ( | SO< ColorAttribute > | val | ) | [inline] |
| VRS::ColorLinearEffect::VRS_TYPEINFO | ( | ColorLinearEffect | , | |
| LeafBehavior | ||||
| ) |
| VRS::ColorLinearEffect::VRS_SERIALIZABLE | ( | ColorLinearEffect | ) |