QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 槽 | 信号 | Public 成员函数 | Protected 成员函数 | 所有成员列表
Qwt3D::SurfacePlot类 参考

A class representing surfaces 更多...

#include <qwt3d_surfaceplot.h>

类 Qwt3D::SurfacePlot 继承关系图:
Qwt3D::Plot3D

class  PrivateData
 

Public 槽

void setResolution (int)
 Sets data resolution and updates widget
 
- Public 槽 继承自 Qwt3D::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)
 Sets up orthogonal or perspective mode and updates widget
 
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)
 Saves the framebuffer to an image file
 
virtual bool saveVector (QString const &fileName, QString const &format, VectorWriter::TEXTMODE text, VectorWriter::SORTMODE sortmode)
 Writes vector data supported by gl2ps
 
virtual bool save (QString const &fileName, QString const &format)
 Saves content in one of the registered output formats
 

信号

void resolutionChanged (int)
 Signal emitted when the resolution changes
 
- 信号 继承自 Qwt3D::Plot3D
void rotationChanged (double xAngle, double yAngle, double zAngle)
 Signal emitted when the rotation is changed
 
void shiftChanged (double xShift, double yShift, double zShift)
 Signal emitted when the shift is changed
 
void vieportShiftChanged (double xShift, double yShift)
 Signal emitted when the viewport shift is changed
 
void scaleChanged (double xScale, double yScale, double zScale)
 Signal emitted when the scaling is changed
 
void zoomChanged (double)
 Signal emitted when the zoom is changed
 
void projectionChanged (bool)
 Signal emitted when the projection mode is changed
 

Public 成员函数

 SurfacePlot (QWidget *parent=nullptr)
 Constructs a SurfacePlot widget
 
void updateNormals ()
 
int resolution () const
 
std::pair< int, int > facets () const
 Returns the number of facets in the data
 
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.
 
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.
 
bool loadFromData (Qwt3D::TripleField const &data, Qwt3D::CellField const &poly)
 Convert user (non-rectangular) mesh based data to internal structure.
 
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)
 Shows or hides data normals
 
bool normals () const
 
void setNormalLength (double val)
 Sets the normal vector length
 
double normalLength () const
 
void setNormalQuality (int val)
 Sets the normal vector quality (number of arrow segments)
 
int normalQuality () const
 
- Public 成员函数 继承自 Qwt3D::Plot3D
 Plot3D (QWidget *parent=nullptr)
 Constructs a Plot3D widget
 
QPixmap renderPixmap (int w=0, int h=0, bool useContext=false)
 
void updateData ()
 Updates OpenGL data representation
 
void createCoordinateSystem (Qwt3D::Triple beg, Qwt3D::Triple end)
 Creates a coordinate system with generating corners beg and 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)
 Sets plot style for the standard plotting types
 
Qwt3D::EnrichmentsetPlotStyle (Qwt3D::Enrichment const &val)
 Sets plot style to Qwt3D::USER with an associated enrichment object
 
Qwt3D::PLOTSTYLE plotStyle () const
 
Qwt3D::EnrichmentuserStyle () const
 
void setShading (Qwt3D::SHADINGSTYLE val)
 Sets shading style
 
Qwt3D::SHADINGSTYLE shading () const
 
void setIsolines (int isolines)
 Sets number of isolines
 
int isolines () const
 
void setSmoothMesh (bool val)
 
bool smoothDataMesh () const
 
void setBackgroundColor (Qwt3D::RGBA rgba)
 Sets the background color
 
Qwt3D::RGBA backgroundRGBAColor () const
 
void setMeshColor (Qwt3D::RGBA rgba)
 Sets the mesh color
 
Qwt3D::RGBA meshColor () const
 
void setMeshLineWidth (double lw)
 Sets the mesh line width
 
double meshLineWidth () const
 
void setDataColor (Color *col)
 Assigns a new coloring object for the data
 
const ColordataColor () const
 
virtual Qwt3D::EnrichmentaddEnrichment (Qwt3D::Enrichment const &)
 Adds an enrichment object to the plot
 
virtual bool degrade (Qwt3D::Enrichment *)
 Removes an enrichment object from the plot
 
Qwt3D::ParallelEpiped hull () const
 
void showColorLegend (bool)
 Shows or hides the color legend
 
void setCoordinateStyle (Qwt3D::COORDSTYLE st)
 Sets style of coordinate system
 
void setPolygonOffset (double d)
 Sets polygon offset
 
double polygonOffset () const
 
void setTitlePosition (double rely, double relx=0.5, Qwt3D::ANCHOR=Qwt3D::TopCenter)
 Sets relative caption position
 
void setTitleFont (const QString &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 Sets the caption font
 
void setTitleColor (Qwt3D::RGBA col)
 
void setTitle (const QString &title)
 
void setTheme (const Qwt3DTheme &theme)
 
Qwt3DTheme theme () const
 
void applyTheme (Qwt3DTheme::Preset preset)
 
void applyTheme (const QString &presetName)
 
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 成员函数

void calculateHull () override
 Calculates the smallest x-y-z parallelepiped enclosing the data
 
void createData () override
 
void createEnrichment (Qwt3D::Enrichment &p) override
 
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 成员函数 继承自 Qwt3D::Plot3D
void initializeGL () override
 Sets up the OpenGL rendering state
 
void paintGL () override
 Paints the widget's content
 
void resizeGL (int w, int h) override
 Sets up the OpenGL view port
 
void mousePressEvent (QMouseEvent *e) override
 
void mouseReleaseEvent (QMouseEvent *e) override
 
void mouseMoveEvent (QMouseEvent *e) override
 
void wheelEvent (QWheelEvent *e) override
 
void keyPressEvent (QKeyEvent *e) override
 
std::vector< GLuint > & displayLists ()
 
Qwt3D::DataactualData () const
 
void setActualData (Qwt3D::Data *data)
 
virtual void createEnrichments ()
 
void createCoordinateSystem ()
 Creates a coordinate system from data
 
void setHull (Qwt3D::ParallelEpiped p)
 
bool initializedGL () const
 

额外继承的成员函数

- Protected 类型 继承自 Qwt3D::Plot3D
enum  OBJECTS { DataObject , LegendObject , NormalObject , DisplayListSize }
 
using EnrichmentList = std::list< Qwt3D::Enrichment * >
 
using ELIT = EnrichmentList::iterator
 

详细描述

A class representing surfaces

SurfacePlot provides visualization of surface data in 3D space, supporting both grid-based and cell-based data representations.

构造及析构函数说明

◆ SurfacePlot()

SurfacePlot::SurfacePlot ( QWidget *  parent = nullptr)

Constructs a SurfacePlot widget

参数
[in]parentParent widget

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

Destructor

成员函数说明

◆ calculateHull()

void SurfacePlot::calculateHull ( )
overrideprotectedvirtual

Calculates the smallest x-y-z parallelepiped enclosing the data

It can be accessed by hull();

实现了 Qwt3D::Plot3D.

◆ createData()

void SurfacePlot::createData ( )
overrideprotectedvirtual

实现了 Qwt3D::Plot3D.

◆ createEnrichment()

void SurfacePlot::createEnrichment ( Qwt3D::Enrichment p)
overrideprotectedvirtual

重载 Qwt3D::Plot3D .

◆ facets()

pair< int, int > SurfacePlot::facets ( ) const

Returns the number of facets in the data

返回
(columns,rows) for grid data, (number of cells,1) for polygon data, (0,0) otherwise

The returned value is not affected by resolution().

◆ loadFromData() [1/3]

bool SurfacePlot::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()

◆ loadFromData() [2/3]

bool SurfacePlot::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()

◆ loadFromData() [3/3]

bool SurfacePlot::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

◆ resolutionChanged

void Qwt3D::SurfacePlot::resolutionChanged ( int  )
signal

Signal emitted when the resolution changes

参数
resolutionThe new resolution value

◆ setNormalLength()

void SurfacePlot::setNormalLength ( double  val)

Sets the normal vector length

参数
[in]valNormal length value (0.0 to 1.0). Values < 0 or > 1 are ignored.

◆ setNormalQuality()

void SurfacePlot::setNormalQuality ( int  val)

Sets the normal vector quality (number of arrow segments)

参数
[in]valQuality value. Values < 3 are ignored.

◆ setResolution

void SurfacePlot::setResolution ( int  res)
slot

Sets data resolution and updates widget

参数
[in]resResolution multiplier (res == 1 means original resolution). If res < 1, the function does nothing.

◆ showNormals()

void SurfacePlot::showNormals ( bool  b)

Shows or hides data normals

参数
[in]bTrue to show normals, false to hide

该类的文档由以下文件生成: