#include <GL3DView.h>
Inherits GLView.
Public Member Functions | |
GL3DView () | |
~GL3DView () | |
void | initializeGL () |
void | uninitializeGL () |
void | paintGL () |
void | resizeGL (int width, int height) |
void | mousePressEvent (QMouseEvent *event) |
void | mouseMoveEvent (QMouseEvent *event) |
void | wheelEvent (QWheelEvent *event) |
Protected Member Functions | |
void | setColorVertex (GLfloat x, GLfloat y, GLfloat z) |
void | drawCube () |
void | loadTransferFunction () |
void | drawColorCubes () |
void | drawVolume (GLFramebuffer *framebuffer) |
Private Attributes | |
bool | viewChanged |
GLTexture1D | transferTexture |
GLFramebuffer | rtBoxFrontBuffer |
GLFramebuffer | rtBoxBackBuffer |
GLFramebuffer | rcSmallBuffer |
GLFramebuffer | rcBigBuffer |
GLMultiProgramm | rcProgramms [shaderCount] |
GLProgramm | rtProgramm |
GLuint | rtSize |
GLuint | rcBigSize |
GLuint | rcSmallSize |
GLuint | minFps |
GLuint | width |
GLuint | height |
GLuint | loopIterations |
GLfloat | aspectRatio |
GLfloat | xRot |
GLfloat | zRot |
GLfloat | dist |
QPoint | lastPos |
Definition at line 22 of file GL3DView.h.
GL3DView::GL3DView | ( | ) |
Definition at line 32 of file GL3DView.cpp.
References aspectRatio, GLFramebuffer::createTexture(), dist, GLProgramm::load(), GLMultiProgramm::load(), minFps, rcBigBuffer, rcBigSize, rcProgramms, rcSmallBuffer, rcSmallSize, rtBoxBackBuffer, rtBoxFrontBuffer, rtProgramm, rtSize, GLTexture::setTypes(), GLTexture1D::setTypes(), transferTexture, viewChanged, xRot, and zRot.
GL3DView::~GL3DView | ( | ) |
Definition at line 59 of file GL3DView.cpp.
void GL3DView::drawColorCubes | ( | ) | [protected] |
Definition at line 386 of file GL3DView.cpp.
References aspectRatio, dist, drawCube(), GLFramebuffer::getBuffer(), height, rtBoxBackBuffer, rtBoxFrontBuffer, rtSize, width, xRot, and zRot.
Referenced by paintGL().
void GL3DView::drawCube | ( | ) | [protected] |
Definition at line 326 of file GL3DView.cpp.
References setColorVertex().
Referenced by drawColorCubes().
void GL3DView::drawVolume | ( | GLFramebuffer * | framebuffer | ) | [protected] |
Definition at line 444 of file GL3DView.cpp.
References GLProgramm::fragmentShader, GLFramebuffer::getBuffer(), GLFramebuffer::getHeight(), GLTexture::getTexture(), GLFramebuffer::getTexture(), GLTexture1D::getTexture(), GLFramebuffer::getWidth(), height, GLMultiProgramm::lastProgramm, GLShader::loopIterations, loopIterations, GLMultiProgramm::loopProgramm, GLProgramm::programm, rcProgramms, rcSmallBuffer, rtBoxBackBuffer, rtBoxFrontBuffer, StateDesc::shaderIndex, GLView::stateDesc, VolumeDesc::stepDist, transferTexture, GLView::volumeDesc, VolumeDesc::volumeTexture, and width.
Referenced by paintGL().
void GL3DView::initializeGL | ( | ) | [virtual] |
Implements GLView.
Definition at line 63 of file GL3DView.cpp.
References GLFramebuffer::create(), GLTexture1D::create(), GLMultiProgramm::link(), GLProgramm::link(), loadTransferFunction(), rcBigBuffer, rcBigSize, rcProgramms, rcSmallBuffer, rcSmallSize, rtBoxBackBuffer, rtBoxFrontBuffer, rtProgramm, rtSize, shaderCount, and transferTexture.
void GL3DView::loadTransferFunction | ( | ) | [protected] |
Definition at line 365 of file GL3DView.cpp.
References GLTexture1D::getWidth(), TransferFunctionDesc::hasChanged, TransferFunctionDesc::transferFunction, GLView::transferFunctionDesc, transferTexture, GLTexture1D::updateSubImage(), and width.
Referenced by initializeGL(), and paintGL().
void GL3DView::mouseMoveEvent | ( | QMouseEvent * | event | ) | [virtual] |
Implements GLView.
Definition at line 282 of file GL3DView.cpp.
References lastPos, GLView::parent, viewChanged, xRot, and zRot.
void GL3DView::mousePressEvent | ( | QMouseEvent * | event | ) | [virtual] |
void GL3DView::paintGL | ( | ) | [virtual] |
Implements GLView.
Definition at line 143 of file GL3DView.cpp.
References GLFramebuffer::create(), drawColorCubes(), drawVolume(), GLProgramm::fragmentShader, GLTexture::getTexture(), GLFramebuffer::getTexture(), VolumeDesc::hasChanged, TransferFunctionDesc::hasChanged, GLMultiProgramm::lastProgramm, GLProgramm::link(), loadTransferFunction(), GLShader::loopIterations, loopIterations, GLMultiProgramm::loopProgramm, GLShader::maxLoopIterations, VolumeDesc::maxSideLength, minFps, GLProgramm::programm, rcBigSize, rcProgramms, rcSmallBuffer, rcSmallSize, rtProgramm, StateDesc::shaderChanged, StateDesc::shaderIndex, GLView::stateDesc, TimeCounter_getDiffInUs(), TimeCounter_read(), GLView::transferFunctionDesc, viewChanged, GLView::volumeDesc, and VolumeDesc::volumeTexture.
void GL3DView::resizeGL | ( | int | width, | |
int | height | |||
) | [virtual] |
Implements GLView.
Definition at line 259 of file GL3DView.cpp.
References aspectRatio, and viewChanged.
void GL3DView::setColorVertex | ( | GLfloat | x, | |
GLfloat | y, | |||
GLfloat | z | |||
) | [protected] |
Definition at line 313 of file GL3DView.cpp.
References GLView::volumeDesc, VolumeDesc::xNormLength, VolumeDesc::xNormOffset, VolumeDesc::yNormLength, VolumeDesc::yNormOffset, VolumeDesc::zNormLength, and VolumeDesc::zNormOffset.
Referenced by drawCube().
void GL3DView::uninitializeGL | ( | ) | [virtual] |
Implements GLView.
Definition at line 112 of file GL3DView.cpp.
References GLFramebuffer::free(), GLTexture1D::free(), GLProgramm::free(), rcBigBuffer, rcProgramms, rcSmallBuffer, rtBoxBackBuffer, rtBoxFrontBuffer, rtProgramm, shaderCount, and transferTexture.
void GL3DView::wheelEvent | ( | QWheelEvent * | event | ) | [virtual] |
Implements GLView.
Definition at line 296 of file GL3DView.cpp.
References dist, GLView::parent, and viewChanged.
GLfloat GL3DView::aspectRatio [private] |
Definition at line 53 of file GL3DView.h.
Referenced by drawColorCubes(), GL3DView(), and resizeGL().
GLfloat GL3DView::dist [private] |
Definition at line 54 of file GL3DView.h.
Referenced by drawColorCubes(), GL3DView(), and wheelEvent().
GLuint GL3DView::height [private] |
QPoint GL3DView::lastPos [private] |
GLuint GL3DView::loopIterations [private] |
GLuint GL3DView::minFps [private] |
GLFramebuffer GL3DView::rcBigBuffer [private] |
Definition at line 46 of file GL3DView.h.
Referenced by GL3DView(), initializeGL(), and uninitializeGL().
GLuint GL3DView::rcBigSize [private] |
GLMultiProgramm GL3DView::rcProgramms[shaderCount] [private] |
Definition at line 47 of file GL3DView.h.
Referenced by drawVolume(), GL3DView(), initializeGL(), paintGL(), and uninitializeGL().
GLFramebuffer GL3DView::rcSmallBuffer [private] |
Definition at line 46 of file GL3DView.h.
Referenced by drawVolume(), GL3DView(), initializeGL(), paintGL(), and uninitializeGL().
GLuint GL3DView::rcSmallSize [private] |
GLFramebuffer GL3DView::rtBoxBackBuffer [private] |
Definition at line 46 of file GL3DView.h.
Referenced by drawColorCubes(), drawVolume(), GL3DView(), initializeGL(), and uninitializeGL().
GLFramebuffer GL3DView::rtBoxFrontBuffer [private] |
Definition at line 46 of file GL3DView.h.
Referenced by drawColorCubes(), drawVolume(), GL3DView(), initializeGL(), and uninitializeGL().
GLProgramm GL3DView::rtProgramm [private] |
Definition at line 48 of file GL3DView.h.
Referenced by GL3DView(), initializeGL(), paintGL(), and uninitializeGL().
GLuint GL3DView::rtSize [private] |
Definition at line 49 of file GL3DView.h.
Referenced by drawColorCubes(), GL3DView(), and initializeGL().
GLTexture1D GL3DView::transferTexture [private] |
Definition at line 45 of file GL3DView.h.
Referenced by drawVolume(), GL3DView(), initializeGL(), loadTransferFunction(), and uninitializeGL().
bool GL3DView::viewChanged [private] |
Definition at line 44 of file GL3DView.h.
Referenced by GL3DView(), mouseMoveEvent(), paintGL(), resizeGL(), and wheelEvent().
GLuint GL3DView::width [private] |
Definition at line 51 of file GL3DView.h.
Referenced by drawColorCubes(), drawVolume(), and loadTransferFunction().
GLfloat GL3DView::xRot [private] |
Definition at line 54 of file GL3DView.h.
Referenced by drawColorCubes(), GL3DView(), and mouseMoveEvent().
GLfloat GL3DView::zRot [private] |
Definition at line 54 of file GL3DView.h.
Referenced by drawColorCubes(), GL3DView(), and mouseMoveEvent().