Logo Search packages:      
Sourcecode: labplot version File versions

Qwt3D::Plot3D Class Reference

#include <qwt3d_plot.h>

Inheritance diagram for Qwt3D::Plot3D:

Qwt3D::GraphPlot Qwt3D::MultiPlot Qwt3D::SurfacePlot Qwt3D::VolumePlot

List of all members.


Detailed Description

Base class for all plotting widgets.

Plot3D handles all the common features for plotting widgets - coordinate system, transformations, mouse/keyboard handling, labeling etc.. It contains some pure virtual functions and is, in so far, an abstract base class. The class provides interfaces for data handling and implements basic data controlled color allocation.

Definition at line 16 of file qwt3d_plot.h.


Public Slots

void disableKeyboard (bool val=true)
 Disable keyboard input.
void disableLighting (bool val=true)
 Turn Lighting on or off.
void disableMouse (bool val=true)
 Disable mouse input.
void enableKeyboard (bool val=true)
 Enable keyboard input.
void enableLighting (bool val=true)
 Turn Lighting on or off.
void enableMouse (bool val=true)
 Enable mouse input.
virtual bool save (QString const &fileName, QString const &format)
 Saves content.
virtual bool savePixmap (QString const &fileName, QString const &format)
virtual bool saveVector (QString const &fileName, QString const &format, VectorWriter::TEXTMODE text, VectorWriter::SORTMODE sortmode)
 Saves content to vector format.
void setLightRotation (double xVal, double yVal, double zVal, unsigned idx=0)
void setLightShift (double xVal, double yVal, double zVal, unsigned idx=0)
void setOrtho (bool)
void setRotation (double xVal, double yVal, double zVal)
void setScale (double xVal, double yVal, double zVal)
void setShift (double xVal, double yVal, double zVal)
void setViewportShift (double xVal, double yVal)
void setZoom (double)

Signals

void projectionChanged (bool)
 Emitted, if the projection mode is changed.
void rotationChanged (double xAngle, double yAngle, double zAngle)
 Emitted, if the rotation is changed.
void scaleChanged (double xScale, double yScale, double zScale)
 Emitted, if the scaling is changed.
void shiftChanged (double xShift, double yShift, double zShift)
 Emitted, if the shift is changed.
void vieportShiftChanged (double xShift, double yShift)
 Emitted, if the viewport shift is changed.
void zoomChanged (double)
 Emitted, if the zoom is changed.

Public Member Functions

virtual Qwt3D::EnrichmentaddEnrichment (Qwt3D::Enrichment const &)
 Add an Enrichment.
void assignKeyboard (int xrot_n, int xrot_p, int yrot_n, int yrot_p, int zrot_n, int zrot_p, int xscale_n, int xscale_p, int yscale_n, int yscale_p, int zscale_n, int zscale_p, int zoom_n, int zoom_p, int xshift_n, int xshift_p, int yshift_n, int yshift_p)
void assignMouse (int xrot, int yrot, int zrot, int xscale, int yscale, int zscale, int zoom, int xshift, int yshift)
Qwt3D::RGBA backgroundRGBAColor () const
 Returns the widgets background color.
void blowout (unsigned light=0)
 Turn light off.
Qwt3D::CoordinateSystemcoordinates ()
 Returns pointer to CoordinateSystem object.
void createCoordinateSystem (Qwt3D::Triple beg, Qwt3D::Triple end)
const ColordataColor () const
 Returns data color object.
virtual bool degrade (Qwt3D::Enrichment *)
 Remove an Enrichment.
bool hasData () const
 Returns true if valid data available, false else.
Qwt3D::ParallelEpiped hull () const
 Returns rectangular hull.
void illuminate (unsigned light=0)
 Turn light on.
int isolines () const
 Returns number of isolines.
bool keyboardEnabled () const
void keySpeed (double &rot, double &scale, double &shift) const
 Gets speed for keyboard driven transformations.
Qwt3D::ColorLegendlegend ()
 Returns pointer to ColorLegend object.
bool lightingEnabled () const
Qwt3D::RGBA meshColor () const
 Returns color for data mesh.
double meshLineWidth () const
 Returns line width for data mesh.
bool mouseEnabled () const
 Returns true, if the widget accept mouse input from the user.
bool ortho () const
 Returns orthogonal (true) or perspective (false) projection.
 Plot3D (QWidget *parent=0, const char *name=0)
Qwt3D::PLOTSTYLE plotStyle () const
double polygonOffset () const
 Returns relative value for polygon offset [0..1].
void setBackgroundColor (Qwt3D::RGBA rgba)
 Sets widgets background color.
void setCoordinateStyle (Qwt3D::COORDSTYLE st)
 Sets style of coordinate system.
void setDataColor (Color *col)
 Sets new data color object.
void setIsolines (int isolines)
void setKeySpeed (double rot, double scale, double shift)
 Sets speed for keyboard driven transformations.
void setLightComponent (GLenum property, double intensity, unsigned light=0)
void setLightComponent (GLenum property, double r, double g, double b, double a=1.0, unsigned light=0)
void setMaterialComponent (GLenum property, double intensity)
void setMaterialComponent (GLenum property, double r, double g, double b, double a=1.0)
void setMeshColor (Qwt3D::RGBA rgba)
 Sets color for data mesh.
void setMeshLineWidth (double lw)
 Sets line width for data mesh.
Qwt3D::EnrichmentsetPlotStyle (Qwt3D::Enrichment const &val)
void setPlotStyle (Qwt3D::PLOTSTYLE val)
void setPolygonOffset (double d)
void setShading (Qwt3D::SHADINGSTYLE val)
void setShininess (double exponent)
void setSmoothMesh (bool val)
 Enables/disables smooth data mesh lines. Default is false.
void setTitle (const QString &title)
 Set caption text (one row only).
void setTitleColor (Qwt3D::RGBA col)
 Set caption color.
void setTitleFont (const QString &family, int pointSize, int weight=QFont::Normal, bool italic=false)
void setTitlePosition (double rely, double relx=0.5, Qwt3D::ANCHOR=Qwt3D::TopCenter)
Qwt3D::SHADINGSTYLE shading () const
 Returns shading style.
void showColorLegend (bool)
bool smoothDataMesh () const
 True if mesh antialiasing is on.
void updateData ()
 Recalculate data.
Qwt3D::EnrichmentuserStyle () const
 Returns current Enrichment object used for plotting styles (if set, zero else).
double xLightRotation (unsigned idx=0) const
 Returns Light 'idx' rotation around X axis [-360..360] (some angles are equivalent).
double xLightShift (unsigned idx=0) const
 Returns shift of Light 'idx 'along X axis (object coordinates).
double xRotation () const
 Returns rotation around X axis [-360..360] (some angles are equivalent).
double xScale () const
 Returns scaling for X values [0..inf].
double xShift () const
 Returns shift along X axis (object coordinates).
double xViewportShift () const
 Returns relative shift [-1..1] along X axis (view coordinates).
double yLightRotation (unsigned idx=0) const
 Returns Light 'idx' rotation around Y axis [-360..360] (some angles are equivalent).
double yLightShift (unsigned idx=0) const
 Returns shift of Light 'idx 'along Y axis (object coordinates).
double yRotation () const
 Returns rotation around Y axis [-360..360] (some angles are equivalent).
double yScale () const
 Returns scaling for Y values [0..inf].
double yShift () const
 Returns shift along Y axis (object coordinates).
double yViewportShift () const
 Returns relative shift [-1..1] along Y axis (view coordinates).
double zLightRotation (unsigned idx=0) const
 Returns Light 'idx' rotation around Z axis [-360..360] (some angles are equivalent).
double zLightShift (unsigned idx=0) const
 Returns shift of Light 'idx 'along Z axis (object coordinates).
double zoom () const
 Returns zoom (0..inf).
double zRotation () const
 Returns rotation around Z axis [-360..360] (some angles are equivalent).
double zScale () const
 Returns scaling for Z values [0..inf].
double zShift () const
 Returns shift along Z axis (object coordinates).
virtual ~Plot3D ()

Protected Types

typedef EnrichmentList::iterator ELIT
typedef std::list
< Qwt3D::Enrichment * > 
EnrichmentList
enum  OBJECTS { DataObject, LegendObject, NormalObject, DisplayListSize }

Protected Member Functions

virtual void calculateHull ()=0
void createCoordinateSystem ()
virtual void createData ()=0
virtual void createEnrichment (Qwt3D::Enrichment &e)
virtual void createEnrichments ()
bool initializedGL () const
void initializeGL ()
void keyPressEvent (QKeyEvent *e)
void mouseMoveEvent (QMouseEvent *e)
void mousePressEvent (QMouseEvent *e)
void mouseReleaseEvent (QMouseEvent *e)
void paintGL ()
void resizeGL (int w, int h)
void setHull (Qwt3D::ParallelEpiped p)
void wheelEvent (QWheelEvent *e)

Protected Attributes

Qwt3D::Data * actualData_p
Qwt3D::CoordinateSystem coordinates_p
Qwt3D::Colordatacolor_p
std::vector< GLuint > displaylists_p
EnrichmentList elist_p
Qwt3D::Enrichmentuserplotstyle_p

Private Member Functions

void applyLight (unsigned idx)
void applyLights ()
void setRotationKeyboard (int kseq, double speed)
void setRotationMouse (ButtonState bstate, double accel, QPoint diff)
void setScaleKeyboard (int kseq, double speed)
void setScaleMouse (ButtonState bstate, double accel, QPoint diff)
void setShiftKeyboard (int kseq, double speed)
void setShiftMouse (ButtonState bstate, double accel, QPoint diff)

Private Attributes

Qwt3D::RGBA bgcolor_
bool displaylegend_
Qwt3D::FLOORSTYLE floorstyle_
Qwt3D::ParallelEpiped hull_
bool initializedGL_
int isolines_
bool kbd_input_enabled_
double kbd_rot_speed_
double kbd_scale_speed_
double kbd_shift_speed_
bool kpressed_
QPoint lastMouseMovePosition_
Qwt3D::ColorLegend legend_
bool lighting_enabled_
std::vector< Light > lights_
Qwt3D::RGBA meshcolor_
double meshLineWidth_
bool mouse_input_enabled_
bool mpressed_
bool ortho_
Qwt3D::PLOTSTYLE plotstyle_
double polygonOffset_
Qwt3D::SHADINGSTYLE shading_
bool smoothdatamesh_p
Label title_
Qwt3D::ANCHOR titleanchor_
Qwt3D::Tuple titlerel_
GLdouble xRot_
int xrot_kstate_ [2]
int xrot_mstate_
GLdouble xScale_
int xscale_kstate_ [2]
int xscale_mstate_
GLdouble xShift_
int xshift_kstate_ [2]
int xshift_mstate_
GLdouble xVPShift_
GLdouble yRot_
int yrot_kstate_ [2]
int yrot_mstate_
GLdouble yScale_
int yscale_kstate_ [2]
int yscale_mstate_
GLdouble yShift_
int yshift_kstate_ [2]
int yshift_mstate_
GLdouble yVPShift_
GLdouble zoom_
int zoom_kstate_ [2]
int zoom_mstate_
GLdouble zRot_
int zrot_kstate_ [2]
int zrot_mstate_
GLdouble zScale_
int zscale_kstate_ [2]
int zscale_mstate_
GLdouble zShift_

Classes

struct  Light

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index