在 3D 空间中的摄像头表示。 更多...
import 语句: | import QtDataVisualization 1.5 |
Since: | QtDataVisualization 1.0 |
实例化: | Q3DCamera |
Camera3D represents a basic orbit around centerpoint 3D camera that is used when rendering the data visualization. The type offers simple methods for rotating the camera around the origin and setting zoom level.
For Camera3D enums, see Q3DCamera::CameraPreset .
cameraPreset : Camera3D . CameraPreset |
The currently active camera preset, which is one of Camera3D.CameraPreset . If no preset is active, the value is Camera3D.CameraPresetNone .
maxZoomLevel : float |
Sets the maximum allowed camera zoom level. If the new maximum level 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
.
另请参阅 zoomLevel and minZoomLevel .
minZoomLevel : float |
Sets the minimum allowed camera zoom level. If the new minimum level 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.0
。默认为
10.0
.
另请参阅 zoomLevel and maxZoomLevel .
[since QtDataVisualization 1.2] target : vector3d |
The camera target as a vector3d. Defaults to
vector3d(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.
注意: For bar graphs, the Y-coordinate is ignored and camera always targets a point on the horizontal background.
该特性在 QtDataVisualization 1.2 引入。
wrapXRotation : bool |
The behavior of the minimum and maximum limits in the X-rotation. By default, the X-rotation wraps from minimum value to maximum and from maximum to minimum.
若设为
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.
wrapYRotation : bool |
The behavior of the minimum and maximum limits in the Y-rotation. By default, the Y-rotation is limited between the minimum and maximum values without any wrapping.
若
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.
xRotation : float |
The X-rotation angle of the camera around the target point in degrees starting from the current base position.
yRotation : float |
The Y-rotation angle of the camera around the target point in degrees starting from the current base position.
zoomLevel : float |
The camera zoom level in percentage. The default value of
100.0
意味着摄像头没有设置放大 (或缩小)。值被限制通过
minZoomLevel
and
maxZoomLevel
特性。
另请参阅 minZoomLevel and maxZoomLevel .