QCameraLens¶
QCameraLens
specifies the projection matrix that will be used to define a Camera for a 3D scene. More…
Synopsis¶
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)
Detailed Description¶
- class PySide2.Qt3DRender.Qt3DRender.QCameraLens([parent=None])¶
- param parent:
Constructs a
QCameraLens
with givenparent
- PySide2.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
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.aspectRatio()¶
- Return type:
float
Holds the current aspect ratio of the camera lens.
Note
: The return value may be undefined if the projection type is not
PerspectiveProjection
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.aspectRatioChanged(aspectRatio)¶
- Parameters:
aspectRatio – float
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.bottom()¶
- Return type:
float
Holds the current bottom plane of the camera lens.
Note
The return value may be undefined if the projection type is
PerspectiveProjection
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.bottomChanged(bottom)¶
- Parameters:
bottom – float
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.exposure()¶
- Return type:
float
Holds the current exposure of the camera lens.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.exposureChanged(exposure)¶
- Parameters:
exposure – float
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.farPlane()¶
- Return type:
float
Holds the current near plane of the camera lens.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.farPlaneChanged(farPlane)¶
- Parameters:
farPlane – float
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.fieldOfView()¶
- Return type:
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
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.fieldOfViewChanged(fieldOfView)¶
- Parameters:
fieldOfView – float
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.left()¶
- Return type:
float
Holds the current left plane of the camera lens.
Note
The return value may be undefined if the projection type is
PerspectiveProjection
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.leftChanged(left)¶
- Parameters:
left – float
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.nearPlane()¶
- Return type:
float
Holds the current near plane of the camera lens.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.nearPlaneChanged(nearPlane)¶
- Parameters:
nearPlane – float
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.projectionMatrix()¶
- Return type:
Holds the current projection matrix of the camera lens.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.projectionMatrixChanged(projectionMatrix)¶
- Parameters:
projectionMatrix –
PySide2.QtGui.QMatrix4x4
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.projectionType()¶
- Return type:
Holds the type of the camera projection.
See also
ProjectionType
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.projectionTypeChanged(projectionType)¶
- Parameters:
projectionType –
ProjectionType
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.right()¶
- Return type:
float
Holds the current right plane of the camera lens.
Note
The return value may be undefined if the projection type is
PerspectiveProjection
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.rightChanged(right)¶
- Parameters:
right – float
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.setAspectRatio(aspectRatio)¶
- Parameters:
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
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.setBottom(bottom)¶
- Parameters:
bottom – float
Holds the current bottom plane of the camera lens.
Note
The return value may be undefined if the projection type is
PerspectiveProjection
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.setExposure(exposure)¶
- Parameters:
exposure – float
Holds the current exposure of the camera lens.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.setFarPlane(farPlane)¶
- Parameters:
farPlane – float
Holds the current near plane of the camera lens.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.setFieldOfView(fieldOfView)¶
- Parameters:
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
.
- PySide2.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
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.setLeft(left)¶
- Parameters:
left – float
Holds the current left plane of the camera lens.
Note
The return value may be undefined if the projection type is
PerspectiveProjection
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.setNearPlane(nearPlane)¶
- Parameters:
nearPlane – float
Holds the current near plane of the camera lens.
- PySide2.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
.
- PySide2.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
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.setProjectionMatrix(projectionMatrix)¶
- Parameters:
projectionMatrix –
PySide2.QtGui.QMatrix4x4
Holds the current projection matrix of the camera lens.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.setProjectionType(projectionType)¶
- Parameters:
projectionType –
ProjectionType
Holds the type of the camera projection.
See also
ProjectionType
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.setRight(right)¶
- Parameters:
right – float
Holds the current right plane of the camera lens.
Note
The return value may be undefined if the projection type is
PerspectiveProjection
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.setTop(top)¶
- Parameters:
top – float
Holds the current top plane of the camera lens.
Note
The return value may be undefined if the projection type is
PerspectiveProjection
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.top()¶
- Return type:
float
Holds the current top plane of the camera lens.
Note
The return value may be undefined if the projection type is
PerspectiveProjection
.
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.topChanged(top)¶
- Parameters:
top – float
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.viewAll(cameraId)¶
- Parameters:
cameraId –
PySide2.Qt3DCore.Qt3DCore.QNodeId
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.viewEntity(entityId, cameraId)¶
- Parameters:
entityId –
PySide2.Qt3DCore.Qt3DCore.QNodeId
cameraId –
PySide2.Qt3DCore.Qt3DCore.QNodeId
- PySide2.Qt3DRender.Qt3DRender.QCameraLens.viewSphere(center, radius)¶
- Parameters:
center –
PySide2.QtGui.QVector3D
radius – float
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.