StreamlineRenderer Class Reference

Baseclass for all streamlineRenderer. More...

#include <StreamlineRenderer.h>

Inheritance diagram for StreamlineRenderer:

Inheritance graph
[legend]
Collaboration diagram for StreamlineRenderer:

Collaboration graph
[legend]
List of all members.

Public Types

enum  StreamlineMode { Regular, Interactive, EvenlySpaced }
 How seed points are placed. More...
enum  Direction { Front, Back, Both }
 The direction in which streamlines should grow. More...

Public Member Functions

 StreamlineRenderer (const Data &aData)
virtual void render (QPixmap *pixmap)
 Render data into a provided pixmap.
void setStreamlinePen (QPen pen)
 Sets the pen with which to draw streamlines.
void setStreamlineMode (StreamlineMode mode)
 Sets the streamline mode.
void clearStreamlines ()
 Remove all existing streamline points.
void addStreamLinePoint (const Vector<> &aPoint, Direction dir)
 Adds a streamline point using world coordinates.
void addStreamLinePoint (int x, int y, Direction dir)
 Adds a streamline point using device coordinates.
void setDT (float dt)
 Sets dt for integration.
void setDSep (float dsep)
 Sets dsep, the minimum distance between two streamlines.
void setDTest (float dtest)
 Sets dtest, the fraction of dsep after which to stop growing a streamline.

Protected Member Functions

Vector v (const Vector<> &s) const

Protected Attributes

float mDT

Private Types

typedef std::vector< std::pair<
Vector<>, Direction > > 
PointList

Private Member Functions

virtual Vector newPoint (const Vector<> &oldPoint, Direction dir) const =0
void drawStreamline (QPainter &painter, const Vector<> &point, Direction dir)
void streamLinePoints (const Vector<> &point, Direction dir, QVector< QPointF > &pointPairs)
 Calculates the points for a streamline starting at a point, forward or backwards.
void markSamplePoint (const QPointF &p)
 Marks a sample point as having a streamline (used for distance calculation).
float minDistance (const QPointF &p)
 Finds the minimum distance to other sample points.
float minDistance (const Vector<> &v)

Private Attributes

std::vector< QPointF > mSamplePoints
std::queue< Vector<> > mPendingSeedPoints
QPen mStreamlinePen
PointList mStreamlinePoints
StreamlineMode mMode
float mDSep
float mDTest

Detailed Description

Baseclass for all streamlineRenderer.

These render the specified data as streamlines, starting from seed points. The way the seed points are calculated/specified can be set using setStreamlineMode().


Member Typedef Documentation

typedef std::vector< std::pair<Vector<>, Direction> > StreamlineRenderer::PointList [private]
 


Member Enumeration Documentation

enum StreamlineRenderer::Direction
 

The direction in which streamlines should grow.

Enumerator:
Front  Forward (in the direction of the flow).
Back  Backwards (against the direction of the flow).
Both  Both directions.

enum StreamlineRenderer::StreamlineMode
 

How seed points are placed.

Enumerator:
Regular  Seed points are placed on a regular grid.
Interactive  Seed points are specified using addStreamLinePoint().
EvenlySpaced  distance to existing stream lines. See setDSep()


Constructor & Destructor Documentation

StreamlineRenderer::StreamlineRenderer const Data aData  ) 
 


Member Function Documentation

void StreamlineRenderer::addStreamLinePoint int  x,
int  y,
Direction  dir
[inline]
 

Adds a streamline point using device coordinates.

void StreamlineRenderer::addStreamLinePoint const Vector<> &  aPoint,
Direction  dir
[inline]
 

Adds a streamline point using world coordinates.

void StreamlineRenderer::clearStreamlines  )  [inline]
 

Remove all existing streamline points.

void StreamlineRenderer::drawStreamline QPainter &  painter,
const Vector<> &  point,
Direction  dir
[private]
 

void StreamlineRenderer::markSamplePoint const QPointF &  p  )  [private]
 

Marks a sample point as having a streamline (used for distance calculation).

float StreamlineRenderer::minDistance const Vector<> &  v  )  [inline, private]
 

float StreamlineRenderer::minDistance const QPointF &  p  )  [private]
 

Finds the minimum distance to other sample points.

Returns a large value if no other sample point exists.

virtual Vector StreamlineRenderer::newPoint const Vector<> &  oldPoint,
Direction  dir
const [private, pure virtual]
 

void StreamlineRenderer::render QPixmap *  pixmap  )  [virtual]
 

Render data into a provided pixmap.

The size of the pixmap must be getImageSize().

Implements ARender.

void StreamlineRenderer::setDSep float  dsep  )  [inline]
 

Sets dsep, the minimum distance between two streamlines.

void StreamlineRenderer::setDT float  dt  )  [inline]
 

Sets dt for integration.

void StreamlineRenderer::setDTest float  dtest  )  [inline]
 

Sets dtest, the fraction of dsep after which to stop growing a streamline.

void StreamlineRenderer::setStreamlineMode StreamlineMode  mode  )  [inline]
 

Sets the streamline mode.

See StreamlineMode.

void StreamlineRenderer::setStreamlinePen QPen  pen  )  [inline]
 

Sets the pen with which to draw streamlines.

Defaults to solid black.

void StreamlineRenderer::streamLinePoints const Vector<> &  point,
Direction  dir,
QVector< QPointF > &  pointPairs
[private]
 

Calculates the points for a streamline starting at a point, forward or backwards.

(will return an even number of points). The points will be appended to pointPairs (i.e. it will not be cleared beforehand)

Vector StreamlineRenderer::v const Vector<> &  s  )  const [inline, protected]
 


Member Data Documentation

float StreamlineRenderer::mDSep [private]
 

float StreamlineRenderer::mDT [protected]
 

float StreamlineRenderer::mDTest [private]
 

StreamlineMode StreamlineRenderer::mMode [private]
 

std::queue< Vector<> > StreamlineRenderer::mPendingSeedPoints [private]
 

std::vector<QPointF> StreamlineRenderer::mSamplePoints [private]
 

QPen StreamlineRenderer::mStreamlinePen [private]
 

PointList StreamlineRenderer::mStreamlinePoints [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Jan 23 19:45:08 2006 for Visualization by  doxygen 1.4.6