-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cec9308
commit 6412c27
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#ifndef QT3DWIDGET_H | ||
#define QT3DWIDGET_H | ||
|
||
|
||
#include <Qt3DRender/qt3drender_global.h> | ||
|
||
#include <QtCore/QtGlobal> | ||
#include <QOpenGLWidget> | ||
#include <Qt3DCore/QEntity> | ||
#include <Qt3DCore/QAbstractAspect> | ||
#include <Qt3DRender/QFrameGraphNode> | ||
#include <Qt3DExtras/QForwardRenderer> | ||
#include <Qt3DRender/QRenderSettings> | ||
#include <Qt3DRender/QCamera> | ||
|
||
#if defined(QT3DWIDGETLIB_LIBRARY) | ||
# define QT3DWIDGETLIB_EXPORT Q_DECL_EXPORT | ||
#else | ||
# define QT3DWIDGETLIB_EXPORT Q_DECL_IMPORT | ||
#endif | ||
|
||
class Qt3DWidgetPrivate; | ||
|
||
class QT3DWIDGETLIB_EXPORT Qt3DWidget : public QOpenGLWidget { | ||
Q_OBJECT | ||
|
||
public: | ||
explicit Qt3DWidget(QWidget *parent = nullptr); | ||
~Qt3DWidget(); | ||
void initializeGL() override; | ||
void resizeGL(int w, int h) override; | ||
|
||
void registerAspect(Qt3DCore::QAbstractAspect *aspect); | ||
void registerAspect(const QString &name); | ||
|
||
void setUpdateFrequency(int milliseconds); | ||
|
||
void setRootEntity(Qt3DCore::QEntity *root); | ||
|
||
void setActiveFrameGraph(Qt3DRender::QFrameGraphNode *activeFrameGraph); | ||
Qt3DRender::QFrameGraphNode *activeFrameGraph() const; | ||
Qt3DExtras::QForwardRenderer *defaultFrameGraph() const; | ||
|
||
Qt3DRender::QCamera *camera() const; | ||
Qt3DRender::QRenderSettings *renderSettings() const; | ||
|
||
QSurface *surface() const; | ||
|
||
public Q_SLOTS: | ||
void paintGL() override; | ||
|
||
Q_SIGNALS: | ||
|
||
protected: | ||
Qt3DWidgetPrivate *d_ptr; | ||
|
||
private: | ||
Q_DECLARE_PRIVATE(Qt3DWidget) | ||
|
||
}; | ||
|
||
#endif // QT3DWIDGET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters