Q3DCamera#

Representation of a camera in 3D space. More

Inheritance diagram of PySide6.QtDataVisualization.Q3DCamera

Synopsis#

Properties#

  • cameraPreset - Currently active camera preset

  • maxZoomLevel - Maximum allowed camera zoom level

  • minZoomLevel - Minimum allowed camera zoom level

  • target - Camera target as a vector or vertex in the 3D space

  • wrapXRotation - Behavior of the minimum and maximum limits in the X-rotation

  • wrapYRotation - Behavior of the minimum and maximum limits in the Y-rotation

  • xRotation - X-rotation angle of the camera around the target point in degrees

  • yRotation - Y-rotation angle of the camera around the target point in degrees

  • zoomLevel - Camera zoom level in percentage

Functions#

Signals#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

Q3DCamera represents a basic orbit around centerpoint 3D camera that is used when rendering the data visualization. The class offers simple methods for rotating the camera around the origin and setting zoom level.

class PySide6.QtDataVisualization.Q3DCamera([parent=None])#
Parameters:

parentPySide6.QtCore.QObject

Constructs a new 3D camera with position set to origin, up direction facing towards the Y-axis and looking at origin by default. An optional parent parameter can be given and is then passed to QObject constructor.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property PᅟySide6.QtDataVisualization.Q3DCamera.cameraPreset: CameraPreset#

This property holds The currently active camera preset..

If no CameraPreset value is set, CameraPresetNone is used by default.

Access functions:
property PᅟySide6.QtDataVisualization.Q3DCamera.maxZoomLevel: float#

This property holds The maximum allowed camera zoom level..

If the maximum level is set to a new value that is lower than the existing minimum level, the minimum level is adjusted to the new maximum as well. If the current zoomLevel is outside the new bounds, it is adjusted as well. Defaults to 500.0f.

Access functions:
property PᅟySide6.QtDataVisualization.Q3DCamera.minZoomLevel: float#

This property holds The minimum allowed camera zoom level..

If the minimum level is set to a new value that is higher than the existing maximum level, the maximum level is adjusted to the new minimum as well. If the current zoomLevel is outside the new bounds, it is adjusted as well. The minZoomLevel cannot be set below 1.0f. Defaults to 10.0f.

Access functions:
property PᅟySide6.QtDataVisualization.Q3DCamera.target: PySide6.QtGui.QVector3D#

This property holds The camera target as a vector or vertex in the 3D space..

Defaults to QVector3D(0.0, 0.0, 0.0).

Valid coordinate values are between -1.0...1.0, where the edge values indicate the edges of the corresponding axis range. Any values outside this range are clamped to the edge.

Note

For bar graphs, the Y-coordinate is ignored and camera always targets a point on the horizontal background.

Access functions:
property PᅟySide6.QtDataVisualization.Q3DCamera.wrapXRotation: bool#

This property holds The behavior of the minimum and maximum limits in the X-rotation..

If set to true, the X-rotation of the camera is wrapped from minimum to maximum and from maximum to minimum. If set to false, the X-rotation of the camera is limited to the sector determined by the minimum and maximum values. Set to true by default.

Access functions:
property PᅟySide6.QtDataVisualization.Q3DCamera.wrapYRotation: bool#

This property holds The behavior of the minimum and maximum limits in the Y-rotation..

If true, the Y-rotation of the camera is wrapped from minimum to maximum and from maximum to minimum. If false, the Y-rotation of the camera is limited to the sector determined by the minimum and maximum values. Set to true by default.

Access functions:
property PᅟySide6.QtDataVisualization.Q3DCamera.xRotation: float#

This property holds The X-rotation angle of the camera around the target point in degrees..

Access functions:
property PᅟySide6.QtDataVisualization.Q3DCamera.yRotation: float#

This property holds The Y-rotation angle of the camera around the target point in degrees..

Access functions:
property PᅟySide6.QtDataVisualization.Q3DCamera.zoomLevel: float#

This property holds The camera zoom level in percentage..

The default value of 100.0f means there is no zoom in or out set in the camera. The value is limited by the minZoomLevel and maxZoomLevel properties.

Access functions:
PySide6.QtDataVisualization.Q3DCamera.CameraPreset#

Predefined positions for camera.

Constant

Description

Q3DCamera.CameraPresetNone

Used to indicate a preset has not been set, or the scene has been rotated freely.

Q3DCamera.CameraPresetFrontLow

Q3DCamera.CameraPresetFront

Q3DCamera.CameraPresetFrontHigh

Q3DCamera.CameraPresetLeftLow

Q3DCamera.CameraPresetLeft

Q3DCamera.CameraPresetLeftHigh

Q3DCamera.CameraPresetRightLow

Q3DCamera.CameraPresetRight

Q3DCamera.CameraPresetRightHigh

Q3DCamera.CameraPresetBehindLow

Q3DCamera.CameraPresetBehind

Q3DCamera.CameraPresetBehindHigh

Q3DCamera.CameraPresetIsometricLeft

Q3DCamera.CameraPresetIsometricLeftHigh

Q3DCamera.CameraPresetIsometricRight

Q3DCamera.CameraPresetIsometricRightHigh

Q3DCamera.CameraPresetDirectlyAbove

Q3DCamera.CameraPresetDirectlyAboveCW45

Q3DCamera.CameraPresetDirectlyAboveCCW45

Q3DCamera.CameraPresetFrontBelow

In Q3DBars from CameraPresetFrontBelow onward these only work for graphs including negative values. They act as Preset…Low for positive-only values.

Q3DCamera.CameraPresetLeftBelow

Q3DCamera.CameraPresetRightBelow

Q3DCamera.CameraPresetBehindBelow

Q3DCamera.CameraPresetDirectlyBelow

Acts as CameraPresetFrontLow for positive-only bars.

PySide6.QtDataVisualization.Q3DCamera.cameraPreset()#
Return type:

CameraPreset

Getter of property cameraPreset .

PySide6.QtDataVisualization.Q3DCamera.cameraPresetChanged(preset)#
Parameters:

presetCameraPreset

Notification signal of property cameraPreset .

PySide6.QtDataVisualization.Q3DCamera.maxZoomLevel()#
Return type:

float

Getter of property maxZoomLevel .

PySide6.QtDataVisualization.Q3DCamera.maxZoomLevelChanged(zoomLevel)#
Parameters:

zoomLevel – float

Notification signal of property maxZoomLevel .

PySide6.QtDataVisualization.Q3DCamera.minZoomLevel()#
Return type:

float

Getter of property minZoomLevel .

PySide6.QtDataVisualization.Q3DCamera.minZoomLevelChanged(zoomLevel)#
Parameters:

zoomLevel – float

Notification signal of property minZoomLevel .

PySide6.QtDataVisualization.Q3DCamera.setCameraPosition(horizontal, vertical[, zoom=100.0f])#
Parameters:
  • horizontal – float

  • vertical – float

  • zoom – float

Utility function that sets the camera rotations and distance.``horizontal`` and vertical define the camera rotations to be used. Optional zoom parameter can be given to set the zoom percentage of the camera within the bounds defined by minZoomLevel and maxZoomLevel properties.

PySide6.QtDataVisualization.Q3DCamera.setCameraPreset(preset)#
Parameters:

presetCameraPreset

See also

cameraPreset()

Setter of property cameraPreset .

PySide6.QtDataVisualization.Q3DCamera.setMaxZoomLevel(zoomLevel)#
Parameters:

zoomLevel – float

See also

maxZoomLevel()

Setter of property maxZoomLevel .

PySide6.QtDataVisualization.Q3DCamera.setMinZoomLevel(zoomLevel)#
Parameters:

zoomLevel – float

See also

minZoomLevel()

Setter of property minZoomLevel .

PySide6.QtDataVisualization.Q3DCamera.setTarget(target)#
Parameters:

targetPySide6.QtGui.QVector3D

See also

target()

Setter of property target .

PySide6.QtDataVisualization.Q3DCamera.setWrapXRotation(isEnabled)#
Parameters:

isEnabled – bool

See also

wrapXRotation()

Setter of property wrapXRotation .

PySide6.QtDataVisualization.Q3DCamera.setWrapYRotation(isEnabled)#
Parameters:

isEnabled – bool

See also

wrapYRotation()

Setter of property wrapYRotation .

PySide6.QtDataVisualization.Q3DCamera.setXRotation(rotation)#
Parameters:

rotation – float

See also

xRotation()

Setter of property xRotation .

PySide6.QtDataVisualization.Q3DCamera.setYRotation(rotation)#
Parameters:

rotation – float

See also

yRotation()

Setter of property yRotation .

PySide6.QtDataVisualization.Q3DCamera.setZoomLevel(zoomLevel)#
Parameters:

zoomLevel – float

See also

zoomLevel()

Setter of property zoomLevel .

PySide6.QtDataVisualization.Q3DCamera.target()#
Return type:

PySide6.QtGui.QVector3D

See also

setTarget()

Getter of property target .

PySide6.QtDataVisualization.Q3DCamera.targetChanged(target)#
Parameters:

targetPySide6.QtGui.QVector3D

Notification signal of property target .

PySide6.QtDataVisualization.Q3DCamera.wrapXRotation()#
Return type:

bool

Getter of property wrapXRotation .

PySide6.QtDataVisualization.Q3DCamera.wrapXRotationChanged(isEnabled)#
Parameters:

isEnabled – bool

Notification signal of property wrapXRotation .

PySide6.QtDataVisualization.Q3DCamera.wrapYRotation()#
Return type:

bool

Getter of property wrapYRotation .

PySide6.QtDataVisualization.Q3DCamera.wrapYRotationChanged(isEnabled)#
Parameters:

isEnabled – bool

Notification signal of property wrapYRotation .

PySide6.QtDataVisualization.Q3DCamera.xRotation()#
Return type:

float

See also

setXRotation()

Getter of property xRotation .

PySide6.QtDataVisualization.Q3DCamera.xRotationChanged(rotation)#
Parameters:

rotation – float

Notification signal of property xRotation .

PySide6.QtDataVisualization.Q3DCamera.yRotation()#
Return type:

float

See also

setYRotation()

Getter of property yRotation .

PySide6.QtDataVisualization.Q3DCamera.yRotationChanged(rotation)#
Parameters:

rotation – float

Notification signal of property yRotation .

PySide6.QtDataVisualization.Q3DCamera.zoomLevel()#
Return type:

float

See also

setZoomLevel()

Getter of property zoomLevel .

PySide6.QtDataVisualization.Q3DCamera.zoomLevelChanged(zoomLevel)#
Parameters:

zoomLevel – float

Notification signal of property zoomLevel .