36 lines
828 B
C++
36 lines
828 B
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
#include <osgViewer/View>
|
|
#include <QWidget>
|
|
|
|
class OsgCameraManipulator;
|
|
class OsgViewUI;
|
|
|
|
class OsgView : public QObject {
|
|
public:
|
|
OsgView(QObject* parent = nullptr) noexcept;
|
|
~OsgView();
|
|
|
|
void InitView(osgViewer::View* pView);
|
|
osgViewer::View* GetView(void) const;
|
|
|
|
void Initialize(OsgCameraManipulator* cameraManipulator);
|
|
void Uninitialize(void);
|
|
|
|
OsgViewUI* GetViewUI(void) const { return viewUI_; }
|
|
|
|
bool SetCameraManipulator(OsgCameraManipulator* cameraManipulator);
|
|
OsgCameraManipulator* GetCameraManipulator(void) const {
|
|
return cameraManipulator_;
|
|
}
|
|
|
|
|
|
private:
|
|
osg::ref_ptr<osgViewer::View> view_;
|
|
osg::ref_ptr<OsgViewUI> viewUI_;
|
|
OsgCameraManipulator* cameraManipulator_{ nullptr };
|
|
bool initialized_{ false };
|
|
};
|