38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h> 40 #include <QOpenGLWidget> 41 #include <QOpenGLFunctions_2_0> 48 class Spectrum3DCanvas;
86 void initializeGL()
override;
88 void resizeGL(
int w,
int h)
override;
90 void paintGL()
override;
94 void mouseMoveEvent(QMouseEvent * e)
override;
95 void mouseReleaseEvent(QMouseEvent * e)
override;
96 void mousePressEvent(QMouseEvent * e)
override;
97 void focusOutEvent(QFocusEvent * e)
override;
105 void updateIntensityScale();
108 GLint project_(GLdouble objx, GLdouble objy, GLdouble objz, GLdouble * winx, GLdouble * winy);
110 void transformPoint_(GLdouble out[4],
const GLdouble m[16],
const GLdouble in[4]);
112 void renderText_(
double x,
double y,
double z,
const QString & text);
114 void qglColor_(QColor color);
116 void qglClearColor_(QColor clearColor);
118 GLuint makeDataAsStick_();
122 GLuint makeAxesTicks_();
124 GLuint makeDataAsTopView_();
126 GLuint makeGround_();
128 GLuint makeGridLines_();
130 void drawAxesLegend_();
133 void computeSelection_();
136 void dataToZoomArray_(
double x_1,
double y_1,
double x_2,
double y_2);
139 double scaledRT_(
double rt);
141 double scaledInversRT_(
double mz);
143 double scaledMZ_(
double mz);
145 double scaledInversMZ_(
double mz);
147 double scaledIntensity_(
float intensity,
Size layer_index);
150 void recalculateDotGradient_(
Size layer);
152 void calculateGridLines_();
155 void normalizeAngle(
int * angle);
157 void resetTranslation();
162 void storeRotationAndZoom();
164 void restoreRotationAndZoom();
192 QPainter* painter_ =
nullptr;
241 void actionModeChange();
OpenGL Canvas for 3D-visualization of map data.
Definition: Spectrum3DOpenGLCanvas.h:58
double near_
member variable for the z- axis of the BB
Definition: Spectrum3DOpenGLCanvas.h:205
void setZLabel(const QString &l)
Definition: Spectrum3DOpenGLCanvas.h:102
double x_1_
x1 coordinate of the zoomselection
Definition: Spectrum3DOpenGLCanvas.h:223
QString y_label_
Definition: Spectrum3DOpenGLCanvas.h:236
std::vector< std::vector< double > > AxisTickVector
Container for axis ticks.
Definition: Spectrum3DOpenGLCanvas.h:69
float width_
the width of the viewport
Definition: Spectrum3DOpenGLCanvas.h:209
double x_2_
x2 coordinate of the zoomselection
Definition: Spectrum3DOpenGLCanvas.h:225
DRange< 1 > int_scale_
object which contains the values of the current min and max intensity
Definition: Spectrum3DOpenGLCanvas.h:215
double trans_y_
y_translation
Definition: Spectrum3DOpenGLCanvas.h:233
int yrot_
member y-variables for the rotation
Definition: Spectrum3DOpenGLCanvas.h:181
double far_
member variable for the z- axis of the BB
Definition: Spectrum3DOpenGLCanvas.h:207
QString x_label_
Definition: Spectrum3DOpenGLCanvas.h:235
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
double y_1_
y1 coordinate of the zoomselection
Definition: Spectrum3DOpenGLCanvas.h:227
AxisTickVector grid_rt_
member gridvectors which contains the data for the rt-axis-ticks
Definition: Spectrum3DOpenGLCanvas.h:219
double zoom_tmp_
member variable that stores original zoom factor during zoom mode
Definition: Spectrum3DOpenGLCanvas.h:202
GLuint axes_
Definition: Spectrum3DOpenGLCanvas.h:169
double zoom_
member variable for the zoom mode
Definition: Spectrum3DOpenGLCanvas.h:200
AxisTickVector grid_mz_
member gridvectors which contains the data for the mz-axis-ticks
Definition: Spectrum3DOpenGLCanvas.h:217
GLuint axes_ticks_
Definition: Spectrum3DOpenGLCanvas.h:170
double corner_
member variable for the x and y axis of the BB
Definition: Spectrum3DOpenGLCanvas.h:198
AxisTickVector grid_intensity_
member gridvectors which contains the data for the intensity-axis-ticks
Definition: Spectrum3DOpenGLCanvas.h:221
int zrot_tmp_
member z-variable that stores the original angle during zoom mode
Definition: Spectrum3DOpenGLCanvas.h:190
double y_2_
y2 coordinate of the zoomselection
Definition: Spectrum3DOpenGLCanvas.h:229
float height_
the height of the viewport
Definition: Spectrum3DOpenGLCanvas.h:211
int yrot_tmp_
member y-variable that stores the original angle during zoom mode
Definition: Spectrum3DOpenGLCanvas.h:188
int xrot_
member x-variables for the rotation
Definition: Spectrum3DOpenGLCanvas.h:179
void setXLabel(const QString &l)
Definition: Spectrum3DOpenGLCanvas.h:100
DRange< 3 > overall_values_
object which contains the min and max values of mz, rt and intensity
Definition: Spectrum3DOpenGLCanvas.h:213
GLuint stickdata_
Definition: Spectrum3DOpenGLCanvas.h:168
QPoint mouse_move_end_
member variables for the zoom-mode
Definition: Spectrum3DOpenGLCanvas.h:195
Canvas for 3D-visualization of peak map data.
Definition: Spectrum3DCanvas.h:66
GLuint ground_
Definition: Spectrum3DOpenGLCanvas.h:172
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
QString z_label_
Definition: Spectrum3DOpenGLCanvas.h:237
Spectrum3DCanvas & canvas_3d_
reference to Spectrum3DCanvas
Definition: Spectrum3DOpenGLCanvas.h:176
double trans_x_
x- translation
Definition: Spectrum3DOpenGLCanvas.h:231
GLuint gridlines_
Definition: Spectrum3DOpenGLCanvas.h:171
void setYLabel(const QString &l)
Definition: Spectrum3DOpenGLCanvas.h:101
int xrot_tmp_
member x-variable that stores the original angle during zoom mode
Definition: Spectrum3DOpenGLCanvas.h:186
int zrot_
member z-variables for the rotation
Definition: Spectrum3DOpenGLCanvas.h:183