2013-11-02 01:48:30 +00:00
|
|
|
#ifndef OPENCS_VIEW_SCENEWIDGET_H
|
|
|
|
#define OPENCS_VIEW_SCENEWIDGET_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
2015-03-19 22:27:14 +00:00
|
|
|
#include <QTimer>
|
2014-03-23 14:14:26 +00:00
|
|
|
|
2014-03-26 16:47:56 +00:00
|
|
|
#include "lightingday.hpp"
|
2014-03-26 16:59:42 +00:00
|
|
|
#include "lightingnight.hpp"
|
2014-03-26 17:29:15 +00:00
|
|
|
#include "lightingbright.hpp"
|
2014-03-26 16:47:56 +00:00
|
|
|
|
2015-03-23 14:55:57 +00:00
|
|
|
#include <osgViewer/View>
|
|
|
|
#include <osgViewer/CompositeViewer>
|
2014-03-23 14:14:26 +00:00
|
|
|
|
2015-03-19 23:39:24 +00:00
|
|
|
namespace osg
|
|
|
|
{
|
|
|
|
class Group;
|
|
|
|
}
|
|
|
|
|
2014-07-08 10:39:12 +00:00
|
|
|
namespace CSVWidget
|
2014-03-23 14:14:26 +00:00
|
|
|
{
|
|
|
|
class SceneToolMode;
|
|
|
|
class SceneToolbar;
|
2013-11-02 01:48:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSVRender
|
|
|
|
{
|
2014-02-27 14:23:14 +00:00
|
|
|
class Navigation;
|
2014-03-23 14:14:26 +00:00
|
|
|
class Lighting;
|
2014-02-27 14:23:14 +00:00
|
|
|
|
2015-03-23 14:55:57 +00:00
|
|
|
class SceneWidget : public QWidget
|
2013-11-02 01:48:30 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2015-03-19 22:27:14 +00:00
|
|
|
public:
|
|
|
|
SceneWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
2015-03-23 14:55:57 +00:00
|
|
|
~SceneWidget();
|
2014-10-05 21:20:09 +00:00
|
|
|
|
2015-03-19 22:27:14 +00:00
|
|
|
void flagAsModified();
|
2014-10-05 08:25:37 +00:00
|
|
|
|
2015-03-19 22:27:14 +00:00
|
|
|
protected:
|
2014-10-27 19:01:19 +00:00
|
|
|
|
2015-03-23 14:55:57 +00:00
|
|
|
osg::ref_ptr<osgViewer::View> mView;
|
|
|
|
|
2015-03-19 23:39:24 +00:00
|
|
|
osg::Group* mRootNode;
|
|
|
|
|
2015-03-19 22:27:14 +00:00
|
|
|
QTimer mTimer;
|
2014-02-25 11:30:45 +00:00
|
|
|
};
|
2015-03-19 22:27:14 +00:00
|
|
|
|
2015-03-23 14:55:57 +00: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 01:48:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|