Eigene Dateien/uni/visualisierung/vislu/bsp1/VisLu/main.cpp File Reference

#include <string>
#include <vector>
#include <iostream>
#include <GL/glew.h>
#include <GL/glut.h>
#include "VObject.h"
#include "GUIelement.h"
#include "VMenuStarter.h"
#include "VTransferFunctionElement.h"
#include "VSliceElement.h"
#include "VMenu.h"
#include "VRenderMode.h"
#include "VAxisAlignElement.h"
#include "VCamera.h"

Go to the source code of this file.

Namespaces

namespace  std

Functions

bool operator< (const VTransferFunctionNode &n1, const VTransferFunctionNode &n2)
void drawcoordinate ()
void draw_cube ()
void loadVolume (string _file)
string textFileRead (string _file)
void printInfoLog (GLhandleARB obj)
void setShaders (void)
void countFPS (int value)
void inputKey (unsigned char key, int x, int y)
void inputKeyUp (unsigned char key, int x, int y)
void inputSpecialKey (int key, int x, int y)
void inputSpecialKeyUp (int key, int x, int y)
void mousepos (int x, int y)
void mousedragging (int x, int y)
void mousebutton (int button, int state, int x, int y)
void reshape (int w, int h)
void load ()
void draw ()
void OnDraw ()
int main (int argc, char **argv)

Variables

GLfloat light_position [] = { 1000.0, 1000.0, 1000.0, 1.0 }
unsigned int fpsCurrent = 0
unsigned int fpsCount = 0
unsigned long tick
int renderMode
GLhandleARB p
GLhandleARB v
GLhandleARB f
string filename = "data/lobster.dat"
VObjectobj
VMenumenu
VCameracamera
vector< GUIelement * > elements
int width = 800
int height = 600
bool dragging = false
bool alt = false
bool slicing = false


Function Documentation

void countFPS ( int  value  ) 

Definition at line 194 of file main.cpp.

References fpsCount, and fpsCurrent.

Referenced by main().

void draw (  ) 

Definition at line 425 of file main.cpp.

References camera, VObject::draw(), elements, f, height, obj, VCamera::setCamera(), slicing, and width.

Referenced by OnDraw().

void draw_cube (  ) 

Definition at line 72 of file main.cpp.

References f.

void drawcoordinate (  ) 

Definition at line 50 of file main.cpp.

References f.

void inputKey ( unsigned char  key,
int  x,
int  y 
)

Definition at line 204 of file main.cpp.

References VObject::changesliceNo(), VMenu::helpMenu(), VMenu::loadFile(), loadVolume(), menu, VMenu::menuPos(), obj, renderMode, VObject::setDirection(), VObject::setsliceNo(), and VMenu::showMenu().

Referenced by main().

void inputKeyUp ( unsigned char  key,
int  x,
int  y 
)

Definition at line 254 of file main.cpp.

Referenced by main().

void inputSpecialKey ( int  key,
int  x,
int  y 
)

Definition at line 257 of file main.cpp.

References VMenu::decmenuPos(), VMenu::incmenuPos(), VMenu::loadFile(), menu, VMenu::menuPos(), and VMenu::showMenu().

Referenced by main().

void inputSpecialKeyUp ( int  key,
int  x,
int  y 
)

Definition at line 288 of file main.cpp.

Referenced by main().

void load (  ) 

Definition at line 410 of file main.cpp.

References camera, f, height, menu, obj, and width.

Referenced by main().

void loadVolume ( string  _file  ) 

Definition at line 116 of file main.cpp.

References camera, elements, filename, fpsCount, VObject::getHistogram(), VObject::getsliceNo(), height, VObject::load(), VMenu::loadFile(), menu, obj, renderMode, VMenu::showMenu(), and width.

Referenced by inputKey(), and mousebutton().

int main ( int  argc,
char **  argv 
)

Definition at line 492 of file main.cpp.

References camera, countFPS(), height, inputKey(), inputKeyUp(), inputSpecialKey(), inputSpecialKeyUp(), load(), mousebutton(), mousedragging(), mousepos(), obj, OnDraw(), reshape(), and width.

void mousebutton ( int  button,
int  state,
int  x,
int  y 
)

Definition at line 323 of file main.cpp.

