Q3DCamera#
Representation of a camera in 3D space. More…
Synopsis#
Properties#
cameraPreset
- Currently active camera presetmaxZoomLevel
- Maximum allowed camera zoom levelminZoomLevel
- Minimum allowed camera zoom leveltarget
- Camera target as a vector or vertex in the 3D spacewrapXRotation
- Behavior of the minimum and maximum limits in the X-rotationwrapYRotation
- Behavior of the minimum and maximum limits in the Y-rotationxRotation
- X-rotation angle of the camera around the target point in degreesyRotation
- Y-rotation angle of the camera around the target point in degreeszoomLevel
- Camera zoom level in percentage
Functions#
def
cameraPreset
()def
maxZoomLevel
()def
minZoomLevel
()def
setCameraPosition
(horizontal, vertical[, zoom=100.0f])def
setCameraPreset
(preset)def
setMaxZoomLevel
(zoomLevel)def
setMinZoomLevel
(zoomLevel)def
setTarget
(target)def
setWrapXRotation
(isEnabled)def
setWrapYRotation
(isEnabled)def
setXRotation
(rotation)def
setYRotation
(rotation)def
setZoomLevel
(zoomLevel)def
target
()def
wrapXRotation
()def
wrapYRotation
()def
xRotation
()def
yRotation
()def
zoomLevel
()
Signals#
def
cameraPresetChanged
(preset)def
maxZoomLevelChanged
(zoomLevel)def
minZoomLevelChanged
(zoomLevel)def
targetChanged
(target)def
wrapXRotationChanged
(isEnabled)def
wrapYRotationChanged
(isEnabled)def
xRotationChanged
(rotation)def
yRotationChanged
(rotation)def
zoomLevelChanged
(zoomLevel)
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:
parent –
PySide6.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:
cameraPreset
()setCameraPreset
(preset)Signal
cameraPresetChanged
(preset)
- 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
.
See also
- Access functions:
maxZoomLevel
()setMaxZoomLevel
(zoomLevel)Signal
maxZoomLevelChanged
(zoomLevel)
- 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
.
See also
- Access functions:
minZoomLevel
()setMinZoomLevel
(zoomLevel)Signal
minZoomLevelChanged
(zoomLevel)
- 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:
target
()setTarget
(target)Signal
targetChanged
(target)
- 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:
setWrapXRotation
(isEnabled)Signal
wrapXRotationChanged
(isEnabled)
- 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:
setWrapYRotation
(isEnabled)Signal
wrapYRotationChanged
(isEnabled)
- 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:
xRotation
()setXRotation
(rotation)Signal
xRotationChanged
(rotation)
- 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:
yRotation
()setYRotation
(rotation)Signal
yRotationChanged
(rotation)
- 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.
See also
- Access functions:
zoomLevel
()setZoomLevel
(zoomLevel)Signal
zoomLevelChanged
(zoomLevel)
- 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:
See also
Getter of property cameraPreset
.
- PySide6.QtDataVisualization.Q3DCamera.cameraPresetChanged(preset)#
- Parameters:
preset –
CameraPreset
Notification signal of property cameraPreset
.
- PySide6.QtDataVisualization.Q3DCamera.maxZoomLevel()#
- Return type:
float
See also
Getter of property maxZoomLevel
.
- PySide6.QtDataVisualization.Q3DCamera.maxZoomLevelChanged(zoomLevel)#
- Parameters:
zoomLevel – float
Notification signal of property maxZoomLevel
.
- PySide6.QtDataVisualization.Q3DCamera.minZoomLevel()#
- Return type:
float
See also
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:
preset –
CameraPreset
See also
Setter of property cameraPreset
.
- PySide6.QtDataVisualization.Q3DCamera.setMaxZoomLevel(zoomLevel)#
- Parameters:
zoomLevel – float
See also
Setter of property maxZoomLevel
.
- PySide6.QtDataVisualization.Q3DCamera.setMinZoomLevel(zoomLevel)#
- Parameters:
zoomLevel – float
See also
Setter of property minZoomLevel
.
- PySide6.QtDataVisualization.Q3DCamera.setTarget(target)#
- Parameters:
target –
PySide6.QtGui.QVector3D
See also
Setter of property target
.
- PySide6.QtDataVisualization.Q3DCamera.setWrapXRotation(isEnabled)#
- Parameters:
isEnabled – bool
See also
Setter of property wrapXRotation
.
- PySide6.QtDataVisualization.Q3DCamera.setWrapYRotation(isEnabled)#
- Parameters:
isEnabled – bool
See also
Setter of property wrapYRotation
.
- PySide6.QtDataVisualization.Q3DCamera.setXRotation(rotation)#
- Parameters:
rotation – float
See also
Setter of property xRotation
.
- PySide6.QtDataVisualization.Q3DCamera.setYRotation(rotation)#
- Parameters:
rotation – float
See also
Setter of property yRotation
.
- PySide6.QtDataVisualization.Q3DCamera.setZoomLevel(zoomLevel)#
- Parameters:
zoomLevel – float
See also
Setter of property zoomLevel
.
- PySide6.QtDataVisualization.Q3DCamera.target()#
- Return type:
See also
Getter of property target
.
- PySide6.QtDataVisualization.Q3DCamera.targetChanged(target)#
- Parameters:
target –
PySide6.QtGui.QVector3D
Notification signal of property target
.
- PySide6.QtDataVisualization.Q3DCamera.wrapXRotation()#
- Return type:
bool
See also
Getter of property wrapXRotation
.
- PySide6.QtDataVisualization.Q3DCamera.wrapXRotationChanged(isEnabled)#
- Parameters:
isEnabled – bool
Notification signal of property wrapXRotation
.
- PySide6.QtDataVisualization.Q3DCamera.wrapYRotation()#
- Return type:
bool
See also
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
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
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
Getter of property zoomLevel
.
- PySide6.QtDataVisualization.Q3DCamera.zoomLevelChanged(zoomLevel)#
- Parameters:
zoomLevel – float
Notification signal of property zoomLevel
.