Arrows Class Reference

#include <Arrows.h>

Collaboration diagram for Arrows:

[legend]
List of all members.

Public Member Functions

 Arrows (flowData *f, ColorMapping *colorMap)
 ~Arrows (void)
void init ()
void createArrow ()
void draw ()
void changeDistance (int dist)
void changeScale (int scal)
void changeAlpha (int a)
void setSizeMode (int nm)
void setColorMode (int cm)

Static Public Attributes

static const int none = -1
static const int velocityMode = 14
static const int pressureMode = 15
static const int vorticityMode = 16

Private Member Functions

void setScaling (vector5f v)
void setColor (vector5f v)

Private Attributes

ColorMappingm_colorMap
int displayMode
int colorMode
flowDatarawData
GLfloat arrowDistance
GLfloat arrowScale
GLfloat alpha
GLuint arrowId

Detailed Description

This class is responsible for creating and drawing arrows for a specific stream.
The size of one arrow is depending on velocity, the pressure or the vorticity of the stream.
The user can set all parameters for the arrows, like the distance between them, their size, etc.
Through an available color bar, the colors of the arrows can be set too.
The arrows are saved in display lists, depending on the orientation of the velocity vector, the rotation for each arrow is calculated.


Constructor & Destructor Documentation

Arrows::Arrows ( flowData f,
ColorMapping colorMap 
)

constructor

Parameters:
*f flowData where the information about the grid and the stream is stored
*colorMap the transferfunction for the color of the arrows

Arrows::~Arrows ( void   ) 

destructor


Member Function Documentation

void Arrows::init (  ) 

init method, the display list is called

Parameters:
c CGcontext of the glwidget

void Arrows::createArrow (  ) 

makes the displaylist for the arrow, defines its body

void Arrows::draw (  ) 

draws arrows for the stream in the desired distance with the right color, rotation and size
for every arrow the displaylist is called

void Arrows::changeDistance ( int  dist  ) 

Function to change the distance between the arrows.
It is called if the user moves the appropriate slider in the GUI.
The distance can be within 1 and 500, and is then multiplied with 0.001.

Parameters:
dist the distance between the arrows in 'int'

void Arrows::changeScale ( int  scal  ) 

Function to change the scaling of the arrows.
It is called when the user moves the appropriate slider in the GUI.
The value is then divided by 10.

Parameters:
scal the new value for the scaling of the arrows.

void Arrows::changeAlpha ( int  a  ) 

The User is able to change the alpha value of the arrows with a slider. The value can, of course, just be between 0 and 1. So the given int parameter is then divided by 100 and can be at most 100 and at least 0.

Parameters:
a the new alpha value for the arrows

void Arrows::setSizeMode ( int  nm  ) 

The size of the arrows is depending on the given scale factor and the velocity, pressure or vorticity of the of the point in the stream for the arrow.
The User can choose in the GUI which values should be considered for the size of the arrow.

Parameters:
nm id of the mode (static variables)

void Arrows::setColorMode ( int  cm  ) 

The color of the arrows is also depending on whether the velocity, pressure or vorticity. The user can this define through the GUI.

Parameters:
cm id of the mode (static variables)

void Arrows::setScaling ( vector5f  v  )  [private]

This method calculates and defines the scaling for each arrow depending from the size mode.

Parameters:
v vector filled with the stream data for an arrow

void Arrows::setColor ( vector5f  v  )  [private]

This method looks up the color for each arrow in the color bar, depending from the color mode.

Parameters:
v vector filled with the stream data for an arrow


Member Data Documentation

const int Arrows::none = -1 [static]

const int Arrows::velocityMode = 14 [static]

if the arrows should be be similar in size or color

const int Arrows::pressureMode = 15 [static]

if the velocity values should be pointed out

const int Arrows::vorticityMode = 16 [static]

if the pressure values should be pointed out

ColorMapping* Arrows::m_colorMap [private]

int Arrows::displayMode [private]

color bar

int Arrows::colorMode [private]

size mode, what should be pointed out by the size

flowData* Arrows::rawData [private]

color mode, what should be pointed out by the color

GLfloat Arrows::arrowDistance [private]

object with the data about the stream

GLfloat Arrows::arrowScale [private]

distance between the arrows

GLfloat Arrows::alpha [private]

scale value for the arrows

GLuint Arrows::arrowId [private]

alpha value for the arrows


The documentation for this class was generated from the following file:
Generated on Wed Jan 17 03:48:39 2007 for Flowvis-parma_wallaby by  doxygen 1.5.1-p1