#include <Streamlines.h>
Classes | |
struct | position |
struct | streamline |
Public Slots | |
void | setTimestep (int timestep) |
void | setLineWidth (int width) |
void | setLineType (int type) |
void | setTexturePeriod (int period) |
void | setShowStreamlines (int showCheckState) |
void | setIntegrationType (int type) |
void | setDSep (int dsep) |
void | setDTest (int dtest) |
Public Member Functions | |
Streamlines (FlowScene *flowScene) | |
virtual | ~Streamlines (void) |
void | initialize (FlowData *flowData) |
bool | drawEvenlySpacedStreamLines (FlowData *flowData, int sceneWidth, int sceneHeight, QPointF pos, float zDistance, float xratio, float yratio) |
void | setStreamlineColor (QColor &color) |
Private Types | |
typedef QList< position > | PosList |
Private Member Functions | |
void | updateStreamlines () |
int * | eulerspaced (float dt, float x, float y, int sceneWidth, int sceneHeight) |
int * | rungekuttaspaced (float dt, float x, float y, int sceneWidth, int sceneHeight) |
bool | checkValidStreamlinePoint (float x, float y, int currentline, bool startpoint, bool forward) |
float | distance (position start, position end) |
void | setTaperingCoef () |
void | addpointtostreamline (float x, float y, float thickness, float angle, int linenumber, bool append) |
void | storeNewSeedPoints (position p, float xvelocity, float yvelocity) |
void | drawLinesFromMemory (int sceneWidth, int sceneHeight) |
void | drawGlyphMapping (int sceneWidth, int sceneHeight) |
void | drawTexturedStreamlines (int sceneWidth, int sceneHeight) |
void | setArrowType (int type) |
void | drawArrow (float arrowsize, float offsetx, float offsety, float angle, int sceneWidth, int sceneHeight) |
float | textureGenerationSin (int x) |
float | textureGenerationMod (int x) |
Private Attributes | |
FlowScene * | m_flowScene |
FlowData * | m_flowData |
Texture2D | m_streamLines2D |
Texture2D | m_arrowTex2D |
QList< position > | seedpoints |
PosList ** | m_pointGrid |
int | m_gridWidth |
int | m_gridHeight |
int | count |
float | m_dt |
float | m_dsep |
float | m_dtest |
bool | m_showStreamlines |
bool | m_rungekutta |
int | m_timestep |
int | m_textureperiod |
float | m_linewidth |
float | m_tempthicknesscoef |
int | m_linetype |
bool | m_tapering |
float | m_yratio |
float | m_xratio |
float | m_zDistance |
QPointF | m_pos |
QColor | m_StreamlineColor |
QList< streamline > | m_streamlines |
typedef QList<position> Streamlines::PosList [private] |
Streamlines::Streamlines | ( | FlowScene * | flowScene | ) |
Streamlines::~Streamlines | ( | void | ) | [virtual] |
void Streamlines::addpointtostreamline | ( | float | x, | |
float | y, | |||
float | thickness, | |||
float | angle, | |||
int | linenumber, | |||
bool | append | |||
) | [private] |
Adds a new point to a given streamline
coordinate of the point coordinate of the point of the streamline at the point direction of the streamline at the point number to identify a streamline
bool Streamlines::checkValidStreamlinePoint | ( | float | x, | |
float | y, | |||
int | currentline, | |||
bool | startpoint, | |||
bool | forward | |||
) | [private] |
Checks if new sample point is valid
void Streamlines::drawArrow | ( | float | arrowsize, | |
float | offsetx, | |||
float | offsety, | |||
float | angle, | |||
int | sceneWidth, | |||
int | sceneHeight | |||
) | [private] |
bool Streamlines::drawEvenlySpacedStreamLines | ( | FlowData * | flowData, | |
int | sceneWidth, | |||
int | sceneHeight, | |||
QPointF | pos, | |||
float | zDistance, | |||
float | xratio, | |||
float | yratio | |||
) |
Draws the evenly spaced streamlines on the screen
Holds the complete flowdata With of the Scene Height of the Scene current position in the data (needed when zoom is activated zoomfactor
void Streamlines::drawGlyphMapping | ( | int | sceneWidth, | |
int | sceneHeight | |||
) | [private] |
Draws Glyphs on the streamlines
Screen width Screen heigt
remember remaining distance. If there was space to draw more than one glyph between two samplepoints, distance changes
void Streamlines::drawLinesFromMemory | ( | int | sceneWidth, | |
int | sceneHeight | |||
) | [private] |
Draws previously computed streamlines on screen
Screen width Screen heigt
void Streamlines::drawTexturedStreamlines | ( | int | sceneWidth, | |
int | sceneHeight | |||
) | [private] |
Draw Textured Streamlines
int * Streamlines::eulerspaced | ( | float | dt, | |
float | x, | |||
float | y, | |||
int | sceneWidth, | |||
int | sceneHeight | |||
) | [private] |
Streamlines calculated with euler method
void Streamlines::initialize | ( | FlowData * | flowData | ) |
int * Streamlines::rungekuttaspaced | ( | float | dt, | |
float | x, | |||
float | y, | |||
int | sceneWidth, | |||
int | sceneHeight | |||
) | [private] |
Streamlines calculated with runge kutta method
void Streamlines::setArrowType | ( | int | type | ) | [private] |
Changes Arrowtype for glyphmapping
sets the arrowtype
void Streamlines::setDSep | ( | int | dsep | ) | [slot] |
void Streamlines::setDTest | ( | int | dtest | ) | [slot] |
void Streamlines::setIntegrationType | ( | int | type | ) | [slot] |
void Streamlines::setLineType | ( | int | type | ) | [slot] |
void Streamlines::setLineWidth | ( | int | width | ) | [slot] |
void Streamlines::setShowStreamlines | ( | int | showCheckState | ) | [slot] |
void Streamlines::setStreamlineColor | ( | QColor & | color | ) |
void Streamlines::setTaperingCoef | ( | ) | [private] |
Calculates the Tappering for the Streamlines
void Streamlines::setTexturePeriod | ( | int | period | ) | [slot] |
void Streamlines::setTimestep | ( | int | timestep | ) | [slot] |
void Streamlines::storeNewSeedPoints | ( | position | p, | |
float | xvelocity, | |||
float | yvelocity | |||
) | [private] |
float Streamlines::textureGenerationMod | ( | int | x | ) | [private] |
float Streamlines::textureGenerationSin | ( | int | x | ) | [private] |
void Streamlines::updateStreamlines | ( | ) | [private] |
Calculates the evenly spaced streamlines
int Streamlines::count [private] |
Texture2D Streamlines::m_arrowTex2D [private] |
float Streamlines::m_dsep [private] |
float Streamlines::m_dt [private] |
float Streamlines::m_dtest [private] |
FlowData* Streamlines::m_flowData [private] |
FlowScene* Streamlines::m_flowScene [private] |
int Streamlines::m_gridHeight [private] |
int Streamlines::m_gridWidth [private] |
int Streamlines::m_linetype [private] |
float Streamlines::m_linewidth [private] |
PosList** Streamlines::m_pointGrid [private] |
QPointF Streamlines::m_pos [private] |
bool Streamlines::m_rungekutta [private] |
bool Streamlines::m_showStreamlines [private] |
QColor Streamlines::m_StreamlineColor [private] |
QList<streamline> Streamlines::m_streamlines [private] |
Texture2D Streamlines::m_streamLines2D [private] |
bool Streamlines::m_tapering [private] |
float Streamlines::m_tempthicknesscoef [private] |
int Streamlines::m_textureperiod [private] |
int Streamlines::m_timestep [private] |
float Streamlines::m_xratio [private] |
float Streamlines::m_yratio [private] |
float Streamlines::m_zDistance [private] |
QList<position> Streamlines::seedpoints [private] |