QCameraLensspecifies the projection matrix that will be used to define a Camera for a 3D scene. 更多 …
def
aspectRatio
()
def
bottom
()
def
exposure
()
def
farPlane
()
def
fieldOfView
()
def
left
()
def
nearPlane
()
def
projectionMatrix
()
def
projectionType
()
def
right
()
def
setFrustumProjection
(left, right, bottom, top, nearPlane, farPlane)
def
setOrthographicProjection
(left, right, bottom, top, nearPlane, farPlane)
def
setPerspectiveProjection
(fieldOfView, aspect, nearPlane, farPlane)
def
top
()
def
viewAll
(cameraId)
def
viewEntity
(entityId, cameraId)
def
setAspectRatio
(aspectRatio)
def
setBottom
(bottom)
def
setExposure
(exposure)
def
setFarPlane
(farPlane)
def
setFieldOfView
(fieldOfView)
def
setLeft
(left)
def
setNearPlane
(nearPlane)
def
setProjectionMatrix
(projectionMatrix)
def
setProjectionType
(projectionType)
def
setRight
(right)
def
setTop
(top)
def
aspectRatioChanged
(aspectRatio)
def
bottomChanged
(bottom)
def
exposureChanged
(exposure)
def
farPlaneChanged
(farPlane)
def
fieldOfViewChanged
(fieldOfView)
def
leftChanged
(left)
def
nearPlaneChanged
(nearPlane)
def
projectionMatrixChanged
(projectionMatrix)
def
projectionTypeChanged
(projectionType)
def
rightChanged
(right)
def
topChanged
(top)
def
viewSphere
(center, radius)
PySide2.Qt3DRender.Qt3DRender.
QCameraLens
(
[
parent=None
]
)
¶
- param parent
QNode
构造
QCameraLens
with given
parent
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
ProjectionType
¶
Specifies which parameters of
QCameraLens
are used to compute the projection matrix.
|
常量 |
描述 |
|---|---|
|
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
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
aspectRatioChanged
(
aspectRatio
)
¶
aspectRatio
–
float
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
bottom
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
bottomChanged
(
bottom
)
¶
bottom
–
float
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
exposure
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
exposureChanged
(
exposure
)
¶
exposure
–
float
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
farPlane
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
farPlaneChanged
(
farPlane
)
¶
farPlane
–
float
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
fieldOfView
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
fieldOfViewChanged
(
fieldOfView
)
¶
fieldOfView
–
float
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
leftChanged
(
left
)
¶
left
–
float
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
nearPlane
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
nearPlaneChanged
(
nearPlane
)
¶
nearPlane
–
float
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
projectionMatrix
(
)
¶
QMatrix4x4
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
projectionMatrixChanged
(
projectionMatrix
)
¶
projectionMatrix
–
QMatrix4x4
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
projectionType
(
)
¶
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
projectionTypeChanged
(
projectionType
)
¶
projectionType
–
ProjectionType
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
right
(
)
¶
float
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
rightChanged
(
right
)
¶
right
–
float
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setAspectRatio
(
aspectRatio
)
¶
aspectRatio
–
float
Sets the projection’s aspect ratio to
aspectRatio
. This triggers a projection matrix update.
注意
this has no effect if the projection type is not
PerspectiveProjection
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setBottom
(
bottom
)
¶
bottom
–
float
Sets the projection’s bottom window coordinate to
bottom
. This triggers a projection matrix update.
注意
this has no effect if the projection type is
PerspectiveProjection
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setExposure
(
exposure
)
¶
exposure
–
float
Sets the camera lens’
exposure
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setFarPlane
(
farPlane
)
¶
farPlane
–
float
Sets the projection’s far plane to
farPlane
. This triggers a projection matrix update.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setFieldOfView
(
fieldOfView
)
¶
fieldOfView
–
float
Sets the projection’s field of view to
fieldOfView
degrees. This triggers a projection matrix update.
注意
this has no effect if the projection type is not
PerspectiveProjection
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setFrustumProjection
(
left
,
right
,
bottom
,
top
,
nearPlane
,
farPlane
)
¶
left
–
float
right
–
float
bottom
–
float
top
–
float
nearPlane
–
float
farPlane
–
float
Defines an orthographic projection based on
left
,
right
,
bottom
,
top
,
nearPlane
,
farPlane
.
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setLeft
(
left
)
¶
left
–
float
Sets the projection’s lower left window coordinate to
left
. This triggers a projection matrix update.
注意
this has no effect if the projection type is
PerspectiveProjection
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setNearPlane
(
nearPlane
)
¶
nearPlane
–
float
Sets the projection’s near plane to
nearPlane
. This triggers a projection matrix update.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setOrthographicProjection
(
left
,
right
,
bottom
,
top
,
nearPlane
,
farPlane
)
¶
left
–
float
right
–
float
bottom
–
float
top
–
float
nearPlane
–
float
farPlane
–
float
Defines an orthographic projection based on
left
,
right
,
bottom
,
top
,
nearPlane
,
farPlane
.
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setPerspectiveProjection
(
fieldOfView
,
aspect
,
nearPlane
,
farPlane
)
¶
fieldOfView
–
float
aspect
–
float
nearPlane
–
float
farPlane
–
float
Defines a perspective projection based on
fieldOfView
,
aspectRatio
,
nearPlane
,
farPlane
.
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setProjectionMatrix
(
projectionMatrix
)
¶
projectionMatrix
–
QMatrix4x4
Sets the project matrix to
projectionMatrix
.
注意
This will set the projection type to
CustomProjection
and thus ignore all other camera parameters that might have been specified.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setProjectionType
(
projectionType
)
¶
projectionType
–
ProjectionType
Sets the lens’ projection type
projectionType
.
注意
Qt3DRender::QCameraLens::Frustum and
PerspectiveProjection
are two different ways of specifying the same projection.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setRight
(
right
)
¶
right
–
float
Sets the projection’s upper right window coordinate to
right
. This triggers a projection matrix update.
注意
this has no effect if the projection type is
PerspectiveProjection
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
setTop
(
top
)
¶
top
–
float
Sets the projection’s top window coordinate to
top
. This triggers a projection matrix update.
注意
this has no effect if the projection type is
PerspectiveProjection
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
topChanged
(
top
)
¶
top
–
float
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
viewAll
(
cameraId
)
¶
cameraId
–
QNodeId
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
viewEntity
(
entityId
,
cameraId
)
¶
entityId
–
QNodeId
cameraId
–
QNodeId
PySide2.Qt3DRender.Qt3DRender.QCameraLens.
viewSphere
(
center
,
radius
)
¶
center
–
QVector3D
radius
–
float