|
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 |
These render the specified data as streamlines, starting from seed points. The way the seed points are calculated/specified can be set using setStreamlineMode().