Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Examples  

QSFigure Class Reference

Dataset : 3D figure. More...

#include <qsfigure.h>

Inheritance diagram for QSFigure:

Inheritance graph
List of all members.

Public Types

enum  Channels {
  VXCoord = 0, VYCoord = 1, VZCoord = 2, VVCoord = 3,
  VTableI = 4

Public Methods

 QSFigure (QSAxes *parent, const char *name=0)
virtual ~QSFigure ()
void setVertexCompareAccuracy (int accuracy)
int vertexCompareAccuracy () const
virtual QString posInfo (QSPt2f &pos)
virtual QSPt2f legendItemSize (QSDrv *drv)
virtual void drawLegendItem (const QSPt2f &pos, QSDrv *drv)
virtual void loadStateFromStream (QDataStream &stream, QSObjectFactory *factory)
virtual void saveStateToStream (QDataStream &stream, QSObjectFactory *factory)
virtual ColumnType columnType (int channel, int column) const
virtual QString channelVariable (int channel) const

Protected Methods

virtual void dataChanged (int channel=-1)
virtual void allocRuntimeData ()
virtual void freeRuntimeData ()
virtual bool getAxisRange (QSAxis *axis, double &min, double &max)
virtual bool start ()
virtual bool step ()
virtual void end ()

Detailed Description

Dataset : 3D figure.

Dataset which draws any set of 3d polygons. Data format is described in QSFigure::Channels . See also : QSAxes::plotAdd()

Member Enumeration Documentation

enum QSFigure::Channels

Descriptive names of data channels. See QSData::setMatrix(). VXCoord, VYCoord, VZCoord, VVCoord ( V is optional ) must be matrices with the same size. VXCoord contains x coordinates, VYCord contains y coordinates, and VZCoord contains z coordinates. The same row in all matrices describes one polygon. The same column in this row descripes a one vertex. So there is rows polygons and all polygons have cols vertices. If VTableI is not empty and VXCoords, VYCoords, VZCoords contain a single column other format is used. VTableI contains indexes to the row in Coords matrices. One index defines a one data point. One row in VTable in describes one polygon. There is rows(VTableI) polygons, which have cols(VTableI) vertices.

Constructor & Destructor Documentation

QSFigure::QSFigure QSAxes   parent,
const char *    name = 0


virtual QSFigure::~QSFigure   [virtual]


Member Function Documentation

virtual void QSFigure::allocRuntimeData   [protected, virtual]

Reimplemented. Inits m_ccolors, m_cnormals, m_corder

Reimplemented from QSPlot3D.

virtual QString QSFigure::channelVariable int    channel const [virtual]

Returns a variable name ( 'x', 'y', 'z', 'v' etc ) for use in formulas.

Reimplemented from QSData.

virtual ColumnType QSFigure::columnType int    channel,
int    column
const [virtual]

Metadata - type of the given column. It should be reimplemented in derived classes. Used to create editors in sheet

Reimplemented from QSData.

virtual void QSFigure::dataChanged int    channel = -1 [protected, virtual]

This function is called after data has changed by 'setMatrix' method. You should also call it by hand, when you have changed the data in any matrix. It informs derived classes to mark old max and min data values as invalid, and informs them that they should repaint themselves. Default implementation calls dataChanging( this, channel ),

Reimplemented from QSData.

virtual void QSFigure::drawLegendItem const QSPt2f   pos,
QSDrv   drv

Draw legend item at position 'pos'

Reimplemented from QSPlot.

virtual void QSFigure::end   [protected, virtual]

This can be called by parent axes to stop drawing. Normally called after 'step()' returned false;

Reimplemented from QSPlot.

virtual void QSFigure::freeRuntimeData   [protected, virtual]

Called from end().Everyting which goes to end() may be put here.

Reimplemented from QSPlot3D.

virtual bool QSFigure::getAxisRange QSAxis   axis,
double &    min,
double &    max
[protected, virtual]

Must be reimplemented and return data range on each axis or false when no data is set. This functions is always called outside 'start()' and 'end()' !

Reimplemented from QSPlot.

virtual QSPt2f QSFigure::legendItemSize QSDrv   drv [virtual]

Returns item size

Reimplemented from QSPlot.

virtual void QSFigure::loadStateFromStream QDataStream &    stream,
QSObjectFactory   factory

Restores all graphics atributes

Reimplemented from QSPlot3D.

virtual QString QSFigure::posInfo QSPt2f   pos [virtual]

Returns info or QString::null

Reimplemented from QSPlot.

virtual void QSFigure::saveStateToStream QDataStream &    stream,
QSObjectFactory   factory

Saves all graphics attributes

Reimplemented from QSPlot3D.

void QSFigure::setVertexCompareAccuracy int    accuracy

Accuracy is used to detect if two vertices are in fact the same vertex, so two polygons are neighbours. Coordinates of vertices are mapped to the range <-1,1> and rounded to 'accuracy' places after the point before comparing. 'accuracy' must be larger than 0. Valid only if the gr. driver uses normals to vertices ( OpenGL ).

virtual bool QSFigure::start   [protected, virtual]

Start drawing. Called by parent axes. Time-expensive operations should be performed in little parts during 'step()' call. If returns false - 'end()' is called immediately, if returns true - 'step()' is called next.

Reimplemented from QSPlot.

virtual bool QSFigure::step   [protected, virtual]

This function will be called to make drawing until it returns false. Notice that drawing should be stopped at any time. Even if this function returns true parent axes object may decide to call end().

Reimplemented from QSPlot.

int QSFigure::vertexCompareAccuracy   const [inline]

Returns the vertex compare accuracy.

The documentation for this class was generated from the following file:
Generated on Mon Mar 18 19:16:45 2002 for KMatplot library by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002