QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Public Slots | Public Member Functions | List of all members
Qgs3DAxis Class Reference

3 More...

#include <qgs3daxis.h>

Inheritance diagram for Qgs3DAxis:
Inheritance graph
[legend]

Public Slots

void onAxisSettingsChanged ()
 Force update of the axis and the viewport when a setting has changed. More...
 

Public Member Functions

 Qgs3DAxis (Qt3DExtras::Qt3DWindow *parentWindow, Qt3DCore::QEntity *parent3DScene, Qgs3DMapScene *mapScene, QgsCameraController *camera, Qgs3DMapSettings *map)
 Defaul Qgs3DAxis constructor. More...
 
 ~Qgs3DAxis () override
 
QVector3D from3DTo2DLabelPosition (const QVector3D &sourcePos, Qt3DRender::QCamera *sourceCamera, Qt3DRender::QViewport *sourceViewport, Qt3DRender::QCamera *destCamera, Qt3DRender::QViewport *destViewport, const QSize &destSize)
 project a 3D position from sourceCamera (in sourceViewport) to a 2D position for destCamera (in destViewport). More...
 

Detailed Description

3

Display 3D ortho axis in the main 3D view.

Axis are displayed in a dedicated viewport which can be placed all around the main viewport. Axis labels are displayed in a dedicated viewport with a specific camera to act as a billboarding layer. Axis labels can be changed with the mode combo box from the navigation widget.

Note
Not available in Python bindings
Since
QGIS 3.26

Definition at line 60 of file qgs3daxis.h.

Constructor & Destructor Documentation

◆ Qgs3DAxis()

Qgs3DAxis::Qgs3DAxis ( Qt3DExtras::Qt3DWindow *  parentWindow,
Qt3DCore::QEntity *  parent3DScene,
Qgs3DMapScene mapScene,
QgsCameraController camera,
Qgs3DMapSettings map 
)

Defaul Qgs3DAxis constructor.

Parameters
parentWindowqt3d windows
parent3DSceneroot entity to set as parent
mapScene3d map scene to retrieve terrain and 3d engine data
cameracamera controller used to track camera movements
map3D map settings

Definition at line 57 of file qgs3daxis.cpp.

◆ ~Qgs3DAxis()

Qgs3DAxis::~Qgs3DAxis ( )
override

Definition at line 87 of file qgs3daxis.cpp.

Member Function Documentation

◆ from3DTo2DLabelPosition()

QVector3D Qgs3DAxis::from3DTo2DLabelPosition ( const QVector3D &  sourcePos,
Qt3DRender::QCamera *  sourceCamera,
Qt3DRender::QViewport *  sourceViewport,
Qt3DRender::QCamera *  destCamera,
Qt3DRender::QViewport *  destViewport,
const QSize &  destSize 
)

project a 3D position from sourceCamera (in sourceViewport) to a 2D position for destCamera (in destViewport).

destCamera and the destViewport act as a billboarding layer. The labels displayed by this process will always face the camera.

Parameters
sourcePos3D label coordinates
sourceCameramain view camera
sourceViewportmain viewport
destCamerabillboarding camera
destViewportbillboarding viewport
destSizemain qt3d window size
Returns

Definition at line 358 of file qgs3daxis.cpp.

◆ onAxisSettingsChanged

void Qgs3DAxis::onAxisSettingsChanged ( )
slot

Force update of the axis and the viewport when a setting has changed.

Definition at line 1011 of file qgs3daxis.cpp.


The documentation for this class was generated from the following files: