QCameraLens¶

PyQt5.Qt3DRender.QCameraLens

Inherits from QComponent.

Description¶

QCameraLens specifies the projection matrix that will be used to define a Camera for a 3D scene.

Enums¶

ProjectionType

Specifies which parameters of QCameraLens are used to compute the projection matrix.

Member

Value

Description

CustomProjection

3

Custom user-defined projection

FrustumProjection

2

Frustum projection

OrthographicProjection

0

Orthogonal projection

PerspectiveProjection

1

Perspective projection

Methods¶

__init__(parent: QNode = None)

Constructs a QCameraLens with given parent


aspectRatio() → float

See also

setAspectRatio().


bottom() → float

See also

setBottom().


exposure() → float

See also

setExposure().


farPlane() → float

See also

setFarPlane().


fieldOfView() → float

See also

setFieldOfView().


left() → float

See also

setLeft().


nearPlane() → float

See also

setNearPlane().


projectionMatrix() → QMatrix4x4

projectionType() → ProjectionType

See also

setRight().


setAspectRatio(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

aspectRatio().


setBottom(float)

Sets the projection’s bottom window coordinate to bottom. This triggers a projection matrix update.

Note: this has no effect if the projection type is PerspectiveProjection.

See also

bottom().


setExposure(float)

Sets the camera lens’ exposure

See also

exposure().


setFarPlane(float)

Sets the projection’s far plane to farPlane. This triggers a projection matrix update.

See also

farPlane().


setFieldOfView(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

fieldOfView().


setFrustumProjection(float, float, float, float, float, float)

Defines an orthographic projection based on left, right, bottom, top, nearPlane, farPlane.


setLeft(float)

Sets the projection’s lower left window coordinate to left. This triggers a projection matrix update.

Note: this has no effect if the projection type is PerspectiveProjection.

See also

left().


setNearPlane(float)

Sets the projection’s near plane to nearPlane. This triggers a projection matrix update.

See also

nearPlane().


setOrthographicProjection(float, float, float, float, float, float)

Defines an orthographic projection based on left, right, bottom, top, nearPlane, farPlane.


setPerspectiveProjection(float, float, float, float)

Defines a perspective projection based on fieldOfView, aspectRatio, nearPlane, farPlane.


setProjectionMatrix(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

projectionMatrix().


setProjectionType(ProjectionType)

Sets the lens’ projection type projectionType.

Note: Qt3DRender::QCameraLens::Frustum and PerspectiveProjection are two different ways of specifying the same projection.

See also

projectionType().


setRight(float)

Sets the projection’s upper right window coordinate to right. This triggers a projection matrix update.

Note: this has no effect if the projection type is PerspectiveProjection.

See also

right().


setTop(float)

Sets the projection’s top window coordinate to top. This triggers a projection matrix update.

Note: this has no effect if the projection type is PerspectiveProjection.

See also

top().


top() → float

See also

setTop().


viewAll(QNodeId)

TODO


viewEntity(QNodeId, QNodeId)

TODO

Signals¶

aspectRatioChanged(float)

TODO


bottomChanged(float)

TODO


exposureChanged(float)

TODO


farPlaneChanged(float)

TODO


fieldOfViewChanged(float)

TODO


leftChanged(float)

TODO


nearPlaneChanged(float)

TODO


projectionMatrixChanged(QMatrix4x4)

TODO


projectionTypeChanged(ProjectionType)

TODO


rightChanged(float)

TODO


topChanged(float)

TODO


viewSphere(QVector3D, float)

TODO