Class: QgsCameraPose¶
- class qgis.3d.QgsCameraPose¶
Bases:
sip.wrapper
Class that 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
Methods
Returns center point (towards which point the camera is looking)
Returns distance of the camera from the center point
Returns heading (yaw) angle in degrees
Returns pitch angle in degrees
Reads configuration from a DOM element previously written using
writeXml()
Sets center point (towards which point the camera is looking)
Sets distance of the camera from the center point
Sets heading (yaw) angle in degrees
Sets pitch angle in degrees
Writes configuration to a new DOM element and returns it
- centerPoint(self) → QgsVector3D¶
Returns center point (towards which point the camera is looking)
- Return type
- distanceFromCenterPoint(self) → float¶
Returns distance of the camera from the center point
- Return type
float
- headingAngle(self) → float¶
Returns heading (yaw) angle in degrees
- Return type
float
- pitchAngle(self) → float¶
Returns pitch angle in degrees
- Return type
float
- readXml(self, elem: QDomElement)¶
Reads configuration from a DOM element previously written using
writeXml()
- Parameters
elem (QDomElement) –
- setCenterPoint(self, point: QgsVector3D)¶
Sets center point (towards which point the camera is looking)
- Parameters
point (QgsVector3D) –
- setDistanceFromCenterPoint(self, distance: float)¶
Sets distance of the camera from the center point
- Parameters
distance (float) –
- setHeadingAngle(self, heading: float)¶
Sets heading (yaw) angle in degrees
- Parameters
heading (float) –
- setPitchAngle(self, pitch: float)¶
Sets pitch angle in degrees
- Parameters
pitch (float) –
- writeXml(self, doc: QDomDocument) → QDomElement¶
Writes configuration to a new DOM element and returns it
- Parameters
doc (QDomDocument) –
- Return type
QDomElement