ARender Class Reference

Base class for data renderers. More...

#include <ARender.h>

Inheritance diagram for ARender:

Inheritance graph
[legend]
Collaboration diagram for ARender:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~ARender ()
virtual QSize getImageSize () const
 Gets the previously set image size.
virtual void setImageSize (const QSize &s)
 Sets the desired image size.
virtual void render (QPixmap *pixmap)=0
 Render data into a provided pixmap.
Vector< float > getFlow (int aX, int aY) const
 Gets the flow from (x, y) (image coordinates).
float getDataPiece (int aX, int aY, unsigned int aDataIndex) const
 Gets the desired dataPiece from (x, y) (image coordinates).

Protected Member Functions

 ARender (const Data &aData)
Vector getDataAt (float x, float y, float z) const
 Gets the data from (x, y, z) (world coordinates).
QPointF imageToWorldCoords (int aX, int aY) const
 Converts (integer) image coordinates to (floating point) world coordinates.
void setupCoordSystem (QPainter &aPainter) const
 Sets up the coord system on a painter.
void setupCoordSystem (QMatrix &aMatrix) const
 Sets up the coord system on a Matrix.

Protected Attributes

const Data & mData
QSize mImageSize

Detailed Description

Base class for data renderers.

A renderer takes a Data instance and allows producing an image (in form of a QPixmap) of arbitrary size. The desired size can be set using setImageSize.


Constructor & Destructor Documentation

ARender::ARender (  const Data &  aData  )  [inline, protected]
 

virtual ARender::~ARender (   )  [inline, virtual]
 


Member Function Documentation

Vector ARender::getDataAt (  float  x,
float  y,
float  z
)  const [protected]
 

Gets the data from (x, y, z) (world coordinates).

float ARender::getDataPiece (  int  aX,
int  aY,
unsigned int  aDataIndex
)  const
 

Gets the desired dataPiece from (x, y) (image coordinates).

Vector< float > ARender::getFlow (  int  aX,
int  aY
)  const
 

Gets the flow from (x, y) (image coordinates).

virtual QSize ARender::getImageSize (   )  const [inline, virtual]
 

Gets the previously set image size.

Defaults to the xdim/ydim of the data.

QPointF ARender::imageToWorldCoords (  int  aX,
int  aY
)  const [protected]
 

Converts (integer) image coordinates to (floating point) world coordinates.

virtual void ARender::render (  QPixmap *  pixmap  )  [pure virtual]
 

Render data into a provided pixmap.

The size of the pixmap must be getImageSize().

Implemented in ArrowRenderer, BackgroundRenderer, and StreamlineRenderer.

virtual void ARender::setImageSize (  const QSize &  s  )  [inline, virtual]
 

Sets the desired image size.

Renderers can render into any desired size, but best results will be produced if the aspect ratio is left unchanged.

void ARender::setupCoordSystem (  QMatrix &  aMatrix  )  const [protected]
 

Sets up the coord system on a Matrix.

That is, changes the origin to the lower left, and change the range of coords to [min coord, max coord].

void ARender::setupCoordSystem (  QPainter &  aPainter  )  const [protected]
 

Sets up the coord system on a painter.

That is, changes the origin to the lower left, and change the range of coords to [min coord, max coord].


Member Data Documentation

const Data& ARender::mData [protected]
 

QSize ARender::mImageSize [protected]
 


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