QCameraLens

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

Inheritance diagram of PySide6.Qt3DRender.Qt3DRender.QCameraLens

Synopsis

Functions

Slots

Signals

Detailed Description

class PySide6.Qt3DRender.Qt3DRender.QCameraLens([parent=None])
Parameters

parentPySide6.Qt3DCore.Qt3DCore.QNode

Constructs a QCameraLens with given parent

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

Holds the current aspect ratio of the camera lens.

Note

: The return value may be undefined if the projection type is not PerspectiveProjection .

PySide6.Qt3DRender.Qt3DRender.QCameraLens.aspectRatioChanged(aspectRatio)
Parameters

aspectRatio – float

PySide6.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 .

PySide6.Qt3DRender.Qt3DRender.QCameraLens.bottomChanged(bottom)
Parameters

bottom – float

PySide6.Qt3DRender.Qt3DRender.QCameraLens.exposure()
Return type

float

Holds the current exposure of the camera lens.

PySide6.Qt3DRender.Qt3DRender.QCameraLens.exposureChanged(exposure)
Parameters

exposure – float

PySide6.Qt3DRender.Qt3DRender.QCameraLens.farPlane()
Return type

float

Holds the current near plane of the camera lens.

PySide6.Qt3DRender.Qt3DRender.QCameraLens.farPlaneChanged(farPlane)
Parameters

farPlane – float

PySide6.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 .

PySide6.Qt3DRender.Qt3DRender.QCameraLens.fieldOfViewChanged(fieldOfView)
Parameters

fieldOfView – float

PySide6.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 .

PySide6.Qt3DRender.Qt3DRender.QCameraLens.leftChanged(left)
Parameters

left – float

PySide6.Qt3DRender.Qt3DRender.QCameraLens.nearPlane()
Return type

float

Holds the current near plane of the camera lens.

PySide6.Qt3DRender.Qt3DRender.QCameraLens.nearPlaneChanged(nearPlane)
Parameters

nearPlane – float

PySide6.Qt3DRender.Qt3DRender.QCameraLens.projectionMatrix()
Return type

PySide6.QtGui.QMatrix4x4

Holds the current projection matrix of the camera lens.

PySide6.Qt3DRender.Qt3DRender.QCameraLens.projectionMatrixChanged(projectionMatrix)
Parameters

projectionMatrixPySide6.QtGui.QMatrix4x4

PySide6.Qt3DRender.Qt3DRender.QCameraLens.projectionType()
Return type

ProjectionType

Holds the type of the camera projection.

See also

ProjectionType

PySide6.Qt3DRender.Qt3DRender.QCameraLens.projectionTypeChanged(projectionType)
Parameters

projectionTypeProjectionType

PySide6.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 .

PySide6.Qt3DRender.Qt3DRender.QCameraLens.rightChanged(right)
Parameters

right – float

PySide6.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 .

PySide6.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 .

PySide6.Qt3DRender.Qt3DRender.QCameraLens.setExposure(exposure)
Parameters

exposure – float

Holds the current exposure of the camera lens.

PySide6.Qt3DRender.Qt3DRender.QCameraLens.setFarPlane(farPlane)
Parameters

farPlane – float

Holds the current near plane of the camera lens.

PySide6.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 .

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

Holds the current left plane of the camera lens.

Note

The return value may be undefined if the projection type is PerspectiveProjection .

PySide6.Qt3DRender.Qt3DRender.QCameraLens.setNearPlane(nearPlane)
Parameters

nearPlane – float

Holds the current near plane of the camera lens.

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

projectionMatrixPySide6.QtGui.QMatrix4x4

Holds the current projection matrix of the camera lens.

PySide6.Qt3DRender.Qt3DRender.QCameraLens.setProjectionType(projectionType)
Parameters

projectionTypeProjectionType

Holds the type of the camera projection.

See also

ProjectionType

PySide6.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 .

PySide6.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 .

PySide6.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 .

PySide6.Qt3DRender.Qt3DRender.QCameraLens.topChanged(top)
Parameters

top – float

PySide6.Qt3DRender.Qt3DRender.QCameraLens.viewAll(cameraId)
Parameters

cameraIdPySide6.Qt3DCore.Qt3DCore.QNodeId

PySide6.Qt3DRender.Qt3DRender.QCameraLens.viewEntity(entityId, cameraId)
Parameters
PySide6.Qt3DRender.Qt3DRender.QCameraLens.viewSphere(center, radius)
Parameters