References alt, camera, VMenu::click(), VCamera::deleteFromPoint(), dragging, elements, VMenu::helpMenu(), VMenu::loadFile(), loadVolume(), menu, VMenu::menuPos(), VCamera::setFromPoint(), and VMenu::showMenu().

Referenced by main().

void mousedragging ( int  x,
int  y 
)

Definition at line 307 of file main.cpp.

References alt, camera, VCamera::changeDirection(), VCamera::changeDistance(), dragging, elements, and slicing.

Referenced by main().

void mousepos ( int  x,
int  y 
)

Definition at line 297 of file main.cpp.

References elements, height, menu, VMenu::setMouse(), VMenu::showMenu(), and width.

Referenced by main().

void OnDraw (  ) 

Definition at line 481 of file main.cpp.

References draw(), VMenu::draw(), fpsCurrent, menu, and VMenu::showMenu().

Referenced by main().

bool operator< ( const VTransferFunctionNode n1,
const VTransferFunctionNode n2 
)

Hilfsfunktion zum Sortieren der Knoten anhand der x Koordinate

Definition at line 45 of file main.cpp.

References VTransferFunctionNode::x.

void printInfoLog ( GLhandleARB  obj  ) 

Definition at line 145 of file main.cpp.

Referenced by setShaders().

void reshape ( int  w,
int  h 
)

Definition at line 388 of file main.cpp.

References camera, height, VCamera::setCamera(), and width.

Referenced by main().

void setShaders ( void   ) 

Definition at line 163 of file main.cpp.

References f, p, printInfoLog(), textFileRead(), and v.

string textFileRead ( string  _file  ) 

Definition at line 133 of file main.cpp.

Referenced by setShaders().


Variable Documentation

bool alt = false

Definition at line 41 of file main.cpp.

Referenced by mousebutton(), and mousedragging().

VCamera* camera

Definition at line 34 of file main.cpp.

Referenced by draw(), load(), loadVolume(), main(), mousebutton(), mousedragging(), and reshape().

bool dragging = false

Definition at line 40 of file main.cpp.

Referenced by mousebutton(), and mousedragging().

vector<GUIelement*> elements

Definition at line 35 of file main.cpp.

Referenced by draw(), loadVolume(), mousebutton(), mousedragging(), and mousepos().

GLhandleARB f

Definition at line 28 of file main.cpp.

Referenced by VRenderMode::draw(), VMenu::draw(), draw(), draw_cube(), V2Ddraw::drawBox(), drawcoordinate(), VObject::getPowerofTwo(), VObject::load(), load(), VSliceElement::released(), VAxisAlignElement::render(), VTransferFunction::renderTexture(), and setShaders().

string filename = "data/lobster.dat"

Definition at line 30 of file main.cpp.

Referenced by loadVolume().

unsigned int fpsCount = 0

Definition at line 23 of file main.cpp.

Referenced by countFPS(), and loadVolume().

unsigned int fpsCurrent = 0

Definition at line 22 of file main.cpp.

Referenced by countFPS(), and OnDraw().

int height = 600

Definition at line 38 of file main.cpp.

Referenced by draw(), load(), loadVolume(), main(), mousepos(), and reshape().

GLfloat light_position[] = { 1000.0, 1000.0, 1000.0, 1.0 }

Definition at line 20 of file main.cpp.

VMenu* menu

Definition at line 33 of file main.cpp.

Referenced by inputKey(), inputSpecialKey(), load(), loadVolume(), mousebutton(), mousepos(), and OnDraw().

VObject* obj

Definition at line 32 of file main.cpp.

Referenced by draw(), inputKey(), load(), loadVolume(), and main().

GLhandleARB p

Definition at line 28 of file main.cpp.

Referenced by setShaders().

int renderMode

Definition at line 26 of file main.cpp.

Referenced by inputKey(), and loadVolume().

bool slicing = false

Definition at line 43 of file main.cpp.

Referenced by draw(), and mousedragging().

unsigned long tick

Definition at line 24 of file main.cpp.

GLhandleARB v

Definition at line 28 of file main.cpp.

Referenced by setShaders().

int width = 800

Definition at line 37 of file main.cpp.

Referenced by draw(), load(), loadVolume(), main(), mousepos(), and reshape().


Generated on Wed Dec 6 11:08:00 2006 for VisLU by  doxygen 1.5.1-p1