mirror of https://github.com/CGAL/cgal
56 lines
1.1 KiB
C++
56 lines
1.1 KiB
C++
#ifndef VIEWER_H
|
|
#define VIEWER_H
|
|
|
|
#include "Viewer_config.h"
|
|
#include <CGAL_demo/Viewer_interface.h>
|
|
|
|
#include <QGLViewer/qglviewer.h>
|
|
#include <QPoint>
|
|
|
|
// forward declarations
|
|
class QWidget;
|
|
class Scene_draw_interface;
|
|
class QMouseEvent;
|
|
class QKeyEvent;
|
|
|
|
class Viewer_impl;
|
|
|
|
class VIEWER_EXPORT Viewer : public Viewer_interface {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Viewer(QWidget * parent, bool antialiasing = false);
|
|
~Viewer();
|
|
|
|
// overload several QGLViewer virtual functions
|
|
void draw();
|
|
void fastDraw();
|
|
void initializeGL();
|
|
void drawWithNames();
|
|
void postSelection(const QPoint&);
|
|
|
|
void setScene(Scene_draw_interface* scene);
|
|
bool antiAliasing() const;
|
|
|
|
bool inFastDrawing() const;
|
|
public slots:
|
|
void setAntiAliasing(bool b);
|
|
void setTwoSides(bool b);
|
|
|
|
void turnCameraBy180Degres();
|
|
|
|
QString dumpCameraCoordinates();
|
|
bool moveCameraToCoordinates(QString,
|
|
float animation_duration = 0.5f);
|
|
|
|
protected:
|
|
void mousePressEvent(QMouseEvent*);
|
|
void keyPressEvent(QKeyEvent*);
|
|
|
|
protected:
|
|
Viewer_impl* d;
|
|
}; // end class Viewer
|
|
|
|
#endif // VIEWER_H
|