Qt3DRender.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])
param parent

QNode

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

See also

setAspectRatio()

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

aspectRatiofloat

PySide2.Qt3DRender.Qt3DRender.QCameraLens.bottom()
Return type

float

See also

setBottom()

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

bottomfloat

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

float

See also

setExposure()

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

exposurefloat

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

float

See also

setFarPlane()

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

farPlanefloat

PySide2.Qt3DRender.Qt3DRender.QCameraLens.fieldOfView()
Return type

float

See also

setFieldOfView()

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

fieldOfViewfloat

PySide2.Qt3DRender.Qt3DRender.QCameraLens.left()
Return type

float

See also

setLeft()

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

leftfloat

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

float

See also

setNearPlane()

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

nearPlanefloat

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

QMatrix4x4

See also

setProjectionMatrix()

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

projectionMatrixQMatrix4x4

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

ProjectionType

See also

setProjectionType()

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

projectionTypeProjectionType

PySide2.Qt3DRender.Qt3DRender.QCameraLens.right()
Return type

float

See also

setRight()

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

rightfloat

PySide2.Qt3DRender.Qt3DRender.QCameraLens.setAspectRatio(aspectRatio)
Parameters

aspectRatiofloat

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

PySide2.Qt3DRender.Qt3DRender.QCameraLens.setBottom(bottom)
Parameters

bottomfloat

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

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

exposurefloat

Sets the camera lens’ exposure

See also

exposure()

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

farPlanefloat

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

See also

farPlane()

PySide2.Qt3DRender.Qt3DRender.QCameraLens.setFieldOfView(fieldOfView)
Parameters

fieldOfViewfloat

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

PySide2.Qt3DRender.Qt3DRender.QCameraLens.setFrustumProjection(left, right, bottom, top, nearPlane, farPlane)
Parameters
  • leftfloat

  • rightfloat

  • bottomfloat

  • topfloat

  • nearPlanefloat

  • farPlanefloat

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

PySide2.Qt3DRender.Qt3DRender.QCameraLens.setLeft(left)
Parameters

leftfloat

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

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

nearPlanefloat

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

See also

nearPlane()

PySide2.Qt3DRender.Qt3DRender.QCameraLens.setOrthographicProjection(left, right, bottom, top, nearPlane, farPlane)
Parameters
  • leftfloat

  • rightfloat

  • bottomfloat

  • topfloat

  • nearPlanefloat

  • farPlanefloat

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

PySide2.Qt3DRender.Qt3DRender.QCameraLens.setPerspectiveProjection(fieldOfView, aspect, nearPlane, farPlane)
Parameters
  • fieldOfViewfloat

  • aspectfloat

  • nearPlanefloat

  • farPlanefloat

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

PySide2.Qt3DRender.Qt3DRender.QCameraLens.setProjectionMatrix(projectionMatrix)
Parameters

projectionMatrixQMatrix4x4

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

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

projectionTypeProjectionType

Sets the lens’ projection type projectionType .

Note

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

See also

projectionType()

PySide2.Qt3DRender.Qt3DRender.QCameraLens.setRight(right)
Parameters

rightfloat

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

PySide2.Qt3DRender.Qt3DRender.QCameraLens.setTop(top)
Parameters

topfloat

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

PySide2.Qt3DRender.Qt3DRender.QCameraLens.top()
Return type

float

See also

setTop()

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

topfloat

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

cameraIdQNodeId

PySide2.Qt3DRender.Qt3DRender.QCameraLens.viewEntity(entityId, cameraId)
Parameters
  • entityIdQNodeId

  • cameraIdQNodeId

PySide2.Qt3DRender.Qt3DRender.QCameraLens.viewSphere(center, radius)
Parameters
  • centerQVector3D

  • radiusfloat