4#include <QOpenGLWidget>
6#include <QOpenGLShaderProgram>
8#include "qwt3d_coordsys.h"
9#include "qwt3d_theme.h"
10#include "qwt3d_io_gl2ps.h"
46 QPixmap renderPixmap(
int w = 0,
int h = 0,
bool useContext =
false);
55 double xRotation()
const;
57 double yRotation()
const;
59 double zRotation()
const;
62 double xShift()
const;
64 double yShift()
const;
66 double zShift()
const;
69 double xViewportShift()
const;
71 double yViewportShift()
const;
74 double xScale()
const;
76 double yScale()
const;
78 double zScale()
const;
87 ASPECTRATIOMODE aspectRatioMode()
const;
90 void setBackgroundColor(
RGBA rgba);
92 RGBA backgroundRGBAColor()
const;
98 void showColorLegend(
bool);
100 bool isColorLegendShown()
const;
102 void setLegendPosition(Qwt3DColorLegend::Position pos);
104 void setLegendAbsolutePosition(
const QRectF& pixelRect);
107 void setTitlePosition(
double rely,
double relx = 0.5, ANCHOR = TopCenter);
109 void setTitleFont(
const QString& family,
int pointSize,
int weight = QFont::Normal,
bool italic =
false);
111 void setTitleColor(
RGBA col);
113 void setTitle(
const QString& title);
115 QString title()
const;
123 void applyTheme(Qwt3DTheme::Preset preset);
125 void applyTheme(
const QString& presetName);
139 bool mouseEnabled()
const;
161 bool keyboardEnabled()
const;
163 void setKeySpeed(
double rot,
double scale,
double shift);
165 void keySpeed(
double& rot,
double& scale,
double& shift)
const;
168 bool lightingEnabled()
const;
170 void illuminate(
unsigned light = 0);
172 void blowout(
unsigned light = 0);
175 void setMaterialComponent(
unsigned int property,
double r,
double g,
double b,
double a = 1.0);
177 void setMaterialComponent(
unsigned int property,
double intensity);
179 void setShininess(
double exponent);
181 void setLightComponent(
unsigned int property,
double r,
double g,
double b,
double a = 1.0,
unsigned light = 0);
183 void setLightComponent(
unsigned int property,
double intensity,
unsigned light = 0);
186 double xLightRotation(
unsigned idx = 0)
const;
188 double yLightRotation(
unsigned idx = 0)
const;
190 double zLightRotation(
unsigned idx = 0)
const;
193 double xLightShift(
unsigned idx = 0)
const;
195 double yLightShift(
unsigned idx = 0)
const;
197 double zLightShift(
unsigned idx = 0)
const;
200 bool hasItems()
const;
211 bool initializedGL()
const;
214 QMatrix4x4 modelViewMatrix()
const;
216 QMatrix4x4 projectionMatrix()
const;
219 QPointF worldToScreen(
const Triple& world)
const;
221 Triple screenToWorld(
const QPointF& screen)
const;
224 QSize viewportSize()
const;
227 QOpenGLShaderProgram* lineShader()
const;
228 QOpenGLShaderProgram* pointShader()
const;
229 QOpenGLShaderProgram* polygonShader()
const;
230 QOpenGLShaderProgram* textShader()
const;
286 void setRotation(
double xVal,
double yVal,
double zVal);
288 void setShift(
double xVal,
double yVal,
double zVal);
290 void setViewportShift(
double xVal,
double yVal);
292 void setScale(
double xVal,
double yVal,
double zVal);
294 void setZoom(
double);
300 void setAspectRatioMode(ASPECTRATIOMODE mode);
303 void enableMouse(
bool val =
true);
305 void disableMouse(
bool val =
true);
307 void enableKeyboard(
bool val =
true);
309 void disableKeyboard(
bool val =
true);
312 void enableLighting(
bool val =
true);
314 void disableLighting(
bool val =
true);
317 void setLightRotation(
double xVal,
double yVal,
double zVal,
unsigned int idx = 0);
319 void setLightShift(
double xVal,
double yVal,
double zVal,
unsigned int idx = 0);
322 virtual bool savePixmap(QString
const& fileName, QString
const& format);
324 virtual bool saveVector(QString
const& fileName,
325 QString
const& format,
326 Qwt3DVectorWriter::TEXTMODE text,
327 Qwt3DVectorWriter::SORTMODE sortmode);
329 virtual bool save(QString
const& fileName, QString
const& format);
334 void initializeGL()
override;
335 void paintGL()
override;
336 void resizeGL(
int w,
int h)
override;
338 void mousePressEvent(QMouseEvent* e)
override;
339 void mouseReleaseEvent(QMouseEvent* e)
override;
340 void mouseMoveEvent(QMouseEvent* e)
override;
341 void wheelEvent(QWheelEvent* e)
override;
343 void keyPressEvent(QKeyEvent* e)
override;
346 void setRotationMouse(
Qwt3DMouseState bstate,
double accel, QPoint diff);
354 void applyLight(
unsigned idx);
Definition qwt_raster_data.h:38
A flat color legend.
Definition qwt3d_colorlegend.h:19
A coordinate system with different styles (BOX, FRAME)
Definition qwt3d_coordsys.h:13
Creates a (key-button, modifier) pair.
Definition qwt3d_portability.h:52
Creates a (mouse-button, modifier) pair.
Definition qwt3d_portability.h:21
Base class for all 3D plot items.
Definition qwt3d_plotitem.h:55
Pure rendering window for 3D plots.
Definition qwt3d_plot.h:36
void projectionChanged(bool)
Signal emitted when the projection mode 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 zoomChanged(double)
Signal emitted when the zoom is changed.
void rotationChanged(double xAngle, double yAngle, double zAngle)
Signal emitted when the rotation is changed.
void aspectRatioModeChanged(ASPECTRATIOMODE mode)
Signal emitted when the aspect ratio mode is changed.
void scaleChanged(double xScale, double yScale, double zScale)
Signal emitted when the scaling is changed.
Complete visual theme descriptor for Qwt3DPlot widgets.
Definition qwt3d_theme.h:34
Parallelepiped spanned by 2 Triples.
Definition qwt3d_types.h:334
Red-Green-Blue-Alpha value.
Definition qwt3d_types.h:395
Triple [x,y,z].
Definition qwt3d_types.h:201