QCameraLens#
QCameraLens
specifies the projection matrix that will be used to define a Camera for a 3D scene. More…
Synopsis#
Properties#
Functions#
def
aspectRatio
()def
bottom
()def
exposure
()def
farPlane
()def
fieldOfView
()def
left
()def
nearPlane
()def
projectionMatrix
()def
projectionType
()def
right
()def
setFrustumProjection
(left, right, bottom, top, nearPlane, farPlane)def
setOrthographicProjection
(left, right, bottom, top, nearPlane, farPlane)def
setPerspectiveProjection
(fieldOfView, aspect, nearPlane, farPlane)def
top
()def
viewAll
(cameraId)def
viewEntity
(entityId, cameraId)
Slots#
def
setAspectRatio
(aspectRatio)def
setBottom
(bottom)def
setExposure
(exposure)def
setFarPlane
(farPlane)def
setFieldOfView
(fieldOfView)def
setLeft
(left)def
setNearPlane
(nearPlane)def
setProjectionMatrix
(projectionMatrix)def
setProjectionType
(projectionType)def
setRight
(right)def
setTop
(top)
Signals#
def
aspectRatioChanged
(aspectRatio)def
bottomChanged
(bottom)def
exposureChanged
(exposure)def
farPlaneChanged
(farPlane)def
fieldOfViewChanged
(fieldOfView)def
leftChanged
(left)def
nearPlaneChanged
(nearPlane)def
projectionMatrixChanged
(projectionMatrix)def
projectionTypeChanged
(projectionType)def
rightChanged
(right)def
topChanged
(top)def
viewSphere
(center, radius)
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#
- class PySide6.Qt3DRender.Qt3DRender.QCameraLens([parent=None])#
- Parameters:
parent –
PySide6.Qt3DCore.Qt3DCore.QNode
Constructs a QCameraLens
with given parent
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.Qt3DRender.Qt3DRender.QCameraLens.aspectRatio: float#
Holds the current aspect ratio of the camera lens.
Note
: The return value may be undefined if the projection type is not PerspectiveProjection
.
- Access functions:
aspectRatio
()setAspectRatio
(aspectRatio)Signal
aspectRatioChanged
(aspectRatio)
- property PᅟySide6.Qt3DRender.Qt3DRender.QCameraLens.bottom: float#
Holds the current bottom plane of the camera lens.
Note
The return value may be undefined if the projection type is PerspectiveProjection
.
- Access functions:
bottom
()setBottom
(bottom)Signal
bottomChanged
(bottom)
- property PᅟySide6.Qt3DRender.Qt3DRender.QCameraLens.exposure: float#
Holds the current exposure of the camera lens.
- Access functions:
exposure
()setExposure
(exposure)Signal
exposureChanged
(exposure)
- property PᅟySide6.Qt3DRender.Qt3DRender.QCameraLens.farPlane: float#
Holds the current near plane of the camera lens.
- Access functions:
farPlane
()setFarPlane
(farPlane)Signal
farPlaneChanged
(farPlane)
- property PᅟySide6.Qt3DRender.Qt3DRender.QCameraLens.fieldOfView: float#
Holds the current field of view of the camera lens.
Note
: The return value may be undefined if the projection type is not PerspectiveProjection
.
- Access functions:
fieldOfView
()setFieldOfView
(fieldOfView)Signal
fieldOfViewChanged
(fieldOfView)
- property PᅟySide6.Qt3DRender.Qt3DRender.QCameraLens.left: float#
Holds the current left plane of the camera lens.
Note
The return value may be undefined if the projection type is PerspectiveProjection
.
- Access functions:
left
()setLeft
(left)Signal
leftChanged
(left)
- property PᅟySide6.Qt3DRender.Qt3DRender.QCameraLens.nearPlane: float#
Holds the current near plane of the camera lens.
- Access functions:
nearPlane
()setNearPlane
(nearPlane)Signal
nearPlaneChanged
(nearPlane)
- property PᅟySide6.Qt3DRender.Qt3DRender.QCameraLens.projectionMatrix: PySide6.QtGui.QMatrix4x4#
Holds the current projection matrix of the camera lens.
- Access functions:
setProjectionMatrix
(projectionMatrix)Signal
projectionMatrixChanged
(projectionMatrix)
- property PᅟySide6.Qt3DRender.Qt3DRender.QCameraLens.projectionType: ProjectionType#
Holds the type of the camera projection.
See also
ProjectionType
- Access functions:
setProjectionType
(projectionType)Signal
projectionTypeChanged
(projectionType)
- property PᅟySide6.Qt3DRender.Qt3DRender.QCameraLens.right: float#
Holds the current right plane of the camera lens.
Note
The return value may be undefined if the projection type is PerspectiveProjection
.
- Access functions:
right
()setRight
(right)Signal
rightChanged
(right)
- property PᅟySide6.Qt3DRender.Qt3DRender.QCameraLens.top: float#
Holds the current top plane of the camera lens.
Note
The return value may be undefined if the projection type is PerspectiveProjection
.
- Access functions:
top
()setTop
(top)Signal
topChanged
(top)
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.ProjectionType#
Specifies which parameters of QCameraLens
are used to compute the projection matrix.
Constant
Description
Qt3DRender.QCameraLens.OrthographicProjection
Orthogonal projection
Qt3DRender.QCameraLens.PerspectiveProjection
Perspective projection
Qt3DRender.QCameraLens.FrustumProjection
Frustum projection
Qt3DRender.QCameraLens.CustomProjection
Custom user-defined projection
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.aspectRatio()#
- Return type:
float
See also
Getter of property aspectRatio
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.aspectRatioChanged(aspectRatio)#
- Parameters:
aspectRatio – float
Notification signal of property aspectRatio
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.bottom()#
- Return type:
float
See also
Getter of property bottom
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.bottomChanged(bottom)#
- Parameters:
bottom – float
Notification signal of property bottom
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.exposure()#
- Return type:
float
See also
Getter of property exposure
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.exposureChanged(exposure)#
- Parameters:
exposure – float
Notification signal of property exposure
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.farPlane()#
- Return type:
float
See also
Getter of property farPlane
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.farPlaneChanged(farPlane)#
- Parameters:
farPlane – float
Notification signal of property farPlane
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.fieldOfView()#
- Return type:
float
See also
Getter of property fieldOfView
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.fieldOfViewChanged(fieldOfView)#
- Parameters:
fieldOfView – float
Notification signal of property fieldOfView
.
Getter of property left
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.leftChanged(left)#
- Parameters:
left – float
Notification signal of property left
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.nearPlane()#
- Return type:
float
See also
Getter of property nearPlane
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.nearPlaneChanged(nearPlane)#
- Parameters:
nearPlane – float
Notification signal of property nearPlane
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.projectionMatrix()#
- Return type:
See also
Getter of property projectionMatrix
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.projectionMatrixChanged(projectionMatrix)#
- Parameters:
projectionMatrix –
PySide6.QtGui.QMatrix4x4
Notification signal of property projectionMatrix
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.projectionType()#
- Return type:
See also
Getter of property projectionType
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.projectionTypeChanged(projectionType)#
- Parameters:
projectionType –
ProjectionType
Notification signal of property projectionType
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.right()#
- Return type:
float
See also
Getter of property right
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.rightChanged(right)#
- Parameters:
right – float
Notification signal of property right
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setAspectRatio(aspectRatio)#
- Parameters:
aspectRatio – float
Sets the projection’s aspect ratio to aspectRatio
. This triggers a projection matrix update.
Note
this has no effect if the projection type is not PerspectiveProjection
.
See also
Setter of property aspectRatio
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setBottom(bottom)#
- Parameters:
bottom – float
Sets the projection’s bottom window coordinate to bottom
. This triggers a projection matrix update.
Setter of property bottom
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setExposure(exposure)#
- Parameters:
exposure – float
Sets the camera lens’ exposure
See also
Setter of property exposure
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setFarPlane(farPlane)#
- Parameters:
farPlane – float
Sets the projection’s far plane to farPlane
. This triggers a projection matrix update.
See also
Setter of property farPlane
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setFieldOfView(fieldOfView)#
- Parameters:
fieldOfView – float
Sets the projection’s field of view to fieldOfView
degrees. This triggers a projection matrix update.
Note
this has no effect if the projection type is not PerspectiveProjection
.
See also
Setter of property fieldOfView
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setFrustumProjection(left, right, bottom, top, nearPlane, farPlane)#
- Parameters:
left – float
right – float
bottom – float
top – float
nearPlane – float
farPlane – float
Defines an orthographic projection based on left
, right
, bottom
, top
, nearPlane
, farPlane
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setLeft(left)#
- Parameters:
left – float
Sets the projection’s lower left window coordinate to left
. This triggers a projection matrix update.
Setter of property left
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setNearPlane(nearPlane)#
- Parameters:
nearPlane – float
Sets the projection’s near plane to nearPlane
. This triggers a projection matrix update.
See also
Setter of property nearPlane
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setOrthographicProjection(left, right, bottom, top, nearPlane, farPlane)#
- Parameters:
left – float
right – float
bottom – float
top – float
nearPlane – float
farPlane – float
Defines an orthographic projection based on left
, right
, bottom
, top
, nearPlane
, farPlane
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setPerspectiveProjection(fieldOfView, aspect, nearPlane, farPlane)#
- Parameters:
fieldOfView – float
aspect – float
nearPlane – float
farPlane – float
Defines a perspective projection based on fieldOfView
, aspectRatio
, nearPlane
, farPlane
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setProjectionMatrix(projectionMatrix)#
- Parameters:
projectionMatrix –
PySide6.QtGui.QMatrix4x4
Sets the project matrix to projectionMatrix
.
Note
This will set the projection type to CustomProjection
and thus ignore all other camera parameters that might have been specified.
See also
Setter of property projectionMatrix
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setProjectionType(projectionType)#
- Parameters:
projectionType –
ProjectionType
Sets the lens’ projection type projectionType
.
Note
Qt3DRender::QCameraLens::Frustum and PerspectiveProjection
are two different ways of specifying the same projection.
See also
Setter of property projectionType
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setRight(right)#
- Parameters:
right – float
Sets the projection’s upper right window coordinate to right
. This triggers a projection matrix update.
Setter of property right
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.setTop(top)#
- Parameters:
top – float
Sets the projection’s top window coordinate to top
. This triggers a projection matrix update.
Setter of property top
.
Getter of property top
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.topChanged(top)#
- Parameters:
top – float
Notification signal of property top
.
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.viewAll(cameraId)#
- Parameters:
cameraId –
PySide6.Qt3DCore.Qt3DCore.QNodeId
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.viewEntity(entityId, cameraId)#
- Parameters:
entityId –
PySide6.Qt3DCore.Qt3DCore.QNodeId
cameraId –
PySide6.Qt3DCore.Qt3DCore.QNodeId
- PySide6.Qt3DRender.Qt3DRender.QCameraLens.viewSphere(center, radius)#
- Parameters:
center –
PySide6.QtGui.QVector3D
radius – float