FrictionSurfaceStrategy Class Reference

#include <FrictionSurfaceStrategy.h>

List of all members.

Public Member Functions

 FrictionSurfaceStrategy (void)
 ~FrictionSurfaceStrategy (void)
unsigned int getBorderWidth ()
void setBorderWidth (unsigned int w)
unsigned int getBorderHeight ()
void setBorderHeight (unsigned int h)
float getInnerFriction ()
void setInnerFriction (float coeff)
float getBorderFriction ()
void setBorderFriction (float coeff)

Protected Member Functions

void initProperties ()
void resize (unsigned int width, unsigned int height)
void fillFrictionBuffer (IBuffer< float > *buffer)

Protected Attributes

unsigned int borderWidth
unsigned int borderHeight
float innerFriction
float borderFriction
unsigned int frictionBufferType


Detailed Description

This strategy provides a surface with a buffer containing values of (dynamic) friction coefficients for the associated component. It is used by TossingStrategy and TossingRNTStrategy to calculate the movement of a tossed component (instead of the default dynamic friction coefficient). The friction values must be between 0.0 and 1.0.

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


Constructor & Destructor Documentation

FrictionSurfaceStrategy::FrictionSurfaceStrategy ( void   ) 

Constructs a friction surface strategy.

FrictionSurfaceStrategy::~FrictionSurfaceStrategy ( void   ) 

Destroys this strategy.


Member Function Documentation

unsigned int FrictionSurfaceStrategy::getBorderWidth (  )  [inline]

Returns the width of the border of the surface (region where the objects should halt).

Returns:
the width of the border.

void FrictionSurfaceStrategy::setBorderWidth ( unsigned int  w  )  [inline]

Sets the width of the border of the surface (region where the objects should halt).

Parameters:
w the value to be set as the border width.

unsigned int FrictionSurfaceStrategy::getBorderHeight (  )  [inline]

Returns the height of the border of the surface (region where the objects should halt).

Returns:
the height of the border.

void FrictionSurfaceStrategy::setBorderHeight ( unsigned int  h  )  [inline]

Sets the height of the border of the surface (region where the objects should halt).

Parameters:
h the value to be set as the border height.

float FrictionSurfaceStrategy::getInnerFriction (  )  [inline]

Returns the friction coefficient for the inner part of the surface.

Returns:
the friction coefficient for the inner part of the surface.

void FrictionSurfaceStrategy::setInnerFriction ( float  coeff  )  [inline]

Sets the friction coefficient for the inner part of the surface.

Parameters:
coeff the value to be set as friction coefficient for the inner part of the surface.

float FrictionSurfaceStrategy::getBorderFriction (  )  [inline]

Returns the friction coefficient for the border of the surface.

Returns:
the friction coefficient for the border of the surface.

void FrictionSurfaceStrategy::setBorderFriction ( float  coeff  )  [inline]

Sets the friction coefficient for the border of the surface.

Parameters:
coeff the value to be set as friction coefficient for the border of the surface.

void FrictionSurfaceStrategy::initProperties (  )  [protected]

Initializes the properties (i. e., i-buffers) of the associated component.

void FrictionSurfaceStrategy::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.

void FrictionSurfaceStrategy::fillFrictionBuffer ( IBuffer< float > *  buffer  )  [protected]

Fills the friction buffer with the default values.

Parameters:
buffer the button buffer to be filled.


Member Data Documentation

unsigned int FrictionSurfaceStrategy::borderWidth [protected]

Width of the border of the buffer (with stop values).

unsigned int FrictionSurfaceStrategy::borderHeight [protected]

Height of the border of the buffer (with stop values).

float FrictionSurfaceStrategy::innerFriction [protected]

Friction coefficient applied to the inner region of the surface.

float FrictionSurfaceStrategy::borderFriction [protected]

Friction coefficient applied to the border region of the surface (stop value).

unsigned int FrictionSurfaceStrategy::frictionBufferType [protected]

Friction 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