QGIS API Documentation 3.99.0-Master (c22de0620c0)
Loading...
Searching...
No Matches
qgs3daxisrenderview.h
Go to the documentation of this file.
1/***************************************************************************
2 qgs3daxisrenderview.h
3 --------------------------------------
4 Date : June 2024
5 Copyright : (C) 2024 by Benoit De Mezzo
6 Email : benoit dot de dot mezzo at oslandia dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGS3DAXISRENDERVIEW_H
17#define QGS3DAXISRENDERVIEW_H
18
19#include "qgis_3d.h"
21
22#define SIP_NO_FILE
23
24class QColor;
25class QRect;
26class QSurface;
27
28namespace Qt3DCore
29{
30 class QEntity;
31}
32
33namespace Qt3DRender
34{
35 class QRenderSettings;
36 class QCamera;
37 class QFrameGraphNode;
38 class QLayer;
39 class QViewport;
40 class QSubtreeEnabler;
41 class QRenderTargetSelector;
42} // namespace Qt3DRender
43
44class Qgs3DMapCanvas;
46
47class QgsFrameGraph;
49class Qgs3DAxis;
50
51
60{
61 public:
65 Qgs3DAxisRenderView( const QString &viewName, Qgs3DMapCanvas *canvas, //
66 QgsCameraController *cameraCtrl, Qgs3DMapSettings *settings, //
67 Qgs3DAxis *axis3D );
68
70 Qt3DRender::QViewport *viewport() const;
71
73 Qt3DRender::QLayer *labelLayer() const;
74
76 Qt3DRender::QLayer *objectLayer() const;
77
79 Qt3DRender::QCamera *objectCamera() const;
80
82 Qt3DRender::QCamera *labelCamera() const;
83
84 void updateWindowResize( int width, int height ) override;
85
87 void onHorizontalPositionChanged( Qt::AnchorPoint position );
88
90 void onVerticalPositionChanged( Qt::AnchorPoint position );
91
93 void onViewportSizeUpdate( int width = -1, int height = -1 );
94
95 private:
96 Qgs3DMapCanvas *mCanvas;
97 Qt3DRender::QCamera *mObjectCamera;
98 Qt3DRender::QCamera *mLabelCamera;
99 Qt3DRender::QLayer *mObjectLayer = nullptr;
100 Qt3DRender::QLayer *mLabelLayer = nullptr;
101 Qt3DRender::QViewport *mViewport = nullptr;
102 Qgs3DMapSettings *mMapSettings = nullptr;
103 Qgs3DAxis *m3DAxis;
104};
105
106
107#endif // QGS3DAXISRENDERVIEW_H
Qt3DRender::QLayer * labelLayer() const
Returns the layer to be used by entities to be included in the label renderpass.
void onVerticalPositionChanged(Qt::AnchorPoint position)
Updates viewport vertical position.
Qt3DRender::QCamera * labelCamera() const
Returns camera used for billboarded labels.
Qt3DRender::QLayer * objectLayer() const
Returns main object layer.
Qgs3DAxisRenderView(const QString &viewName, Qgs3DMapCanvas *canvas, QgsCameraController *cameraCtrl, Qgs3DMapSettings *settings, Qgs3DAxis *axis3D)
Constructor for Qgs3DAxisRenderView with the specified parent object.
Qt3DRender::QViewport * viewport() const
Returns the viewport associated to this renderview.
void onViewportSizeUpdate(int width=-1, int height=-1)
Updates viewport size. Uses canvas size by default.
Qt3DRender::QCamera * objectCamera() const
Returns main object camera (used for axis or cube).
void onHorizontalPositionChanged(Qt::AnchorPoint position)
Updates viewport horizontal position.
Display 3D ortho axis in the main 3D view.
Definition qgs3daxis.h:68
Convenience wrapper to simplify the creation of a 3D window ready to be used with QGIS.
Definition of the world.
virtual void updateWindowResize(int width, int height)
Called when 3D window is resized.
QgsAbstractRenderView(const QString &viewName)
Constructor for QgsAbstractRenderView with the specified parent object.
Object that controls camera movement based on user input.
Container class that holds different objects related to frame graphs of 3D scenes.