QgsCameraPose class
3 Class that encapsulates camera pose in a 3D scene.
Contents
- Reference
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
Public functions
- auto centerPoint() const -> QgsVector3D
- Returns center point (towards which point the camera is looking)
- auto distanceFromCenterPoint() const -> float
- Returns distance of the camera from the center point.
- auto headingAngle() const -> float
- Returns heading (yaw) angle in degrees.
- auto pitchAngle() const -> float
- Returns pitch angle in degrees.
- void readXml(const QDomElement& elem)
- Reads configuration from a DOM element previously written using writeXml()
- void setCenterPoint(const QgsVector3D& point)
- Sets center point (towards which point the camera is looking)
- void setDistanceFromCenterPoint(float distance)
- Sets distance of the camera from the center point.
- void setHeadingAngle(float heading)
- Sets heading (yaw) angle in degrees.
- void setPitchAngle(float pitch)
- Sets pitch angle in degrees.
- void updateCamera(Qt3DRender::QCamera* camera)
- Update Qt3D camera view matrix based on the pose.
- auto writeXml(QDomDocument& doc) const -> QDomElement
- Writes configuration to a new DOM element and returns it.