daily pastebin goal
50%
SHARE
TWEET

Test3D-windows-header

johan_solo Oct 18th, 2017 57 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. #ifndef WINDOW_H
  2. #define WINDOW_H
  3.  
  4. #include <QtCore/QList>
  5. #include <QtCore/QPoint>
  6.  
  7. #include <Qt3DRender/QWindow>
  8.  
  9. class QWheelEvent;
  10. class QWidget;
  11.  
  12. namespace Qt3DCore
  13. {
  14.     class QAspectEngine;
  15.     class QCamera;
  16.     class QEntity;
  17. }
  18.  
  19. namespace Qt3DInput
  20. {
  21.     class QInputAspect;
  22. }
  23.  
  24. class Window : public Qt3DRender::QWindow
  25. {
  26.     Q_OBJECT
  27. public:
  28.     Window();
  29.     ~Window();
  30.  
  31.     bool initialise();
  32.  
  33.     QWidget* widget();
  34.  
  35. protected slots:
  36.     void wheelEvent( QWheelEvent* event );
  37.     void poorMansZoom( float factor );
  38.     void pan( const QPoint& pt );
  39. private:
  40.     Qt3DCore::QAspectEngine* _Engine;
  41.     Qt3DInput::QInputAspect* _Input;
  42.  
  43.     Qt3DCore::QCamera* _Camera;
  44.  
  45.     Qt3DCore::QEntity* _RootEntity;
  46.     QList< Qt3DCore::QEntity* > _SphereEntities;
  47.  
  48.     QWidget* _Widget;
  49.  
  50.     bool _PanEngaged;
  51.     QPoint _OriginPan;
  52. };
  53.  
  54. #endif // WINDOW_H
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top