QCamera

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

Inheritance diagram of PySide6.Qt3DRender.Qt3DRender.QCamera

Synopsis

Functions

Detailed Description

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

parentPySide6.Qt3DCore.Qt3DCore.QNode

Creates a new QCamera instance with the specified parent.

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

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

float

See also

setAspectRatio()

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

aspectRatio – float

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

float

See also

setBottom()

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

bottom – float

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

float

See also

setExposure()

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

exposure – float

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

float

See also

setFarPlane()

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

farPlane – float

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

float

See also

setFieldOfView()

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

fieldOfView – float

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

float

See also

setLeft()

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

left – float

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

PySide6.Qt3DRender.Qt3DRender.QCameraLens

Returns the current lens.

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

float

See also

setNearPlane()

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

nearPlane – float

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

angle – float

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

PySide6.Qt3DRender.Qt3DRender.QCamera.pan(angle, axis)
Parameters

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

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

angle – float

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

PySide6.Qt3DRender.Qt3DRender.QCamera.panAboutViewCenter(angle, axis)
Parameters

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

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

angle – float

Return type

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

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

PySide6.QtGui.QVector3D

See also

setPosition()

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

positionPySide6.QtGui.QVector3D

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

PySide6.QtGui.QMatrix4x4

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

projectionMatrixPySide6.QtGui.QMatrix4x4

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

ProjectionType

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

projectionTypeProjectionType

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

float

See also

setRight()

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

right – float

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

angle – float

Adjusts the camera roll by angle in degrees.

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

angle – float

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

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

angle – float

Return type

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

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

qPySide6.QtGui.QQuaternion

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

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

qPySide6.QtGui.QQuaternion

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

PySide6.Qt3DRender.Qt3DRender.QCamera.rotation(angle, axis)
Parameters
Return type

PySide6.QtGui.QQuaternion

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

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

aspectRatio – float

Sets the camera’s aspect ratio to aspectRatio.

See also

aspectRatio()

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

bottom – float

Sets the bottom of the camera to bottom.

See also

bottom()

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

exposure – float

Sets the camera’s exposure to exposure.

See also

exposure()

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

farPlane – float

Sets the camera’s far plane to farPlane

See also

farPlane()

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

fieldOfView – float

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

See also

fieldOfView()

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

left – float

Sets the left of the camera to left.

See also

left()

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

nearPlane – float

Sets the camera’s near plane to nearPlane.

See also

nearPlane()

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

positionPySide6.QtGui.QVector3D

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

See also

position()

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

projectionMatrixPySide6.QtGui.QMatrix4x4

Sets the camera’s projection matrix to projectionMatrix.

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

typeProjectionType

Sets the camera’s projection type to type.

See also

projectionType()

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

right – float

Sets the right of the camera to right.

See also

right()

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

top – float

Sets the top of the camera to top.

See also

top()

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

upVectorPySide6.QtGui.QVector3D

Sets the camera’s up vector to upVector.

See also

upVector()

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

viewCenterPySide6.QtGui.QVector3D

Sets the camera’s view center to viewCenter.

See also

viewCenter()

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

angle – float

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

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

angle – float

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

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

angle – float

Return type

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

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

float

See also

setTop()

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

top – float

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

PySide6.Qt3DCore.Qt3DCore.QTransform

Returns the camera’s position via transform.

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

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

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

PySide6.QtGui.QVector3D

See also

setUpVector()

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

upVectorPySide6.QtGui.QVector3D

PySide6.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 or orthographic projection mode.

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

PySide6.QtGui.QVector3D

See also

setViewCenter()

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

viewCenterPySide6.QtGui.QVector3D

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

entityPySide6.Qt3DCore.Qt3DCore.QEntity

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 or orthographic projection mode.

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

PySide6.QtGui.QMatrix4x4

PySide6.Qt3DRender.Qt3DRender.QCamera.viewMatrixChanged()
PySide6.Qt3DRender.Qt3DRender.QCamera.viewSphere(center, radius)
Parameters

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 or orthographic projection mode.

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

PySide6.QtGui.QVector3D

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

viewVectorPySide6.QtGui.QVector3D