Streamlines Class Reference

#include <Streamlines.h>

List of all members.

Public Member Functions

 Streamlines (flowData *f)
 ~Streamlines (void)
void draw ()
void updateStreamlines ()
void setDt (int dt)
void setDTest (int dtest)
void setDSep (int dsep)
double getDTest ()
double getDSep ()
void setSeedMode (int seedMode)
void setIntegrationMode (int integrationMode)
void makeNewLine (double x, double y)
void toggleTapering ()
void toggleGlyphs ()
void toggleTexturing ()

Static Public Attributes

static const int euler = 100
static const int rungekutta = 101
static const int manual = 200
static const int evenly = 201
static const int exclude = 300
static const int alone = 301
static const int maxLoopCount = 5000

Private Member Functions

StreamlinecreateStreamline (double start_x, double start_y)
bool getNewSeedPoint (Streamline *activeStreamline, double *result_x, double *result_y)
bool inBorders (vector3f v)
double getMinDistance (vector3f v, int streamlineId, int mode)
void addStreamlineToMap (Streamline *sl)
void addSamplePointToMap (SamplePoint sp)
void clearStreamlines ()
void drawGlyphs ()
void drawTapering ()
void drawNormal ()


Detailed Description

Class which is responsible for the drawing and creation of streamlines for a specific stream.
The User can choose between two different integration modes of the streamlines and if they should be evenly spaced if he wants to manually seed them.
Furthermore it is possible to set all parameters liket dt, dtest and sep.
For the rendering of the streamlines it is possible to activate tapering oder texture generation, as well as rendering glyphs.


Constructor & Destructor Documentation

Streamlines::Streamlines ( flowData f  ) 

constructor

Parameters:
*f flowData where the information about the grid and the stream is stored

Streamlines::~Streamlines ( void   ) 

destructor


Member Function Documentation

void Streamlines::draw (  ) 

Draws the streamlines in the desired mode (with or without texturing, glyphs, ... )

void Streamlines::updateStreamlines (  ) 

Function which clears all existing streamlines and calculates them from new.
This function is for example called when a new dataset is loaded.

void Streamlines::setDt ( int  dt  ) 

This function is to set dt, which is responsible for the distance between two sample points.

Parameters:
dt the new value for m_dt

void Streamlines::setDTest ( int  dtest  ) 

This function is called to set dTest, it is called if the user moves the slider.

Parameters:
dtest new dtest value

void Streamlines::setDSep ( int  dsep  ) 

This function is called to set dSep, it is called if the user moves the slider.

Parameters:
dtest new dSep value

double Streamlines::getDTest (  ) 

Returns the current value for dTest.

Returns:
the dTest value

double Streamlines::getDSep (  ) 

Returns the current value for dSep.

Returns:
the dSep value

void Streamlines::setSeedMode ( int  seedMode  ) 

Function to set the seedMode for the streamlines.
This can be either 'evenly spaced' or 'manual'.

Parameters:
id of the seed mode (static variables)

void Streamlines::setIntegrationMode ( int  integrationMode  ) 

Function to set the integration Mode for the streamlines.
This can bei either 'Runge-Kutta' or 'Euler'.

Parameters:
id of the integration mode (static variables)

void Streamlines::makeNewLine ( double  x,
double  y 
)

Function with makes a new streamline at specific coordinates.

Parameters:
x x Coordinate of the desired streamline
y y Coordinate of the desired streamline

void Streamlines::toggleTapering (  ) 

Function which is called when the user enables or disables tapering.

void Streamlines::toggleGlyphs (  ) 

Function which is called when the user enables or disables the rendering of glyphs.

void Streamlines::toggleTexturing (  ) 

Function which is called when the user enables or disables texturing for the streamlines.

Streamline* Streamlines::createStreamline ( double  start_x,
double  start_y 
) [private]

Function which creates a new streamline at specific coordinates and returns the created streamline.

Parameters:
start_x xposition of the new streamline
start_y yposition of the new streamline
Returns:
the new created streamline

bool Streamlines::getNewSeedPoint ( Streamline activeStreamline,
double *  result_x,
double *  result_y 
) [private]

Function to search for new seed points along a streamline. It checks first on the "left" side of the streamline.
If it finds no valid seed point there it continues on the other side.
If it cannot find an seedpoint on the actual streamline it continues on the next streamline.
When a valid seedpoint is found it coordinates are saved in result_x and result_y

Parameters:
*activeStreamline the active streamline
*result_x the coordinate of the valid seespoint on the x axis
*result_y the coordinate of the valid seespoint on the y axis
Returns:
true if a valid seedpoint is found

bool Streamlines::inBorders ( vector3f  v  )  [private]

This function checks if the vector is within the grid grid borders.

Parameters:
the vector of which the position should be checked
Returns:
true if the vector is within the borders of the grid

double Streamlines::getMinDistance ( vector3f  v,
int  streamlineId,
int  mode 
) [private]

This function checks the minimal distance between one point and the points of the other (or the own) streamlines.

Parameters:
the vector of which the position should be checked
streamlineId the id of the actual streamline
mode can be exclude or alone, either if the points of the other streamlines should be considerd or those from the own streamline
Returns:
the minimal distance to other points

void Streamlines::addStreamlineToMap ( Streamline sl  )  [private]

This function adds points from one streamline to the map where all points from all streamlines are stored

Parameters:
*sl streamline of which the points are added to the map

void Streamlines::addSamplePointToMap ( SamplePoint  sp  )  [private]

This function adds one point to the map where all points from all streamlines are stored

Parameters:
sp A sample point which should be stored in the map.

void Streamlines::clearStreamlines (  )  [private]

Function clears all streamlines. This means that all streamlines are removed. This function is called when a new dataset is loaded, or a different seed mode is chosen.

void Streamlines::drawGlyphs (  )  [private]

Function which draws the streamlines in form of glyphs.

void Streamlines::drawTapering (  )  [private]

Function which is called when the user wants to render with tapering.

void Streamlines::drawNormal (  )  [private]

Function which draws the streamlines without tapering or glyphs.


Member Data Documentation

const int Streamlines::euler = 100 [static]

const int Streamlines::rungekutta = 101 [static]

id of the euler integration mode

const int Streamlines::manual = 200 [static]

id of the runge kutta integration mode

const int Streamlines::evenly = 201 [static]

manual seeding mode id

const int Streamlines::exclude = 300 [static]

evenly spaced streamlines id

const int Streamlines::alone = 301 [static]

tells if checkMinDistance should consider the actual streamline too

const int Streamlines::maxLoopCount = 5000 [static]

tells if checkMinDistance should consider the actual streamline too


The documentation for this class was generated from the following file:
Generated on Wed Jan 17 03:48:40 2007 for Flowvis-parma_wallaby by  doxygen 1.5.1-p1