Qt3DRender.QCamera¶
Synopsis¶
Functions¶
def
aspectRatio
()def
bottom
()def
exposure
()def
farPlane
()def
fieldOfView
()def
left
()def
lens
()def
nearPlane
()def
pan
(angle)def
pan
(angle, axis)def
panAboutViewCenter
(angle)def
panAboutViewCenter
(angle, axis)def
panRotation
(angle)def
position
()def
projectionMatrix
()def
projectionType
()def
right
()def
roll
(angle)def
rollAboutViewCenter
(angle)def
rollRotation
(angle)def
rotate
(q)def
rotateAboutViewCenter
(q)def
rotation
(angle, axis)def
tilt
(angle)def
tiltAboutViewCenter
(angle)def
tiltRotation
(angle)def
top
()def
transform
()def
translate
(vLocal[, option=TranslateViewCenter])def
translateWorld
(vWorld[, option=TranslateViewCenter])def
upVector
()def
viewCenter
()def
viewMatrix
()def
viewVector
()
Slots¶
def
setAspectRatio
(aspectRatio)def
setBottom
(bottom)def
setExposure
(exposure)def
setFarPlane
(farPlane)def
setFieldOfView
(fieldOfView)def
setLeft
(left)def
setNearPlane
(nearPlane)def
setPosition
(position)def
setProjectionMatrix
(projectionMatrix)def
setProjectionType
(type)def
setRight
(right)def
setTop
(top)def
setUpVector
(upVector)def
setViewCenter
(viewCenter)def
viewAll
()def
viewEntity
(entity)def
viewSphere
(center, radius)
Signals¶
def
aspectRatioChanged
(aspectRatio)def
bottomChanged
(bottom)def
exposureChanged
(exposure)def
farPlaneChanged
(farPlane)def
fieldOfViewChanged
(fieldOfView)def
leftChanged
(left)def
nearPlaneChanged
(nearPlane)def
positionChanged
(position)def
projectionMatrixChanged
(projectionMatrix)def
projectionTypeChanged
(projectionType)def
rightChanged
(right)def
topChanged
(top)def
upVectorChanged
(upVector)def
viewCenterChanged
(viewCenter)def
viewMatrixChanged
()def
viewVectorChanged
(viewVector)
Detailed Description¶
-
class
PySide2.Qt3DRender.Qt3DRender.
QCamera
([parent=None])¶ - param parent
QNode
Creates a new
QCamera
instance with the specifiedparent
.
-
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
aspectRatio –
float
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
bottom
()¶ - Return type
float
See also
setBottom()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
bottomChanged
(bottom)¶ - Parameters
bottom –
float
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
exposure
()¶ - Return type
float
See also
setExposure()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
exposureChanged
(exposure)¶ - Parameters
exposure –
float
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
farPlane
()¶ - Return type
float
See also
setFarPlane()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
farPlaneChanged
(farPlane)¶ - Parameters
farPlane –
float
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
fieldOfView
()¶ - Return type
float
See also
setFieldOfView()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
fieldOfViewChanged
(fieldOfView)¶ - Parameters
fieldOfView –
float
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
left
()¶ - Return type
float
See also
setLeft()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
leftChanged
(left)¶ - Parameters
left –
float
-
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
nearPlane –
float
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
pan
(angle)¶ - Parameters
angle –
float
Adjusts the pan angle of the camera by
angle
in degrees.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
pan
(angle, axis) - Parameters
angle –
float
axis –
QVector3D
Adjusts the pan angle of the camera by
angle
in degrees on a chosenaxis
.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
panAboutViewCenter
(angle)¶ - Parameters
angle –
float
Adjusts the camera pan about view center by
angle
in degrees.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
panAboutViewCenter
(angle, axis) - Parameters
angle –
float
axis –
QVector3D
Adjusts the camera pan about view center by
angle
in degrees onaxis
.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
panRotation
(angle)¶ - Parameters
angle –
float
- 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
position –
QVector3D
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
projectionMatrix
()¶ - Return type
QMatrix4x4
See also
setProjectionMatrix()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
projectionMatrixChanged
(projectionMatrix)¶ - Parameters
projectionMatrix –
QMatrix4x4
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
projectionType
()¶ - Return type
ProjectionType
See also
setProjectionType()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
projectionTypeChanged
(projectionType)¶ - Parameters
projectionType –
ProjectionType
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
right
()¶ - Return type
float
See also
setRight()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
rightChanged
(right)¶ - Parameters
right –
float
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
roll
(angle)¶ - Parameters
angle –
float
Adjusts the camera roll by
angle
in degrees.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
rollAboutViewCenter
(angle)¶ - Parameters
angle –
float
Adjusts the camera roll about view center by
angle
in degrees.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
rollRotation
(angle)¶ - Parameters
angle –
float
- 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
q –
QQuaternion
Rotates the camera with the use of a Quaternion in
q
.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
rotateAboutViewCenter
(q)¶ - Parameters
q –
QQuaternion
Rotates the camera about the view center with the use of a Quaternion in
q
.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
rotation
(angle, axis)¶ - Parameters
angle –
float
axis –
QVector3D
- Return type
QQuaternion
Returns the calculated rotation in relation to the
angle
in degrees and chosenaxis
taken in.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setAspectRatio
(aspectRatio)¶ - Parameters
aspectRatio –
float
Sets the camera’s aspect ratio to
aspectRatio
.See also
aspectRatio()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setBottom
(bottom)¶ - Parameters
bottom –
float
Sets the bottom of the camera to
bottom
.See also
bottom()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setExposure
(exposure)¶ - Parameters
exposure –
float
Sets the camera’s exposure to
exposure
.See also
exposure()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setFarPlane
(farPlane)¶ - Parameters
farPlane –
float
Sets the camera’s far plane to
farPlane
See also
farPlane()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setFieldOfView
(fieldOfView)¶ - Parameters
fieldOfView –
float
Sets the camera’s field of view to
fieldOfView
in degrees.See also
fieldOfView()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setLeft
(left)¶ - Parameters
left –
float
Sets the left of the camera to
left
.See also
left()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setNearPlane
(nearPlane)¶ - Parameters
nearPlane –
float
Sets the camera’s near plane to
nearPlane
.See also
nearPlane()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setPosition
(position)¶ - Parameters
position –
QVector3D
Sets the camera’s position in 3D space to
position
.See also
position()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setProjectionMatrix
(projectionMatrix)¶ - Parameters
projectionMatrix –
QMatrix4x4
Sets the camera’s projection matrix to
projectionMatrix
.See also
projectionMatrix()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setProjectionType
(type)¶ - Parameters
type –
ProjectionType
Sets the camera’s projection type to
type
.See also
projectionType()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setRight
(right)¶ - Parameters
right –
float
Sets the right of the camera to
right
.See also
right()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setTop
(top)¶ - Parameters
top –
float
Sets the top of the camera to
top
.See also
top()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setUpVector
(upVector)¶ - Parameters
upVector –
QVector3D
Sets the camera’s up vector to
upVector
.See also
upVector()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
setViewCenter
(viewCenter)¶ - Parameters
viewCenter –
QVector3D
Sets the camera’s view center to
viewCenter
.See also
viewCenter()
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
tilt
(angle)¶ - Parameters
angle –
float
Adjusts the tilt angle of the camera by
angle
in degrees.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
tiltAboutViewCenter
(angle)¶ - Parameters
angle –
float
Adjusts the camera tilt about view center by
angle
in degrees.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
tiltRotation
(angle)¶ - Parameters
angle –
float
- 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
top –
float
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
transform
()¶ - Return type
QTransform
Returns the camera’s position via transform.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
translate
(vLocal[, option=TranslateViewCenter])¶ - Parameters
vLocal –
QVector3D
option –
CameraTranslationOption
Translates the camera’s position and its view vector by
vLocal
in local coordinates. Theoption
allows for toggling whether the view center should be translated.
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
translateWorld
(vWorld[, option=TranslateViewCenter])¶ - Parameters
vWorld –
QVector3D
option –
CameraTranslationOption
Translates the camera’s position and its view vector by
vWorld
in world coordinates. Theoption
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
upVector –
QVector3D
-
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
viewCenter –
QVector3D
-
PySide2.Qt3DRender.Qt3DRender.QCamera.
viewEntity
(entity)¶ - Parameters
entity –
QEntity
Rotates and moves the camera so that it’s
viewCenter
is the center of theentity
‘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
center –
QVector3D
radius –
float
Rotates and moves the camera so that it’s
viewCenter
iscenter
and a sphere ofradius
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
viewVector –
QVector3D
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.