Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

main.cpp File Reference

#include <iostream>
#include <glui.h>
#include <glut.h>
#include <glu.h>
#include <sstream>
#include "LifeVariables.h"
#include "utilityfuncs.h"
#include "Arrow2d.h"
#include "euler.h"
#include "OrthographicCamera.h"

Functions

void showGlDebugMessages ()
void renderString (int x, int y, void *font, float nr)
void renderString (int x, int y, void *font, string text)
void display ()
void reshape (int x, int y)
void idle ()
void enterUnloadedMode () throw (Error)
void enterLoadedMode () throw (Error)
void enterArrowPlotMode () throw (Error)
void enterStreamlinePlotMode () throw (Error)
void eventListener (int control)
void deInit ()
void keyEvent (unsigned char key, int x, int y)
void mouseEvent (int button, int state, int x, int y)
void main (int argc, char *argv[])

Variables

float mouseX = 0
float mouseY = 0
int mainWindow = 0
bool debugMode = DEBUG_MODE
MenuBarmenuBar = NULL
StateBarstateBar = NULL
FileDialogfileDialog = NULL
OptionPaneloptionPanel = NULL
OrthographicCameramainCamera = NULL
RawReaderreader = NULL
BackgroundpressureBackground = NULL
BackgroundvorticityBackground = NULL
CGrid gGrid
CGrid colorGrid
CEuler gIntegration
bool gNotSampled = false
ProgramState currentProgramState = START
sPoint2f seedPoint (0, 0)

Function Documentation

void deInit  ) 
 

Function to perform an controlled application "killing"

void display  ) 
 

Method that is registered as rendering loop for GLUT and GLUI. Refer to LifeVariables.h for further description.

void enterArrowPlotMode  )  throw (Error)
 

This function sets the program state to ARROW_PLOT_MODE if possible.

void enterLoadedMode  )  throw (Error)
 

This set the program state to LOADED if possible.

void enterStreamlinePlotMode  )  throw (Error)
 

This function sets the program state to STREAMLINE_PLOT_MODE if possible.

void enterUnloadedMode  )  throw (Error)
 

This function sets the program state to UNLOADED if possible.

void eventListener int  control  ) 
 

This function is registered as callback for all events that happen on the Gui. Refer to LifeVariables.h for further description.

void idle  ) 
 

Idle function just for the lazy computers. Here is no magic so there is no further description in LifeVariables.h

void keyEvent unsigned char  key,
int  x,
int  y
 

Function to handle all keyboard events

Parameters:
key the key pressed

void main int  argc,
char *  argv[]
 

Main method sets up the rendering context and creates the global objects. Currently the commandline parameters are not evaluated.

Parameters:
argc not evaluated
argv not evaluated

void mouseEvent int  button,
int  state,
int  x,
int  y
 

This functions handles input events from the mouse. The only input from the mouse that should be handled is the seedpoint setting.

Parameters:
button the GLUT constant of the button number wich had been pressed
state the state of the button (GLUT_UP, GLUT_DOWN)
x coordinate of the mouse cursor in pixel coordinates resp. to the whole window (regardless which subwindows of glui there are)
y coordinate of the mouse cursor in pixel coordinates resp. to the whole window (regardless which subwindows of glui there are)

void renderString int  x,
int  y,
void *  font,
string  text
 

Method to render a string as BitmapText on the screen. Refer to LifeVariables for further description.

void renderString int  x,
int  y,
void *  font,
float  nr
 

Method to render an integer as BitmapText on the screen. Refer to LifeVariables for further description.

void reshape int  x,
int  y
 

Function to handle reshape events. Refer to LifeVariables.h for further description.

void showGlDebugMessages  ) 
 

Method to output debug messages from OpenGL. Refer to LifeVariables for further description.


Variable Documentation

CGrid colorGrid
 

The regulary resampled grid background texture

ProgramState currentProgramState = START
 

This variable holds the current ProgramState. All possible states and state-transitions are descibed in LifeVariables.h

bool debugMode = DEBUG_MODE
 

This boolean is a flag wich is set to 1 = true by default. Thus debug messages are passed to the console.

FileDialog* fileDialog = NULL
 

The dialog to open a path where raw files can be found

CGrid gGrid
 

The regulary resampled grid for arrow plots

CEuler gIntegration
 

The object which generates the streamline sample points

bool gNotSampled = false
 

Global Flag if the seedpoint should be resampled again or not

OrthographicCamera* mainCamera = NULL
 

The main rendering area which is left for the visualisation

int mainWindow = 0
 

windowname of the main rendering window assigned from glut

MenuBar* menuBar = NULL
 

The panel that emulates a menubar

float mouseX = 0
 

Mouse x coordinate in pixels responding to the mainCamera viewport

float mouseY = 0
 

Mouse y coordinate in pixels responding to the mainCamera viewport

OptionPanel* optionPanel = NULL
 

The panel that contains options for the visualisation

Background* pressureBackground = NULL
 

The background texture for the first dataset

RawReader* reader = NULL
 

The reader class which is used to load the datasets

sPoint2f seedPoint(0, 0)
 

The current interactive seedPoint

StateBar* stateBar = NULL
 

The panel that emulates a statebar

Background* vorticityBackground = NULL
 

The background texture for the 2nd dataset


Generated on Tue Jan 24 00:36:47 2006 for ZVis by  doxygen 1.4.1