Analitza
#include <plotter3d.h>
Public Member Functions | |
Plotter3D (QAbstractItemModel *model=0) | |
virtual | ~Plotter3D () |
virtual int | currentPlot () const =0 |
virtual void | drawPlots () |
void | fixRotation (const QVector3D &direction) |
void | hideAxisHint () |
virtual void | initGL () |
bool | isRotationFixed () const |
bool | isUsingSimpleRotation () const |
QAbstractItemModel * | model () const |
virtual void | modelChanged ()=0 |
PlotStyle | plotStyle () const |
PlottingFocusPolicy | plottingFocusPolicy () const |
virtual void | renderGL ()=0 |
void | resetView () |
void | rotate (int dx, int dy) |
void | scale (GLdouble factor) |
CartesianAxis | selectAxisArrow (int x, int y) |
void | setModel (QAbstractItemModel *f) |
void | setPlotStyle (PlotStyle ps) |
void | setPlottingFocusPolicy (PlottingFocusPolicy fp) |
void | setReferencePlaneColor (const QColor &color) |
void | setUseSimpleRotation (bool simplerot) |
virtual void | setViewport (const QRectF &vp) |
void | showAxisArrowHint (CartesianAxis axis) |
void | updatePlots (const QModelIndex &parent, int start, int end) |
Static Public Attributes | |
static const GLubyte | XAxisArrowColor [] |
static const GLubyte | YAxisArrowColor [] |
static const GLubyte | ZAxisArrowColor [] |
Protected Member Functions | |
void | addPlots (PlotItem *item) |
Detailed Description
This class manage the OpenGL scene where the plots will be rendered.
Plotter3D provides an agnostic way to manage a 3d scene for draw math plots, Contains just OpenGL calls, so is uncoupled with QWidget nor QtQuick. This class needs the PlotsModel (to create the geometry for 3D plots) and also exposes some methods to change the scene (like hide/show the axis or reference planes for example)
Definition at line 61 of file plotter3d.h.
Constructor & Destructor Documentation
Analitza::Plotter3D::Plotter3D | ( | QAbstractItemModel * | model = 0 | ) |
|
virtual |
Member Function Documentation
|
protected |
|
pure virtual |
|
virtual |
void Analitza::Plotter3D::fixRotation | ( | const QVector3D & | direction | ) |
Fix the rotation arround direction
.
void Analitza::Plotter3D::hideAxisHint | ( | ) |
Hide the current indicator of the axis.
|
virtual |
|
inline |
Query if the rotation is fixed by a specific direction.
Definition at line 110 of file plotter3d.h.
|
inline |
Get information about the current rotarion approach: if return true then rotation is simple.
Definition at line 127 of file plotter3d.h.
|
inline |
Definition at line 87 of file plotter3d.h.
|
pure virtual |
|
inline |
Definition at line 89 of file plotter3d.h.
|
inline |
Definition at line 92 of file plotter3d.h.
|
pure virtual |
Force OpenGL to render the scene.
QGLWidget should call updateGL in this method.
void Analitza::Plotter3D::resetView | ( | ) |
sets the view to the initial perspective
void Analitza::Plotter3D::rotate | ( | int | dx, |
int | dy | ||
) |
Rotates by dx
and dy
in screen coordinates.
void Analitza::Plotter3D::scale | ( | GLdouble | factor | ) |
Set the scale of all the scene by factor
.
CartesianAxis Analitza::Plotter3D::selectAxisArrow | ( | int | x, |
int | y | ||
) |
Query if there is a valid axis arrow for x
and y
screen coordinates.
void Analitza::Plotter3D::setModel | ( | QAbstractItemModel * | f | ) |
|
inline |
Definition at line 90 of file plotter3d.h.
void Analitza::Plotter3D::setPlottingFocusPolicy | ( | PlottingFocusPolicy | fp | ) |
void Analitza::Plotter3D::setReferencePlaneColor | ( | const QColor & | color | ) |
Set the color of the grids of the reference plane in the 3D view.
|
inline |
If the flag simplerot
is true the rotation ignores any fixed or free direction.
Definition at line 124 of file plotter3d.h.
|
virtual |
void Analitza::Plotter3D::showAxisArrowHint | ( | CartesianAxis | axis | ) |
Show a little indicator (as a hint) next to the arrow of axis
.
void Analitza::Plotter3D::updatePlots | ( | const QModelIndex & | parent, |
int | start, | ||
int | end | ||
) |
Force the plots from start
to end
to be recalculated.
Member Data Documentation
|
static |
Definition at line 64 of file plotter3d.h.
|
static |
Definition at line 65 of file plotter3d.h.
|
static |
Definition at line 66 of file plotter3d.h.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:37 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.