QwtPlot3D API  0.2.7
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SurfacePlot Class Reference

#include <qwt3d_surfaceplot.h>

Inheritance diagram for SurfacePlot:
Plot3D

Public Slots

void setResolution (int)
- Public Slots inherited from Plot3D
void setRotation (double xVal, double yVal, double zVal)
void setShift (double xVal, double yVal, double zVal)
void setViewportShift (double xVal, double yVal)
void setScale (double xVal, double yVal, double zVal)
void setZoom (double)
void setOrtho (bool)
void enableMouse (bool val=true)
void disableMouse (bool val=true)
void enableKeyboard (bool val=true)
void disableKeyboard (bool val=true)
void enableLighting (bool val=true)
void disableLighting (bool val=true)
void setLightRotation (double xVal, double yVal, double zVal, unsigned int idx=0)
void setLightShift (double xVal, double yVal, double zVal, unsigned int idx=0)
virtual bool savePixmap (QString const &fileName, QString const &format)
virtual bool saveVector (QString const &fileName, QString const &format, VectorWriter::TEXTMODE text, VectorWriter::SORTMODE sortmode)
virtual bool save (QString const &fileName, QString const &format)

Signals

void resolutionChanged (int)
- Signals inherited from Plot3D
void rotationChanged (double xAngle, double yAngle, double zAngle)
void shiftChanged (double xShift, double yShift, double zShift)
void vieportShiftChanged (double xShift, double yShift)
void scaleChanged (double xScale, double yScale, double zScale)
void zoomChanged (double)
void projectionChanged (bool)

Public Member Functions

 SurfacePlot (QWidget *parent=0, const QGLWidget *shareWidget=0)
void updateNormals ()
int resolution () const
std::pair< int, int > facets () const
bool loadFromData (Qwt3D::Triple **data, unsigned int columns, unsigned int rows, bool uperiodic=false, bool vperiodic=false)
bool loadFromData (double **data, unsigned int columns, unsigned int rows, double minx, double maxx, double miny, double maxy)
bool loadFromData (Qwt3D::TripleField const &data, Qwt3D::CellField const &poly)
bool createDataRepresentation (Qwt3D::Triple **data, unsigned int columns, unsigned int rows, bool uperiodic=false, bool vperiodic=false)
bool createDataRepresentation (double **data, unsigned int columns, unsigned int rows, double minx, double maxx, double miny, double maxy)
bool createDataRepresentation (Qwt3D::TripleField const &data, Qwt3D::CellField const &poly)
Qwt3D::FLOORSTYLE floorStyle () const
void setFloorStyle (Qwt3D::FLOORSTYLE val)
void showNormals (bool)
bool normals () const
void setNormalLength (double val)
double normalLength () const
void setNormalQuality (int val)
int normalQuality () const
- Public Member Functions inherited from Plot3D
 Plot3D (QWidget *parent=0, const QGLWidget *shareWidget=0)
virtual ~Plot3D ()
QPixmap renderPixmap (int w=0, int h=0, bool useContext=false)
void updateData ()
void createCoordinateSystem (Qwt3D::Triple beg, Qwt3D::Triple end)
Qwt3D::CoordinateSystemcoordinates ()
Qwt3D::ColorLegendlegend ()
double xRotation () const
double yRotation () const
double zRotation () const
double xShift () const
double yShift () const
double zShift () const
double xViewportShift () const
double yViewportShift () const
double xScale () const
double yScale () const
double zScale () const
double zoom () const
bool ortho () const
void setPlotStyle (Qwt3D::PLOTSTYLE val)
Qwt3D::EnrichmentsetPlotStyle (Qwt3D::Enrichment const &val)
Qwt3D::PLOTSTYLE plotStyle () const
Qwt3D::EnrichmentuserStyle () const
void setShading (Qwt3D::SHADINGSTYLE val)
Qwt3D::SHADINGSTYLE shading () const
void setIsolines (int isolines)
int isolines () const
void setSmoothMesh (bool val)
bool smoothDataMesh () const
void setBackgroundColor (Qwt3D::RGBA rgba)
Qwt3D::RGBA backgroundRGBAColor () const
void setMeshColor (Qwt3D::RGBA rgba)
Qwt3D::RGBA meshColor () const
void setMeshLineWidth (double lw)
double meshLineWidth () const
void setDataColor (Color *col)
const ColordataColor () const
virtual Qwt3D::EnrichmentaddEnrichment (Qwt3D::Enrichment const &)
virtual bool degrade (Qwt3D::Enrichment *)
Qwt3D::ParallelEpiped hull () const
void showColorLegend (bool)
void setCoordinateStyle (Qwt3D::COORDSTYLE st)
void setPolygonOffset (double d)
double polygonOffset () const
void setTitlePosition (double rely, double relx=0.5, Qwt3D::ANCHOR=Qwt3D::TopCenter)
void setTitleFont (const QString &family, int pointSize, int weight=QFont::Normal, bool italic=false)
void setTitleColor (Qwt3D::RGBA col)
void setTitle (const QString &title)
void assignMouse (MouseState xrot, MouseState yrot, MouseState zrot, MouseState xscale, MouseState yscale, MouseState zscale, MouseState zoom, MouseState xshift, MouseState yshift)
bool mouseEnabled () const
void assignKeyboard (KeyboardState xrot_n, KeyboardState xrot_p, KeyboardState yrot_n, KeyboardState yrot_p, KeyboardState zrot_n, KeyboardState zrot_p, KeyboardState xscale_n, KeyboardState xscale_p, KeyboardState yscale_n, KeyboardState yscale_p, KeyboardState zscale_n, KeyboardState zscale_p, KeyboardState zoom_n, KeyboardState zoom_p, KeyboardState xshift_n, KeyboardState xshift_p, KeyboardState yshift_n, KeyboardState yshift_p)
bool keyboardEnabled () const
void setKeySpeed (double rot, double scale, double shift)
void keySpeed (double &rot, double &scale, double &shift) const
bool lightingEnabled () const
void illuminate (unsigned light=0)
void blowout (unsigned light=0)
void setMaterialComponent (GLenum property, double r, double g, double b, double a=1.0)
void setMaterialComponent (GLenum property, double intensity)
void setShininess (double exponent)
void setLightComponent (GLenum property, double r, double g, double b, double a=1.0, unsigned light=0)
void setLightComponent (GLenum property, double intensity, unsigned light=0)
double xLightRotation (unsigned idx=0) const
double yLightRotation (unsigned idx=0) const
double zLightRotation (unsigned idx=0) const
double xLightShift (unsigned idx=0) const
double yLightShift (unsigned idx=0) const
double zLightShift (unsigned idx=0) const
bool hasData () const

Protected Member Functions

virtual void calculateHull ()
virtual void createData ()
virtual void createEnrichment (Qwt3D::Enrichment &p)
virtual void createFloorData ()
void createNormals ()
void createPoints ()
void readIn (Qwt3D::GridData &gdata, Triple **data, unsigned int columns, unsigned int rows)
void readIn (Qwt3D::GridData &gdata, double **data, unsigned int columns, unsigned int rows, double minx, double maxx, double miny, double maxy)
void calcNormals (GridData &gdata)
void sewPeriodic (GridData &gdata)
- Protected Member Functions inherited from Plot3D
void initializeGL ()
void paintGL ()
void resizeGL (int w, int h)
void mousePressEvent (QMouseEvent *e)
void mouseReleaseEvent (QMouseEvent *e)
void mouseMoveEvent (QMouseEvent *e)
void wheelEvent (QWheelEvent *e)
void keyPressEvent (QKeyEvent *e)
virtual void createEnrichments ()
void createCoordinateSystem ()
void setHull (Qwt3D::ParallelEpiped p)
bool initializedGL () const

Protected Attributes

bool datanormals_p
double normalLength_p
int normalQuality_p
int resolution_p
- Protected Attributes inherited from Plot3D
Qwt3D::CoordinateSystem coordinates_p
Qwt3D::Colordatacolor_p
Qwt3D::Enrichmentuserplotstyle_p
EnrichmentList elist_p
std::vector< GLuint > displaylists_p
Qwt3D::Data * actualData_p

Additional Inherited Members

- Protected Types inherited from Plot3D
enum  OBJECTS { DataObject, LegendObject, NormalObject, DisplayListSize }
typedef std::list
< Qwt3D::Enrichment * > 
EnrichmentList
typedef EnrichmentList::iterator ELIT

Detailed Description

A SurfacePlot ...

Constructor & Destructor Documentation

SurfacePlot ( QWidget *  parent = 0,
const QGLWidget *  shareWidget = 0 
)

Initializes with dataNormals()==false, NOFLOOR, resolution() == 1

Member Function Documentation

pair< int, int > facets ( ) const

Returns the number of mesh cells for the ORIGINAL data.

The returned value is not affected by resolution(). The pair gives (columns,rows) for grid data , (number of cells,1) for free formed data (datatype() == POLYGON) and (0,0) else

bool loadFromData ( Qwt3D::Triple **  data,
unsigned int  columns,
unsigned int  rows,
bool  uperiodic = false,
bool  vperiodic = false 
)

Convert user grid data to internal vertex structure. See also NativeReader::read() and Function::create()

bool loadFromData ( double **  data,
unsigned int  columns,
unsigned int  rows,
double  minx,
double  maxx,
double  miny,
double  maxy 
)

Convert user grid data to internal vertex structure. See also NativeReader::read() and Function::create()

bool loadFromData ( Qwt3D::TripleField const &  data,
Qwt3D::CellField const &  poly 
)

Convert user (non-rectangular) mesh based data to internal structure. See also Qwt3D::TripleField and Qwt3D::CellField

bool createDataRepresentation ( Qwt3D::Triple **  data,
unsigned int  columns,
unsigned int  rows,
bool  uperiodic = false,
bool  vperiodic = false 
)
inline

Equivalent to loadFromData();.

Deprecated:
Use loadFromData instead
bool createDataRepresentation ( double **  data,
unsigned int  columns,
unsigned int  rows,
double  minx,
double  maxx,
double  miny,
double  maxy 
)
inline

Equivalent to loadFromData();.

Deprecated:
Use loadFromData instead
bool createDataRepresentation ( Qwt3D::TripleField const &  data,
Qwt3D::CellField const &  poly 
)
inline

Equivalent to loadFromData();.

Deprecated:
Use loadFromData instead
void setNormalLength ( double  val)

Sets length of normals in percent per hull diagonale.

Values < 0 or > 1 are ignored

void setNormalQuality ( int  val)

Increases plotting quality of normal arrows.

Values < 3 are ignored

void setResolution ( int  res)
slot

Sets data resolution (res == 1 original resolution) and updates widget If res < 1, the function does nothing

void calculateHull ( )
protectedvirtual

Calculates the smallest x-y-z parallelepiped enclosing the data. It can be accessed by hull();

Implements Plot3D.


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