#include <Background.h>
Collaboration diagram for Background:
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 | |
| ColorMapping * | m_colorMap |
| flowData * | flow |
| 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 |
| Background::Background | ( | flowData * | f, | |
| ColorMapping * | colorMap | |||
| ) |
constructor
| *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
| 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.
| 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.
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
1.5.1-p1