📄 oglviewer.h
字号:
#ifndef _OGL_VIEWER_H_#define _OGL_VIEWER_H_#include <qobject.h>#include <qgl.h>#include <qvaluelist.h>#include <qpopupmenu.h>#include "structs.h"class OGLViewer : public QGLWidget { Q_OBJECTpublic: OGLViewer(QWidget *parent=0, const char *name = 0 ); ~OGLViewer(); void updateMaterialColorTable(QValueList<material_t>& mat);protected: void initializeGL (); void resizeGL(int w, int h); void paintGL (); void keyPressEvent(QKeyEvent * e); void wireBox(float Lx, float Ly, float Lz, float R, float G, float B); void wireCube(float length, float R, float G, float B); void WireSphere(float r, int sec, int slice, float R, float G, float B); void drawXMT(int polarization); void drawRCV(int polarization); void mousePressEvent(QMouseEvent *e); void mouseMoveEvent(QMouseEvent *e); void axis(); void draw_scene(); void light_scene(); void draw_geometry();public slots: void takeGeometry(QValueList<object_t>& geom, int Lx, int Ly, int Lz); void takeXMTs(QValueList<xmt_t>& xmts, int polarization); void takeRCVs(QValueList<rcv_t>& rcvs); void refresh(); void setMove(); void setZoom(); void setRotate(); void Reset(); void toggleBoxDraw(bool); void toggleObjectsDraw(bool); void toggleRCVsDraw(bool); void toggleXMTsDraw(bool);private: //QMap<int,QColor> m_colMap; QValueList<QColor> m_colMap; float m_Lx; float m_Ly; float m_Lz; float m_lastx; float m_lasty; float m_transz; float m_transy; float m_transx; float m_rotx; float m_roty; bool m_rotating; bool m_zooming; bool m_moving; bool m_solid; QPopupMenu *m_popup; bool m_drawBox; bool m_drawObjects; bool m_drawRCVs; bool m_drawXMTs;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -