QCameraLens¶

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

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QCameraLens

Synopsis¶

Functions¶

Slots¶

Signals¶

Detailed Description¶

class PySide2.Qt3DRender.Qt3DRender.QCameraLens([parent=None])¶

Constructs a QCameraLens with given parent

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:

PySide2.QtGui.QMatrix4x4

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:

ProjectionType

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:
PySide2.Qt3DRender.Qt3DRender.QCameraLens.viewSphere(center, radius)¶
Parameters: