Qt3DRender.QCamera

The QCamera class defines a view point through which the scene will be rendered. More

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QCamera

Synopsis

Functions

Slots

Signals

Detailed Description

class PySide2.Qt3DRender.Qt3DRender.QCamera([parent=None])
param parent

QNode

Creates a new QCamera instance with the specified parent .

PySide2.Qt3DRender.Qt3DRender.QCamera.CameraTranslationOption

This enum specifies how camera view center is translated

Constant

Description

Qt3DRender.QCamera.TranslateViewCenter

Translate the view center causing the view direction to remain the same

Qt3DRender.QCamera.DontTranslateViewCenter

Don’t translate the view center causing the view direction to change

PySide2.Qt3DRender.Qt3DRender.QCamera.aspectRatio()
Return type

float

See also

setAspectRatio()

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

aspectRatiofloat

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

float

See also

setBottom()

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

bottomfloat

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

float

See also

setExposure()

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

exposurefloat

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

float

See also

setFarPlane()

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

farPlanefloat

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

float

See also

setFieldOfView()

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

fieldOfViewfloat

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

float

See also

setLeft()

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

leftfloat

PySide2.Qt3DRender.Qt3DRender.QCamera.lens()
Return type

QCameraLens

Returns the current lens.

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

float

See also

setNearPlane()

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

nearPlanefloat

PySide2.Qt3DRender.Qt3DRender.QCamera.pan(angle)
Parameters

anglefloat

Adjusts the pan angle of the camera by angle in degrees.

PySide2.Qt3DRender.Qt3DRender.QCamera.pan(angle, axis)
Parameters
  • anglefloat

  • axisQVector3D

Adjusts the pan angle of the camera by angle in degrees on a chosen axis .

PySide2.Qt3DRender.Qt3DRender.QCamera.panAboutViewCenter(angle)
Parameters

anglefloat

Adjusts the camera pan about view center by angle in degrees.

PySide2.Qt3DRender.Qt3DRender.QCamera.panAboutViewCenter(angle, axis)
Parameters
  • anglefloat

  • axisQVector3D

Adjusts the camera pan about view center by angle in degrees on axis .

PySide2.Qt3DRender.Qt3DRender.QCamera.panRotation(angle)
Parameters

anglefloat

Return type

QQuaternion

Returns the calculated pan rotation in relation to the angle in degrees taken in to adjust the camera’s pan or left/right rotation on the Y axis.

PySide2.Qt3DRender.Qt3DRender.QCamera.position()
Return type

QVector3D

See also

setPosition()

PySide2.Qt3DRender.Qt3DRender.QCamera.positionChanged(position)
Parameters

positionQVector3D

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

QMatrix4x4

See also

setProjectionMatrix()

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

projectionMatrixQMatrix4x4

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

ProjectionType

See also

setProjectionType()

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

projectionTypeProjectionType

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

float

See also

setRight()

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

rightfloat

PySide2.Qt3DRender.Qt3DRender.QCamera.roll(angle)
Parameters

anglefloat

Adjusts the camera roll by angle in degrees.

PySide2.Qt3DRender.Qt3DRender.QCamera.rollAboutViewCenter(angle)
Parameters

anglefloat

Adjusts the camera roll about view center by angle in degrees.

PySide2.Qt3DRender.Qt3DRender.QCamera.rollRotation(angle)
Parameters

anglefloat

Return type

QQuaternion

Returns the calculated roll rotation in relation to the angle in degrees taken in to adjust the camera’s roll or lean left/right rotation on the Z axis.

PySide2.Qt3DRender.Qt3DRender.QCamera.rotate(q)
Parameters

qQQuaternion

Rotates the camera with the use of a Quaternion in q .

PySide2.Qt3DRender.Qt3DRender.QCamera.rotateAboutViewCenter(q)
Parameters

qQQuaternion

Rotates the camera about the view center with the use of a Quaternion in q .

PySide2.Qt3DRender.Qt3DRender.QCamera.rotation(angle, axis)
Parameters
  • anglefloat

  • axisQVector3D

Return type

QQuaternion

Returns the calculated rotation in relation to the angle in degrees and chosen axis taken in.

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

aspectRatiofloat

Sets the camera’s aspect ratio to aspectRatio .

See also

aspectRatio()

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

bottomfloat

Sets the bottom of the camera to bottom .

See also

bottom()

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

exposurefloat

Sets the camera’s exposure to exposure .

See also

exposure()

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

farPlanefloat

