CurrentBeltContainerStrategy Class Reference

#include <CurrentBeltContainerStrategy.h>

Inherits BeltContainerStrategy.

Inheritance diagram for CurrentBeltContainerStrategy:

Inheritance graph
[legend]
Collaboration diagram for CurrentBeltContainerStrategy:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

This strategy extends the BeltContainerStrategy by providing active buffers that control the scale and orientation of the children components, while moving them along the inside region of the container.

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.

Author:
Fabricio Anastacio - fabriciocfa@yahoo.com
Since:
August 24, 2007


Constructor & Destructor Documentation

CurrentBeltContainerStrategy::CurrentBeltContainerStrategy ( float  bWidth = 100  ) 

Constructs a current belt container strategy.

Parameters:
bWidth the width of the inside region (belt) of the container.

CurrentBeltContainerStrategy::~CurrentBeltContainerStrategy ( void   ) 

Destroys this strategy.


Member Function Documentation

float CurrentBeltContainerStrategy::getMinFlowChangeDistance (  )  [inline]

Returns the minimum drag distance to have flow change.

Returns:
the minimum drag distance to have flow change.

void CurrentBeltContainerStrategy::setMinFlowChangeDistance ( float  d  )  [inline]

Sets the minimum drag distance to have flow change.

Parameters:
d the minimum drag distance to have flow change.

float CurrentBeltContainerStrategy::getMaxFlowChangeDistance (  )  [inline]

Returns the maximum drag distance allowed for flow change.

Returns:
the maximum drag distance allowed for flow change.

void CurrentBeltContainerStrategy::setMaxFlowChangeDistance ( float  d  )  [inline]

Sets the maximum drag distance allowed for flow change.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
bufferType the identifier of the buffer being updated.
resizeIt if true the buffer is resized before being updated.


Member Data Documentation

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.


The documentation for this class was generated from the following files:
Generated on Fri Dec 21 17:46:07 2007 for LargeDisplayFrameworkToolkit by  doxygen 1.5.2