#include <CurrentBeltContainerStrategy.h>
Inherits BeltContainerStrategy.
Inheritance diagram for CurrentBeltContainerStrategy:
Public Member Functions | |
CurrentBeltContainerStrategy (float bWidth=100) | |
~CurrentBeltContainerStrategy (void) | |
float | getMinFlowChangeDistance () |
void | setMinFlowChangeDistance (float d) |
float | getMaxFlowChangeDistance () |
void | setMaxFlowChangeDistance (float d) |
Protected Member Functions | |
void | initProperties () |
void | onEvent (LargeDisplayEvent *evt) |
void | resize (unsigned int width, unsigned int height) |
void | fillSizeBuffer (IBuffer< float > *buffer) |
void | fillOrientationBuffer (IBuffer< float > *buffer) |
void | fillDirectionBuffer (IBuffer< float > *buffer) |
void | updateBuffer (unsigned int bufferType, bool resizeIt) |
Protected Attributes | |
float | sizeScale |
float | speed |
float | moveInSpeed |
bool | changingFlow |
float | flowInitialX |
float | flowInitialY |
float | flowOrientation [2] |
float | minFlowChangeDistance |
float | maxFlowChangeDistance |
unsigned int | sizeBufferType |
unsigned int | orientationBufferType |
unsigned int | directionBufferType |
This is based on the InterfaceCurrentCompositeGL class in the original implementation of the Tabletop Framework done by T. Isenberg and A. Miede in the Interactions Lab at the University of Calgary, Canada.
CurrentBeltContainerStrategy::CurrentBeltContainerStrategy | ( | float | bWidth = 100 |
) |
Constructs a current belt container strategy.
bWidth | the width of the inside region (belt) of the container. |
CurrentBeltContainerStrategy::~CurrentBeltContainerStrategy | ( | void | ) |
Destroys this strategy.
float CurrentBeltContainerStrategy::getMinFlowChangeDistance | ( | ) | [inline] |
Returns the minimum drag distance to have flow change.
void CurrentBeltContainerStrategy::setMinFlowChangeDistance | ( | float | d | ) | [inline] |
Sets the minimum drag distance to have flow change.
d | the minimum drag distance to have flow change. |
float CurrentBeltContainerStrategy::getMaxFlowChangeDistance | ( | ) | [inline] |
Returns the maximum drag distance allowed for flow change.
void CurrentBeltContainerStrategy::setMaxFlowChangeDistance | ( | float | d | ) | [inline] |
Sets the maximum drag distance allowed for flow change.
d | the maximum drag distance allowed for flow change. |
void CurrentBeltContainerStrategy::initProperties | ( | ) | [protected] |
Initializes the properties (i. e., i-buffers) of the associated component.
Reimplemented from BoundedContainerStrategy.
void CurrentBeltContainerStrategy::onEvent | ( | LargeDisplayEvent * | evt | ) | [protected] |
Handles the given event.
evt | the event to be handled. |
Reimplemented from BeltContainerStrategy.
void CurrentBeltContainerStrategy::resize | ( | unsigned int | width, | |
unsigned int | height | |||
) | [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. |
Reimplemented from BoundedContainerStrategy.
void CurrentBeltContainerStrategy::fillSizeBuffer | ( | IBuffer< float > * | buffer | ) | [protected] |
Fills the size buffer with the scaled value of the distance between the outer and inner bounds of the container.
buffer | the buffer to be filled. |
void CurrentBeltContainerStrategy::fillOrientationBuffer | ( | IBuffer< float > * | buffer | ) | [protected] |
Fills the orientation buffer with the scaled value of the distance between the outer and inner bounds of the container.
buffer | the buffer to be filled. |
void CurrentBeltContainerStrategy::fillDirectionBuffer | ( | IBuffer< float > * | buffer | ) | [protected] |
Fills the direction buffer with the scaled value of the distance between the outer and inner bounds of the container.
buffer | the buffer to be filled. |
void CurrentBeltContainerStrategy::updateBuffer | ( | unsigned int | bufferType, | |
bool | resizeIt | |||
) | [protected] |
Updates the specified buffer by resizing (optionally) and refilling it.
bufferType | the identifier of the buffer being updated. | |
resizeIt | if true the buffer is resized before being updated. |
float CurrentBeltContainerStrategy::sizeScale [protected] |
The scale factor applied to the inner width of the belt before writing it to the buffer.
float CurrentBeltContainerStrategy::speed [protected] |
The speed factor used to scale the vectors in the direction buffer.
float CurrentBeltContainerStrategy::moveInSpeed [protected] |
The speed factor used when a component is moved in the current.
bool CurrentBeltContainerStrategy::changingFlow [protected] |
Indicates if the direction and speed of the current flow is being changed.
float CurrentBeltContainerStrategy::flowInitialX [protected] |
The initial cursor position for the flow change in the x-coordinate.
float CurrentBeltContainerStrategy::flowInitialY [protected] |
The initial cursor position for the flow change in the y-coordinate.
float CurrentBeltContainerStrategy::flowOrientation[2] [protected] |
The orientation (up-vector) at the point where the flow is being changed.
float CurrentBeltContainerStrategy::minFlowChangeDistance [protected] |
The minimum drag distance to have flow change.
float CurrentBeltContainerStrategy::maxFlowChangeDistance [protected] |
The maximum drag distance allowed for flow change.
unsigned int CurrentBeltContainerStrategy::sizeBufferType [protected] |
Absolute size buffer type identifier.
unsigned int CurrentBeltContainerStrategy::orientationBufferType [protected] |
Orientation buffer type identifier.
unsigned int CurrentBeltContainerStrategy::directionBufferType [protected] |
Direction buffer type identifier.