Defines | Functions | Variables

main.cpp File Reference

#include <GL/glew.h>
#include <GL/glui.h>
#include <GL/openglut.h>
#include <GL/GLU.h>
#include <GL/GL.h>
#include <il.h>
#include <windows.h>
#include <stdlib.h>
#include <io.h>
#include <iostream>
#include <sstream>
#include <string>
#include <commdlg.h>
#include "BottomSubWindow.hpp"
#include "RightSubWindow.hpp"
#include "TransferFunctionWindow.hpp"
#include "ColorPickerWindow.hpp"
#include "GUIConnection.hpp"
#include "Shader.hpp"
#include "Volume.hpp"

Defines

#define GLUI_OPENGLUT

Functions

void mainDisplay (void)
 Main display method.
void mainIdle (void)
 Main Update method.
void mainInit (void)
 Main initialization method.
void mainKeyboard (unsigned char key, int x, int y)
 Processes keyboard input.
void mainMotion (int x, int y)
 Processes mouse movement.
void mainMouse (int button, int state, int x, int y)
 Processes mouse clicks.
void mainReshape (int width, int height)
 Processes window resize.
const int getNextPowerOfTwo (const int iNumber)
 Gets the next power of two.
void drawVertex (float x, float y, float z)
 Draw a vertex for the block.
void drawQuads (float x, float y, float z)
 Draw a block.
void render2DView (void)
 Renders the 2D view.
void initializeGLUT (void)
 Initializes GLUT.
void initializeGLEW (void)
 Initializes GLEW.
void initializeDevIL (void)
 Initializes the DevIL.
void initializeGLUI (void)
 Initializes GLUI.
std::string str_replace (std::string rep, std::string wit, std::string in)
 String replace.
void loadData (std::string data)
 Loads data.
int main (int argc, char **argv)
 Main entry-point for this application.
void drawVolumeCube (void)
 Draw volume cube.

Variables

int windowID_main
GLUI * glui_bottom
Volume vis_volume
GLuint vis_texture
GLuint vis_fbo
GLuint vis_transfer_tex
Shadervis_transfer_shader
GLuint vis_volumefbo
GLuint vis_volume_tex [2]
Shadervis_volume_shader
float vis_step_size
float vis_coord
float rot_matrix [16]
int g_iWidth = 1000
int g_iHeight = 800
int light = 0

Define Documentation

#define GLUI_OPENGLUT

Function Documentation

void drawQuads ( float  x,
float  y,
float  z 
)

Draw a block.

Parameters:
xThe x coordinate.
yThe y coordinate.
zThe z coordinate.
void drawVertex ( float  x,
float  y,
float  z 
)

Draw a vertex for the block.

Parameters:
xThe x coordinate.
yThe y coordinate.
zThe z coordinate.
void drawVolumeCube ( void   )

Draw volume cube.

const int getNextPowerOfTwo ( const int  iNumber )

Gets the next power of two.

Parameters:
iNumberNumber to check.
Returns:
The next power of two.
void initializeDevIL ( void   )

Initializes the DevIL.

void initializeGLEW ( void   )

Initializes GLEW.

void initializeGLUI ( void   )

Initializes GLUI.

void initializeGLUT ( void   )

Initializes GLUT.

void loadData ( std::string  data )

Loads data.

Parameters:
dataThe data.
int main ( int  argc,
char **  argv 
)

Main entry-point for this application.

Parameters:
argcNumber of command-line arguments.
argvArray of command-line argument strings.
Returns:
Exit-code for the process - 0 for success, else an error code.
void mainDisplay ( void   )

Main display method.

void mainIdle ( void   )

Main Update method.

Screenshot

Load data

void mainInit ( void   )

Main initialization method.

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

Processes keyboard input.

Parameters:
keyThe key.
xThe x coordinate.
yThe y coordinate.
void mainMotion ( int  x,
int  y 
)

Processes mouse movement.

Parameters:
xThe x coordinate.
yThe y coordinate.
void mainMouse ( int  button,
int  state,
int  x,
int  y 
)

Processes mouse clicks.

Parameters:
buttonThe clicked button.
stateThe click state.
xThe x coordinate.
yThe y coordinate.
void mainReshape ( int  width,
int  height 
)

Processes window resize.

Parameters:
widthThe width.
heightThe height.
void render2DView ( void   )

Renders the 2D view.

std::string str_replace ( std::string  rep,
std::string  wit,
std::string  in 
)

String replace.

Parameters:
repThe pattern.
witThe replacement.
inThe string.
Returns:
The replaced string.

Variable Documentation

int g_iHeight = 800
int g_iWidth = 1000
GLUI* glui_bottom
int light = 0
float rot_matrix[16]
Initial value:
 { 1.0, 0.0, 0.0, 0.0,      0.0, 1.0, 0.0, 0.0,
                         0.0, 0.0, 1.0, 0.0,      0.0, 0.0, 0.0, 1.0  }
float vis_coord
GLuint vis_fbo
GLuint vis_texture
GLuint vis_volume_tex[2]
GLuint vis_volumefbo