2013-11-02 02:48:30 +01:00
|
|
|
#ifndef OPENCS_VIEW_SCENEWIDGET_H
|
|
|
|
#define OPENCS_VIEW_SCENEWIDGET_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
2015-03-19 23:27:14 +01:00
|
|
|
#include <QTimer>
|
2014-03-23 15:14:26 +01:00
|
|
|
|
2014-03-26 17:47:56 +01:00
|
|
|
#include "lightingday.hpp"
|
2014-03-26 17:59:42 +01:00
|
|
|
#include "lightingnight.hpp"
|
2014-03-26 18:29:15 +01:00
|
|
|
#include "lightingbright.hpp"
|
2014-03-26 17:47:56 +01:00
|
|
|
|
2015-03-23 15:55:57 +01:00
|
|
|
#include <osgViewer/View>
|
|
|
|
#include <osgViewer/CompositeViewer>
|
2014-03-23 15:14:26 +01:00
|
|
|
|
2015-03-20 00:39:24 +01:00
|
|
|
namespace osg
|
|
|
|
{
|
|
|
|
class Group;
|
|
|
|
}
|
|
|
|
|
2014-07-08 12:39:12 +02:00
|
|
|
namespace CSVWidget
|
2014-03-23 15:14:26 +01:00
|
|
|
{
|
|
|
|
class SceneToolMode;
|
|
|
|
class SceneToolbar;
|
2013-11-02 02:48:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSVRender
|
|
|
|
{
|
2014-02-27 15:23:14 +01:00
|
|
|
class Navigation;
|
2014-03-23 15:14:26 +01:00
|
|
|
class Lighting;
|
2014-02-27 15:23:14 +01:00
|
|
|
|
2015-03-23 15:55:57 +01:00
|
|
|
class SceneWidget : public QWidget
|
2013-11-02 02:48:30 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2015-03-19 23:27:14 +01:00
|
|
|
public:
|
|
|
|
SceneWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
2015-03-23 15:55:57 +01:00
|
|
|
~SceneWidget();
|
2014-10-06 08:20:09 +11:00
|
|
|
|
2015-03-19 23:27:14 +01:00
|
|
|
void flagAsModified();
|
2014-10-05 19:25:37 +11:00
|
|
|
|
2015-03-26 00:27:39 +01:00
|
|
|
void setVisibilityMask(int mask);
|
|
|
|
|
2015-03-19 23:27:14 +01:00
|
|
|
protected:
|
2014-10-28 06:01:19 +11:00
|
|
|
|
2015-03-23 15:55:57 +01:00
|
|
|
osg::ref_ptr<osgViewer::View> mView;
|
|
|
|
|
2015-03-20 00:39:24 +01:00
|
|
|
osg::Group* mRootNode;
|
|
|
|
|
2015-03-19 23:27:14 +01:00
|
|
|
QTimer mTimer;
|
2014-02-25 12:30:45 +01:00
|
|
|
};
|
2015-03-19 23:27:14 +01:00
|
|
|
|
2015-03-23 15:55:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
// There are rendering glitches when using multiple Viewer instances, work around using CompositeViewer with multiple views
|
|
|
|
class CompositeViewer : public QObject, public osgViewer::CompositeViewer
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
CompositeViewer();
|
|
|
|
|
|
|
|
static CompositeViewer& get();
|
|
|
|
|
|
|
|
QTimer mTimer;
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void update();
|
|
|
|
};
|
|
|
|
|
2013-11-02 02:48:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|