Background Class Reference

#include <Background.h>

Collaboration diagram for Background:

[legend]
List of all members.

Public Member Functions

 Background (flowData *f, ColorMapping *colorMap)
 ~Background (void)
void createVelocityTexture ()
void createPressureTexture ()
void createVorticityTexture ()
void draw ()
void setMode (int mode)
void updateCurrentTexture ()
void updateData ()

Static Public Attributes

static const int velocity = 300
static const int pressure = 301
static const int vorticity = 302

Private Attributes

ColorMappingm_colorMap
flowDataflow
GLubyte backgroundTexture [texSize *texSize][3]
GLuint m_vorticityId
GLuint m_velocityId
GLuint m_pressureId
int m_backgroundMode
bool m_pressureCreated
bool m_vorticityCreated

Static Private Attributes

static const int texSize = 1024

Detailed Description

Class which is responsible for the creation of the background texture in the opengl window.
There the stream data is visualized too. By default it is a texture composed of the velocity values.
This can bechanged to the pressure or vorticity values too. It is also possible to dye the background.


Constructor & Destructor Documentation

Background::Background ( 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

Background::~Background ( void   ) 

destructor


Member Function Documentation

void Background::createVelocityTexture (  ) 

This function creates a texture composed of the velocity values of the stream. This function is called on the startup of the program.

void Background::createPressureTexture (  ) 

This function creates a texture composed of the pressure values of the stream.
This function is called when the user chooses the first time the pressure texture as background texture.

void Background::createVorticityTexture (  ) 

This function creates a texture composed of the vorticity values of the stream.
This function is called when the user chooses the first time the vorticity texture as background texture.

void Background::draw (  ) 

Depending on which texture should be the background texture, a Quad (size is dependent on the grid) is created and the texture is binded to it.

void Background::setMode ( int  mode  ) 

This function is to define which background texture should be displayed.

Parameters:
id of the mode (static variables)

void Background::updateCurrentTexture (  ) 

This function is called when there are changes for the texture like changes in the color bar or when a different dataset is loaded.
Then the actual texture is changed immediatly.

void Background::updateData (  ) 

This function is called when a new dataset is loaded.


Member Data Documentation

const int Background::velocity = 300 [static]

const int Background::pressure = 301 [static]

if the velocity values should be shown

const int Background::vorticity = 302 [static]

if the pressure values should be shown

const int Background::texSize = 1024 [static, private]

if the vorticity values should be shown

ColorMapping* Background::m_colorMap [private]

resolution of the texture

flowData* Background::flow [private]

color bar

GLubyte Background::backgroundTexture[texSize *texSize][3] [private]

object with the data about the stream

GLuint Background::m_vorticityId [private]

array for the data needed for the texture creation

GLuint Background::m_velocityId [private]

id of the vorticity texture

GLuint Background::m_pressureId [private]

id of the velocity texture

int Background::m_backgroundMode [private]

id of the pressure texture

bool Background::m_pressureCreated [private]

mode which texture should be shown

bool Background::m_vorticityCreated [private]

says if the pressure texture is already created


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