#include <OpenGLWidget.h>
Public Slots | |
void | selectStreamLineColor () |
void | selectStreamGlyphColor () |
void | setStreamGlyphSize (int gs) |
void | setStreamGlyphDistance (int gd) |
void | updateStreamLines () |
void | setEuler () |
void | setRungeKutta () |
void | setActiveBackground (int bg) |
void | setActiveArrows (bool gl) |
void | setActiveTransferFunction (bool tf) |
void | resetDataView () |
nk - reset dataview -> calls setDataView(true); | |
void | setDSep (int dSep) |
void | setDTest (int dTest) |
void | setLinesActive (bool isActive) |
nk - set states on/off (from UI) | |
void | setTaperingActive (bool isActive) |
void | setGlyphActive (bool isActive) |
Signals | |
void | setPointSize (int p) |
nk - signals are being processed to Arrows:: (connected by UI) | |
void | setResolution (int r) |
void | setActivePointScale (bool ps) |
void | setArrowColor () |
Public Member Functions | |
OpenGLWidget (QWidget *parent=0, Qt::WFlags flags=0) | |
virtual | ~OpenGLWidget () |
void | initializeGL () |
void | resizeGL (int width, int height) |
void | paintGL () |
void | setFlowData (FlowData *data) |
void | setColorBarTexture (QGradientStops stops) |
nk - create TF Texture -> called from Navigation | |
Protected Member Functions | |
void | wheelEvent (QWheelEvent *we) |
void | mousePressEvent (QMouseEvent *pe) |
void | mouseMoveEvent (QMouseEvent *me) |
void | mouseReleaseEvent (QMouseEvent *re) |
Definition at line 17 of file OpenGLWidget.h.
OpenGLWidget::OpenGLWidget | ( | QWidget * | parent = 0 , |
|
Qt::WFlags | flags = 0 | |||
) |
disable bg & arr at startup
background color
nk - set default viewing
Definition at line 9 of file OpenGLWidget.cpp.
References OrthoViewT::bottom, OrthoViewT::left, OrthoViewT::right, Ui_OpenGLWidget::setupUi(), and OrthoViewT::top.
OpenGLWidget::~OpenGLWidget | ( | ) | [virtual] |
Definition at line 47 of file OpenGLWidget.cpp.
void OpenGLWidget::initializeGL | ( | ) |
Override: initialize OpenGL-stuff
get uniform locations
set uniform location values
setup Arrow -> after glew init!!!
Definition at line 51 of file OpenGLWidget.cpp.
References Shader::Bind(), Shader::GetProgram(), Shader::Load(), and Shader::Unbind().
void OpenGLWidget::resizeGL | ( | int | width, | |
int | height | |||
) |
Override: resize OpenGL-view
Definition at line 93 of file OpenGLWidget.cpp.
void OpenGLWidget::paintGL | ( | ) |
Render gl-context
Definition at line 501 of file OpenGLWidget.cpp.
References StreamLine::draw(), and Arrows::draw().
void OpenGLWidget::setFlowData | ( | FlowData * | data | ) |
Set data to access
because of exception at file close when nothing is opened
pointer to geometry data
get dimension from geometry
(nk )set arrow textures
set camera & viewport to appropriate size
nk - reset if flowData exists (see comments somewhat lines up)
if scalar channel -> createe background texture
Definition at line 300 of file OpenGLWidget.cpp.
References Texture::CreateBackground(), Texture::Delete(), FlowData::getChannel(), FlowData::getChannelCount(), FlowGeometry::getDimX(), FlowGeometry::getDimY(), FlowData::getGeometry(), FlowData::getIsScalar(), max_channels, NORMALIZED, StreamLine::reset(), and Arrows::setFlowData().
Referenced by MainWindow::closeFile(), and MainWindow::openFile().
void OpenGLWidget::setColorBarTexture | ( | QGradientStops | stops | ) |
nk - create TF Texture -> called from Navigation
create texture for color lookup
Definition at line 188 of file OpenGLWidget.cpp.
References Texture::CreateColorBar().
Referenced by Navigation::createColorBar().
void OpenGLWidget::selectStreamLineColor | ( | ) | [slot] |
void OpenGLWidget::selectStreamGlyphColor | ( | ) | [slot] |
void OpenGLWidget::setStreamGlyphSize | ( | int | gs | ) | [slot] |
printf("GlyphSize: %d\n", gs); values [1...63]
Definition at line 237 of file OpenGLWidget.cpp.
References StreamLine::setGlyphSize().
void OpenGLWidget::setStreamGlyphDistance | ( | int | gd | ) | [slot] |
printf("GlyphDist: %d\n", gd); // values [0...99]
Definition at line 243 of file OpenGLWidget.cpp.
References StreamLine::setGlyphDistance().
void OpenGLWidget::updateStreamLines | ( | ) | [slot] |
nk - update streamlines if enabled
Definition at line 200 of file OpenGLWidget.cpp.
References StreamLine::create().
void OpenGLWidget::setEuler | ( | ) | [slot] |
Definition at line 249 of file OpenGLWidget.cpp.
References EULER, and StreamLine::setIntegrationMethod().
void OpenGLWidget::setRungeKutta | ( | ) | [slot] |
Definition at line 254 of file OpenGLWidget.cpp.
References RUNGE_KUTTA2, and StreamLine::setIntegrationMethod().
void OpenGLWidget::setActiveBackground | ( | int | bg | ) | [slot] |
Definition at line 162 of file OpenGLWidget.cpp.
References FlowData::getScalarChannelCount(), and Arrows::setActiveBackground().
void OpenGLWidget::setActiveArrows | ( | bool | gl | ) | [slot] |
Definition at line 381 of file OpenGLWidget.cpp.
void OpenGLWidget::setActiveTransferFunction | ( | bool | tf | ) | [slot] |
Definition at line 387 of file OpenGLWidget.cpp.
void OpenGLWidget::resetDataView | ( | ) | [slot] |
void OpenGLWidget::setDSep | ( | int | dSep | ) | [slot] |
convert to float and set StreamLine::setDSep( float )
Definition at line 406 of file OpenGLWidget.cpp.
References MAX_SLIDER_VALUE, and StreamLine::setDSep().
void OpenGLWidget::setDTest | ( | int | dTest | ) | [slot] |
convert to float and set StreamLine::setDTest( float )
Definition at line 414 of file OpenGLWidget.cpp.
References MAX_SLIDER_VALUE, and StreamLine::setDTest().
void OpenGLWidget::setLinesActive | ( | bool | isActive | ) | [slot] |
nk - set states on/off (from UI)
nk - hold state local -> prevent from exception at paintGL() if no streamline object exists
Definition at line 393 of file OpenGLWidget.cpp.
References StreamLine::create(), and StreamLine::setLinesActive().
void OpenGLWidget::setTaperingActive | ( | bool | isActive | ) | [slot] |
void OpenGLWidget::setGlyphActive | ( | bool | isActive | ) | [slot] |
void OpenGLWidget::setPointSize | ( | int | p | ) | [signal] |
nk - signals are being processed to Arrows:: (connected by UI)
void OpenGLWidget::setResolution | ( | int | r | ) | [signal] |
void OpenGLWidget::setActivePointScale | ( | bool | ps | ) | [signal] |
void OpenGLWidget::setArrowColor | ( | ) | [signal] |
void OpenGLWidget::wheelEvent | ( | QWheelEvent * | we | ) | [protected] |
Definition at line 533 of file OpenGLWidget.cpp.
References OrthoViewT::bottom, OrthoViewT::left, OrthoViewT::right, and OrthoViewT::top.
void OpenGLWidget::mousePressEvent | ( | QMouseEvent * | pe | ) | [protected] |
Definition at line 606 of file OpenGLWidget.cpp.
void OpenGLWidget::mouseMoveEvent | ( | QMouseEvent * | me | ) | [protected] |
nk - update view
nk - update GLWidget
nk - update view
nk - update GLWidget
Definition at line 561 of file OpenGLWidget.cpp.
References OrthoViewT::bottom, OrthoViewT::left, OrthoViewT::right, and OrthoViewT::top.
void OpenGLWidget::mouseReleaseEvent | ( | QMouseEvent * | re | ) | [protected] |
Definition at line 623 of file OpenGLWidget.cpp.