#include <Arrows.h>
Public Slots | |
void | setResolution (int res) |
void | setPointSize (int size) |
void | setActivePointScale (bool ps) |
void | setColor () |
Public Member Functions | |
Arrows (QWidget *parent=0) | |
virtual | ~Arrows () |
void | draw () |
void | setFlowData (FlowData *data) |
void | setActiveBackground (int bg) |
Definition at line 11 of file Arrows.h.
Arrows::Arrows | ( | QWidget * | parent = 0 |
) |
nk - connect navigation with setRes & setPointSize
nk - choose color for arrows : tbd: modify shader
Definition at line 6 of file Arrows.cpp.
References Shader::Bind(), Shader::GetProgram(), Shader::Load(), setActivePointScale(), setColor(), setPointSize(), setResolution(), and Shader::Unbind().
Arrows::~Arrows | ( | ) | [virtual] |
Definition at line 44 of file Arrows.cpp.
void Arrows::draw | ( | ) |
TEST Velocity & points
if xTick is reached -> place vertex and increase xRes
blend point sprites with bg texture
nk - set current arrow color -> black does not work because of blending with background (not texture)
nk - set active textur unit explicit!!!
nk - current index in dataset array
null-vector
FlowChannel* chZ = m_flowData->getChannel(Z); // nk - we use only x/y to draw in plane
nk - now corrected version of drawing arrows
get already normalized velocity vector - only use x,y becaus of plane
nk - calc angle of arrows
set normal point size
bind shader
set angle in shader
nk reset current color back to old one
Definition at line 146 of file Arrows.cpp.
References Shader::Bind(), FlowData::getChannel(), FlowGeometry::getNormPos(), FlowChannel::getValue(), Shader::Unbind(), vec3::v, X, and Y.
Referenced by OpenGLWidget::paintGL().
void Arrows::setFlowData | ( | FlowData * | data | ) |
set flow data
set flow geometry
set dims of dataset
create arrow texture
Definition at line 118 of file Arrows.cpp.
References Texture::CreateGlyph(), FlowGeometry::getDimX(), FlowGeometry::getDimY(), and FlowData::getGeometry().
Referenced by OpenGLWidget::setFlowData().
void Arrows::setActiveBackground | ( | int | bg | ) |
Definition at line 49 of file Arrows.cpp.
References FlowData::getChannel(), FlowData::getChannelCount(), FlowData::getIsScalar(), and NORMALIZED.
Referenced by OpenGLWidget::setActiveBackground().
void Arrows::setResolution | ( | int | res | ) | [slot] |
void Arrows::setPointSize | ( | int | size | ) | [slot] |
void Arrows::setActivePointScale | ( | bool | ps | ) | [slot] |
void Arrows::setColor | ( | ) | [slot] |