Class: QgsCameraPose

Encapsulates camera pose in a 3D scene.

The pose is defined with the following parameters:

  • center point - towards which point the camera is looking

  • distance from the center point - how far is the camera from the point towards which it is looking

  • pitch angle - vertical rotation of the camera (0 degrees = camera looking down, 90 degrees = camera looking from the side)

  • yaw angle - horizontal rotation of the camera

Added in version 3.4.

class qgis._3d.QgsCameraPose[source]

Bases: object

centerPoint(self) QgsVector3D[source]

Returns center point (towards which point the camera is looking)

Return type:

QgsVector3D

distanceFromCenterPoint(self) float[source]

Returns distance of the camera from the center point

Return type:

float

headingAngle(self) float[source]

Returns heading (yaw) angle in degrees

Return type:

float

pitchAngle(self) float[source]

Returns pitch angle in degrees

Return type:

float

readXml(self, elem: QDomElement)[source]

Reads configuration from a DOM element previously written using writeXml()

Parameters:

elem (QDomElement)

setCenterPoint(self, point: QgsVector3D)[source]

Sets center point (towards which point the camera is looking)

Parameters:

point (QgsVector3D)

setDistanceFromCenterPoint(self, distance: float)[source]

Sets distance of the camera from the center point

Parameters:

distance (float)

setHeadingAngle(self, heading: float)[source]

Sets heading (yaw) angle in degrees

Parameters:

heading (float)

setPitchAngle(self, pitch: float)[source]

Sets pitch angle in degrees

Parameters:

pitch (float)

writeXml(self, doc: QDomDocument) QDomElement[source]

Writes configuration to a new DOM element and returns it

Parameters:

doc (QDomDocument)

Return type:

QDomElement