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
()
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)
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)
PySide2.Qt3DRender.Qt3DRender.
QCamera
(
[
parent=None
]
)
¶
- param parent
QNode
创建新
QCamera
instance with the specified
parent
.
PySide2.Qt3DRender.Qt3DRender.QCamera.
CameraTranslationOption
¶
This enum specifies how camera view center is translated
|
常量 |
描述 |
|---|---|
|
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
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
aspectRatioChanged
(
aspectRatio
)
¶
aspectRatio
–
float
PySide2.Qt3DRender.Qt3DRender.QCamera.
bottom
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
bottomChanged
(
bottom
)
¶
bottom
–
float
PySide2.Qt3DRender.Qt3DRender.QCamera.
exposure
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
exposureChanged
(
exposure
)
¶
exposure
–
float
PySide2.Qt3DRender.Qt3DRender.QCamera.
farPlane
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
farPlaneChanged
(
farPlane
)
¶
farPlane
–
float
PySide2.Qt3DRender.Qt3DRender.QCamera.
fieldOfView
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
fieldOfViewChanged
(
fieldOfView
)
¶
fieldOfView
–
float
PySide2.Qt3DRender.Qt3DRender.QCamera.
leftChanged
(
left
)
¶
left
–
float
PySide2.Qt3DRender.Qt3DRender.QCamera.
lens
(
)
¶
QCameraLens
Returns the current lens.
PySide2.Qt3DRender.Qt3DRender.QCamera.
nearPlane
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
nearPlaneChanged
(
nearPlane
)
¶
nearPlane
–
float
PySide2.Qt3DRender.Qt3DRender.QCamera.
pan
(
angle
)
¶
angle
–
float
Adjusts the pan angle of the camera by
angle
in degrees.
PySide2.Qt3DRender.Qt3DRender.QCamera.
pan
(
angle
,
axis
)
¶
angle
–
float
axis
–
QVector3D
Adjusts the pan angle of the camera by
angle
in degrees on a chosen
axis
.
PySide2.Qt3DRender.Qt3DRender.QCamera.
panAboutViewCenter
(
angle
)
¶
angle
–
float
Adjusts the camera pan about view center by
angle
in degrees.
PySide2.Qt3DRender.Qt3DRender.QCamera.
panAboutViewCenter
(
angle
,
axis
)
¶
angle
–
float
axis
–
QVector3D
Adjusts the camera pan about view center by
angle
in degrees on
axis
.
PySide2.Qt3DRender.Qt3DRender.QCamera.
panRotation
(
angle
)
¶
angle
–
float
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
(
)
¶
QVector3D
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
positionChanged
(
position
)
¶
position
–
QVector3D
PySide2.Qt3DRender.Qt3DRender.QCamera.
projectionMatrix
(
)
¶
QMatrix4x4
PySide2.Qt3DRender.Qt3DRender.QCamera.
projectionMatrixChanged
(
projectionMatrix
)
¶
projectionMatrix
–
QMatrix4x4
PySide2.Qt3DRender.Qt3DRender.QCamera.
projectionType
(
)
¶
ProjectionType
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
projectionTypeChanged
(
projectionType
)
¶
projectionType
–
ProjectionType
PySide2.Qt3DRender.Qt3DRender.QCamera.
right
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
rightChanged
(
right
)
¶
right
–
float
PySide2.Qt3DRender.Qt3DRender.QCamera.
roll
(
angle
)
¶
angle
–
float
Adjusts the camera roll by
angle
in degrees.
PySide2.Qt3DRender.Qt3DRender.QCamera.
rollAboutViewCenter
(
angle
)
¶
angle
–
float
Adjusts the camera roll about view center by
angle
in degrees.
PySide2.Qt3DRender.Qt3DRender.QCamera.
rollRotation
(
angle
)
¶
angle
–
float
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
)
¶
q
–
QQuaternion
Rotates the camera with the use of a Quaternion in
q
.
PySide2.Qt3DRender.Qt3DRender.QCamera.
rotateAboutViewCenter
(
q
)
¶
q
–
QQuaternion
Rotates the camera about the view center with the use of a Quaternion in
q
.
PySide2.Qt3DRender.Qt3DRender.QCamera.
rotation
(
angle
,
axis
)
¶
angle
–
float
axis
–
QVector3D
QQuaternion
Returns the calculated rotation in relation to the
angle
in degrees and chosen
axis
taken in.
PySide2.Qt3DRender.Qt3DRender.QCamera.
setAspectRatio
(
aspectRatio
)
¶
aspectRatio
–
float
Sets the camera’s aspect ratio to
aspectRatio
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setBottom
(
bottom
)
¶
bottom
–
float
Sets the bottom of the camera to
bottom
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setExposure
(
exposure
)
¶
exposure
–
float
Sets the camera’s exposure to
exposure
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setFarPlane
(
farPlane
)
¶
farPlane
–
float
Sets the camera’s far plane to
farPlane
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setFieldOfView
(
fieldOfView
)
¶
fieldOfView
–
float
Sets the camera’s field of view to
fieldOfView
in degrees.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setLeft
(
left
)
¶
left
–
float
Sets the left of the camera to
left
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setNearPlane
(
nearPlane
)
¶
nearPlane
–
float
Sets the camera’s near plane to
nearPlane
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setPosition
(
position
)
¶
position
–
QVector3D
Sets the camera’s position in 3D space to
position
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setProjectionMatrix
(
projectionMatrix
)
¶
projectionMatrix
–
QMatrix4x4
Sets the camera’s projection matrix to
projectionMatrix
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setProjectionType
(
type
)
¶
type
–
ProjectionType
Sets the camera’s projection type to
type
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setRight
(
right
)
¶
right
–
float
Sets the right of the camera to
right
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setTop
(
top
)
¶
top
–
float
Sets the top of the camera to
top
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setUpVector
(
upVector
)
¶
upVector
–
QVector3D
Sets the camera’s up vector to
upVector
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
setViewCenter
(
viewCenter
)
¶
viewCenter
–
QVector3D
Sets the camera’s view center to
viewCenter
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
tilt
(
angle
)
¶
angle
–
float
Adjusts the tilt angle of the camera by
angle
in degrees.
PySide2.Qt3DRender.Qt3DRender.QCamera.
tiltAboutViewCenter
(
angle
)
¶
angle
–
float
Adjusts the camera tilt about view center by
angle
in degrees.
PySide2.Qt3DRender.Qt3DRender.QCamera.
tiltRotation
(
angle
)
¶
angle
–
float
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.
topChanged
(
top
)
¶
top
–
float
PySide2.Qt3DRender.Qt3DRender.QCamera.
transform
(
)
¶
QTransform
Returns the camera’s position via transform.
PySide2.Qt3DRender.Qt3DRender.QCamera.
translate
(
vLocal
[
,
option=TranslateViewCenter
]
)
¶
vLocal
–
QVector3D
option
–
CameraTranslationOption
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
]
)
¶
vWorld
–
QVector3D
option
–
CameraTranslationOption
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
(
)
¶
QVector3D
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
upVectorChanged
(
upVector
)
¶
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.
注意
Only works if the lens is in perspective or orthographic projection mode.
另请参阅
Qt3D.Render::Camera::projectionType
PySide2.Qt3DRender.Qt3DRender.QCamera.
viewCenter
(
)
¶
QVector3D
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCamera.
viewCenterChanged
(
viewCenter
)
¶
viewCenter
–
QVector3D
PySide2.Qt3DRender.Qt3DRender.QCamera.
viewEntity
(
entity
)
¶
entity
–
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.
注意
Only works if the lens is in perspective or orthographic projection mode.
另请参阅
Camera.projectionType
PySide2.Qt3DRender.Qt3DRender.QCamera.
viewMatrix
(
)
¶
QMatrix4x4
PySide2.Qt3DRender.Qt3DRender.QCamera.
viewMatrixChanged
(
)
¶
PySide2.Qt3DRender.Qt3DRender.QCamera.
viewSphere
(
center
,
radius
)
¶
center
–
QVector3D
radius
–
float
Rotates and moves the camera so that it’s
viewCenter
is
center
and a sphere of
radius
fits in the view port.
注意
Only works if the lens is in perspective or orthographic projection mode.
另请参阅
Qt3D.Render::Camera::projectionType
PySide2.Qt3DRender.Qt3DRender.QCamera.
viewVector
(
)
¶
QVector3D
PySide2.Qt3DRender.Qt3DRender.QCamera.
viewVectorChanged
(
viewVector
)
¶
viewVector
–
QVector3D