#include <RNTStrategy.h>
Inherited by TossableRNTStrategy.
Inheritance diagram for RNTStrategy:
Public Member Functions | |
float * | getColor () |
void | setColor (float *c) |
float | getTranslationRadiusFactor () |
void | setTranslationRadiusFactor (float f) |
float | getDecorationWidth () |
void | setDecorationWidth (float w) |
bool | getDrawDecoration () |
void | setDrawDecoration (bool value) |
unsigned int | getNumberSegements () |
void | setNumberSegments (unsigned int nSegs) |
float | getSecsTimeout () |
void | setSecsTimeout (float secs) |
float | getSecsDuration () |
void | setSecsDuration (float secs) |
Protected Member Functions | |
virtual void | createDisplayList () |
void | initProperties () |
void | draw (const std::vector< unsigned long > &selectedIds) |
void | drawForPicking () |
void | onEvent (LargeDisplayEvent *evt) |
void | resize (unsigned int width, unsigned int height) |
bool | drop (bool parentChanged) |
void | readPassiveBuffers (const std::vector< unsigned int > &types) |
void | readAllPassiveBuffers () |
void | readAllPickingPassiveBuffers () |
bool | applyRNT (float x, float y) |
bool | isInsideTranslationArea (float x, float y) |
unsigned char | getButtonValue (unsigned int x, unsigned int y) |
Protected Attributes | |
float | color [4] |
bool | pressed |
float | previousX |
float | previousY |
float | translationRadiusFactor |
float | decorationWidth |
bool | drawDecoration |
unsigned int | buttonBufferType |
unsigned char | noButtonValue |
unsigned char | movableAreaButtonValue |
unsigned char | rntAreaButtonValue |
unsigned int | nSegments |
unsigned int | dlCircle |
unsigned int | dlWidth |
unsigned int | dlHeight |
float | dlScaleX |
float | dlScaleY |
int | frameTimeout |
int | frameDuration |
int | frameCount |
float | secsTimeout |
float | secsDuration |
float* RNTStrategy::getColor | ( | ) | [inline] |
Returns the color used to draw the RNT decoration as an array of 4 floats.
void RNTStrategy::setColor | ( | float * | c | ) | [inline] |
Sets the color to be used for drawing the RNT decoration as an array of 4 floats.
c | the color to be used for drawing the RNT decoration. |
float RNTStrategy::getTranslationRadiusFactor | ( | ) | [inline] |
Returns the value of the percentage of the smallest dimension that is used to calculate the radius of the translation-only area inside the component.
void RNTStrategy::setTranslationRadiusFactor | ( | float | f | ) | [inline] |
Sets the value of the percentage of the smallest dimension that is used to calculate the radius of the translation-only area inside the component.
f | the value to be used as the percentage of the smallest dimension that is used to calculate the radius of the translation-only area. |
float RNTStrategy::getDecorationWidth | ( | ) | [inline] |
Returns the value of the line width used for decoration drawings.
void RNTStrategy::setDecorationWidth | ( | float | w | ) | [inline] |
Sets the value of the line width used for decoration drawings.
w | the value to be used as the line width used for decoration. |
bool RNTStrategy::getDrawDecoration | ( | ) | [inline] |
Returns true if the RNT decoration should be drawn.
void RNTStrategy::setDrawDecoration | ( | bool | value | ) | [inline] |
Sets if the RNT decoration should be drawn.
value | true if the RNT decoration should be drawn, false otherwise. |
unsigned int RNTStrategy::getNumberSegements | ( | ) | [inline] |
Returns the number of segments in which the decoration circle is divided.
void RNTStrategy::setNumberSegments | ( | unsigned int | nSegs | ) | [inline] |
Sets the number of segments in which the decoration circle is divided.
nSegs | the number of segments in which the decoration circle is divided. |
float RNTStrategy::getSecsTimeout | ( | ) | [inline] |
Returns the number of seconds that the decorative circle should be displayed after the component is released.
void RNTStrategy::setSecsTimeout | ( | float | secs | ) | [inline] |
Sets the number of seconds that the decorative circle should be displayed after the component is released.
secs | the number of seconds that the RNT circle should be displayed. |
float RNTStrategy::getSecsDuration | ( | ) | [inline] |
Returns the number of seconds that the fading out of the decorative circle should last.
void RNTStrategy::setSecsDuration | ( | float | secs | ) | [inline] |
Sets the number of seconds that the fading out of the decorative circle should last.
secs | the number of seconds that the RNT circle fade out should last. |
void RNTStrategy::createDisplayList | ( | ) | [protected, virtual] |
Creates the display list to draw the decoration circle.
void RNTStrategy::initProperties | ( | ) | [inline, protected] |
Initializes the properties (i. e., i-buffers) of the associated component.
Reimplemented in TossableRNTStrategy.
void RNTStrategy::draw | ( | const std::vector< unsigned long > & | selectedIds | ) | [protected] |
Defines the drawing strategy for the associated component.
enablePicking | if true, draw for selection mode (adding the component id). |
void RNTStrategy::drawForPicking | ( | ) | [inline, protected] |
Defines the drawing strategy for the associated component that should be used for picking.
void RNTStrategy::onEvent | ( | LargeDisplayEvent * | evt | ) | [protected] |
Handles the given event.
evt | the event to be handled. |
Reimplemented in TossableRNTStrategy.
void RNTStrategy::resize | ( | unsigned int | width, | |
unsigned int | height | |||
) | [inline, protected] |
Defines the strategy to be used when the associated component is resized.
width | the new width of the component. | |
height | the new height of the component. |
bool RNTStrategy::drop | ( | bool | parentChanged | ) | [inline, protected] |
Defines the strategy to be used when the associated component is "dropped" inside another component (likely, a container). It is called when the component is processed from the manager's update list. It usually defines some "decorative" behavior such as triggering animations, since the composition structure is already managed by the LargeDisplayManager class. Returns true if this call resulted in adding the component to a container with animation.
parentChanged | true if the component's parent changed with the dropping. |
void RNTStrategy::readPassiveBuffers | ( | const std::vector< unsigned int > & | types | ) | [inline, protected] |
Reads the passive buffer(s) specified by the parameter 'type' and makes the proper updates in the state of the associated component.
type | the type of buffer that should be read from the container. |
Reimplemented in TossableRNTStrategy.
void RNTStrategy::readAllPassiveBuffers | ( | ) | [inline, protected] |
Reads all the passive buffers for a component strategy. This method is called before drawing the component in order to update its state/properties.
Reimplemented in TossableRNTStrategy.
void RNTStrategy::readAllPickingPassiveBuffers | ( | ) | [inline, protected] |
Reads only the passive buffers for a component strategy that are necessary for picking processing. This method is called before drawing the component for picking in order to update its state/properties.
bool RNTStrategy::applyRNT | ( | float | x, | |
float | y | |||
) | [protected] |
Applies the RNT trasformation to the associated component. Returns true if the displacement placed the component out of the display dimensions.
bool RNTStrategy::isInsideTranslationArea | ( | float | x, | |
float | y | |||
) | [protected] |
Returns true if the given x- and y-coordinates are inside the translation only circle of this component.
x | the x-coordinate of the point to be checked. | |
y | the y-coordinate of the point to be checked. |
unsigned char RNTStrategy::getButtonValue | ( | unsigned int | x, | |
unsigned int | y | |||
) | [protected] |
Returns the value of the current active button buffer of the associated component at the given global coordinates. If there is no button buffer currently active for the associated component or the coordinates are not inside the buffer, a constant value for NO_BUTTON is returned.
x | the x global coordinate to be checked. | |
y | the y global coordinate to be checked. |
float RNTStrategy::color[4] [protected] |
The color of the RNT decoration (e. g., the inner circle).
bool RNTStrategy::pressed [protected] |
Determines when the component is being pressed.
float RNTStrategy::previousX [protected] |
The previous x-coordinate of the cursor position.
float RNTStrategy::previousY [protected] |
The previous y-coordinate of the cursor position.
float RNTStrategy::translationRadiusFactor [protected] |
The percentage of the smallest dimension that is used to calculate the radius of the translation-only area inside the component.
float RNTStrategy::decorationWidth [protected] |
The line width of the RNT decoration (e. g., the inner circle)
bool RNTStrategy::drawDecoration [protected] |
Defines if the RNT decoration (e. g., the inner circle) should be drawn.
unsigned int RNTStrategy::buttonBufferType [protected] |
Button buffer type identifier.
unsigned char RNTStrategy::noButtonValue [protected] |
No button value.
unsigned char RNTStrategy::movableAreaButtonValue [protected] |
Movable area button value.
unsigned char RNTStrategy::rntAreaButtonValue [protected] |
RNT area button value.
unsigned int RNTStrategy::nSegments [protected] |
The number of segments the decoration circle is divided.
unsigned int RNTStrategy::dlCircle [protected] |
The display list identifier.
unsigned int RNTStrategy::dlWidth [protected] |
The width value currently used by the display list.
unsigned int RNTStrategy::dlHeight [protected] |
The height value currently used by the display list.
float RNTStrategy::dlScaleX [protected] |
The scaleX value currently used by the display list.
float RNTStrategy::dlScaleY [protected] |
The scaleY value currently used by the display list.
int RNTStrategy::frameTimeout [protected] |
The number of frames that the decorative circle should be displayed after the component is released.
int RNTStrategy::frameDuration [protected] |
The number of frames the circle fading out should last.
int RNTStrategy::frameCount [protected] |
The counter for the number of frames since the component release.
float RNTStrategy::secsTimeout [protected] |
The number of seconds that the decorative circle should be displayed after the component is released.
float RNTStrategy::secsDuration [protected] |
The number of seconds the circle fading out should last.