Sets the camera’s far plane to farPlane

See also

farPlane()

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

fieldOfViewfloat

Sets the camera’s field of view to fieldOfView in degrees.

See also

fieldOfView()

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

leftfloat

Sets the left of the camera to left .

See also

left()

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

nearPlanefloat

Sets the camera’s near plane to nearPlane .

See also

nearPlane()

PySide2.Qt3DRender.Qt3DRender.QCamera.setPosition(position)
Parameters

positionQVector3D

Sets the camera’s position in 3D space to position .

See also

position()

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

projectionMatrixQMatrix4x4

Sets the camera’s projection matrix to projectionMatrix .

See also

projectionMatrix()

PySide2.Qt3DRender.Qt3DRender.QCamera.setProjectionType(type)
Parameters

typeProjectionType

Sets the camera’s projection type to type .

See also

projectionType()

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

rightfloat

Sets the right of the camera to right .

See also

right()

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

topfloat

Sets the top of the camera to top .

See also

top()

PySide2.Qt3DRender.Qt3DRender.QCamera.setUpVector(upVector)
Parameters

upVectorQVector3D

Sets the camera’s up vector to upVector .

See also

upVector()

PySide2.Qt3DRender.Qt3DRender.QCamera.setViewCenter(viewCenter)
Parameters

viewCenterQVector3D

Sets the camera’s view center to viewCenter .

See also

viewCenter()

PySide2.Qt3DRender.Qt3DRender.QCamera.tilt(angle)
Parameters

anglefloat

Adjusts the tilt angle of the camera by angle in degrees.

PySide2.Qt3DRender.Qt3DRender.QCamera.tiltAboutViewCenter(angle)
Parameters

anglefloat

Adjusts the camera tilt about view center by angle in degrees.

PySide2.Qt3DRender.Qt3DRender.QCamera.tiltRotation(angle)
Parameters

anglefloat

Return type

QQuaternion

Returns the calculated tilt rotation in relation to the angle in degrees taken in to adjust the camera’s tilt or up/down rotation on the X axis.

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

float

See also

setTop()

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

topfloat

PySide2.Qt3DRender.Qt3DRender.QCamera.transform()
Return type

QTransform

Returns the camera’s position via transform.

PySide2.Qt3DRender.Qt3DRender.QCamera.translate(vLocal[, option=TranslateViewCenter])
Parameters

Translates the camera’s position and its view vector by vLocal in local coordinates. The option allows for toggling whether the view center should be translated.

PySide2.Qt3DRender.Qt3DRender.QCamera.translateWorld(vWorld[, option=TranslateViewCenter])
Parameters

Translates the camera’s position and its view vector by vWorld in world coordinates. The option allows for toggling whether the view center should be translated.

PySide2.Qt3DRender.Qt3DRender.QCamera.upVector()
Return type

QVector3D

See also

setUpVector()

PySide2.Qt3DRender.Qt3DRender.QCamera.upVectorChanged(upVector)
Parameters

upVectorQVector3D

PySide2.Qt3DRender.Qt3DRender.QCamera.viewAll()

Rotates and moves the camera so that it’s viewCenter is the center of the scene’s bounding volume and the entire scene fits in the view port.

Note

Only works if the lens is in perspective projection mode.

See also

Qt3D.Render::Camera::projectionType

PySide2.Qt3DRender.Qt3DRender.QCamera.viewCenter()
Return type

QVector3D

See also

setViewCenter()

PySide2.Qt3DRender.Qt3DRender.QCamera.viewCenterChanged(viewCenter)
Parameters

viewCenterQVector3D

PySide2.Qt3DRender.Qt3DRender.QCamera.viewEntity(entity)
Parameters

entityQEntity

Rotates and moves the camera so that it’s viewCenter is the center of the entity ‘s bounding volume and the entire entity fits in the view port.

Note

Only works if the lens is in perspective projection mode.

See also

Camera.projectionType

PySide2.Qt3DRender.Qt3DRender.QCamera.viewMatrix()
Return type

QMatrix4x4

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

  • radiusfloat

Rotates and moves the camera so that it’s viewCenter is center and a sphere of radius fits in the view port.

Note

Only works if the lens is in perspective projection mode.

See also

Qt3D.Render::Camera::projectionType

PySide2.Qt3DRender.Qt3DRender.QCamera.viewVector()
Return type

QVector3D

PySide2.Qt3DRender.Qt3DRender.QCamera.viewVectorChanged(viewVector)
Parameters

viewVectorQVector3D