Qt3DRender::QCameraLens specifies the projection matrix that will be used to define a Camera for a 3D scene. 更多...
头: | #include <Qt3DRender/QCameraLens> |
qmake: | QT += 3drender |
Since: | Qt 5.5 |
实例化: | CameraLens |
继承: | Qt3DCore::QComponent |
该类在 Qt 5.5 引入。
enum | ProjectionType { OrthographicProjection, PerspectiveProjection, FrustumProjection, CustomProjection } |
|
|
QCameraLens (Qt3DCore::QNode * parent = nullptr) | |
float | aspectRatio () const |
float | bottom () const |
float | exposure () const |
float | farPlane () const |
float | fieldOfView () const |
float | left () const |
float | nearPlane () const |
QMatrix4x4 | projectionMatrix () const |
Qt3DRender::QCameraLens::ProjectionType | projectionType () const |
float | right () const |
void | setFrustumProjection (float left , float right , float bottom , float top , float nearPlane , float farPlane ) |
void | setOrthographicProjection (float left , float right , float bottom , float top , float nearPlane , float farPlane ) |
void | setPerspectiveProjection (float fieldOfView , float aspectRatio , float nearPlane , float farPlane ) |
float | top () const |
void | setAspectRatio (float aspectRatio ) |
void | setBottom (float bottom ) |
void | setExposure (float exposure ) |
void | setFarPlane (float farPlane ) |
void | setFieldOfView (float fieldOfView ) |
void | setLeft (float left ) |
void | setNearPlane (float nearPlane ) |
void | setProjectionMatrix (const QMatrix4x4 & projectionMatrix ) |
void | setProjectionType (Qt3DRender::QCameraLens::ProjectionType projectionType ) |
void | setRight (float right ) |
void | setTop (float top ) |
void | aspectRatioChanged (float aspectRatio ) |
void | bottomChanged (float bottom ) |
void | exposureChanged (float exposure ) |
void | farPlaneChanged (float farPlane ) |
void | fieldOfViewChanged (float fieldOfView ) |
void | leftChanged (float left ) |
void | nearPlaneChanged (float nearPlane ) |
void | projectionMatrixChanged (const QMatrix4x4 & projectionMatrix ) |
void | projectionTypeChanged (QCameraLens::ProjectionType projectionType ) |
void | rightChanged (float right ) |
void | topChanged (float top ) |
Specifies which parameters of Qt3DRender::QCameraLens are used to compute the projection matrix.
常量 | 值 | 描述 |
---|---|---|
Qt3DRender::QCameraLens::OrthographicProjection
|
0
|
Orthogonal projection |
Qt3DRender::QCameraLens::PerspectiveProjection
|
1
|
Perspective projection |
Qt3DRender::QCameraLens::FrustumProjection
|
2
|
Frustum projection |
Qt3DRender::QCameraLens::CustomProjection
|
3
|
Custom user-defined projection |
Holds the current aspect ratio of the camera lens.
注意: : The return value may be undefined if the projection type is not Qt3DRender::QCameraLens::PerspectiveProjection .
访问函数:
float | aspectRatio () const |
void | setAspectRatio (float aspectRatio ) |
通知程序信号:
void | aspectRatioChanged (float aspectRatio ) |
Holds the current bottom plane of the camera lens.
注意: The return value may be undefined if the projection type is Qt3DRender::QCameraLens::PerspectiveProjection .
访问函数:
float | bottom () const |
void | setBottom (float bottom ) |
通知程序信号:
void | bottomChanged (float bottom ) |
Holds the current exposure of the camera lens.
访问函数:
float | exposure () const |
void | setExposure (float exposure ) |
通知程序信号:
void | exposureChanged (float exposure ) |
Holds the current near plane of the camera lens.
访问函数:
float | farPlane () const |
void | setFarPlane (float farPlane ) |
通知程序信号:
void | farPlaneChanged (float farPlane ) |
Holds the current field of view of the camera lens.
注意: : The return value may be undefined if the projection type is not Qt3DRender::QCameraLens::PerspectiveProjection .
访问函数:
float | fieldOfView () const |
void | setFieldOfView (float fieldOfView ) |
通知程序信号:
void | fieldOfViewChanged (float fieldOfView ) |
Holds the current left plane of the camera lens.
注意: The return value may be undefined if the projection type is Qt3DRender::QCameraLens::PerspectiveProjection .
访问函数:
float | left () const |
void | setLeft (float left ) |
通知程序信号:
void | leftChanged (float left ) |
Holds the current near plane of the camera lens.
访问函数:
float | nearPlane () const |
void | setNearPlane (float nearPlane ) |
通知程序信号:
void | nearPlaneChanged (float nearPlane ) |
Holds the current projection matrix of the camera lens.
访问函数:
QMatrix4x4 | projectionMatrix () const |
void | setProjectionMatrix (const QMatrix4x4 & projectionMatrix ) |
通知程序信号:
void | projectionMatrixChanged (const QMatrix4x4 & projectionMatrix ) |
Holds the type of the camera projection.
访问函数:
Qt3DRender::QCameraLens::ProjectionType | projectionType () const |
void | setProjectionType (Qt3DRender::QCameraLens::ProjectionType projectionType ) |
通知程序信号:
void | projectionTypeChanged (QCameraLens::ProjectionType projectionType ) |
另请参阅 Qt3DRender::QCameraLens::ProjectionType .
Holds the current right plane of the camera lens.
注意: The return value may be undefined if the projection type is Qt3DRender::QCameraLens::PerspectiveProjection .
访问函数:
float | right () const |
void | setRight (float right ) |
通知程序信号:
void | rightChanged (float right ) |
Holds the current top plane of the camera lens.
注意: The return value may be undefined if the projection type is Qt3DRender::QCameraLens::PerspectiveProjection .
访问函数:
float | top () const |
void | setTop (float top ) |
通知程序信号:
void | topChanged (float top ) |
Constructs a QCameraLens with given parent
[slot]
void
QCameraLens::
setAspectRatio
(
float
aspectRatio
)
Sets the projection's aspect ratio to aspectRatio . This triggers a projection matrix update.
注意: this has no effect if the projection type is not Qt3DRender::QCameraLens::PerspectiveProjection .
注意: setter 函数对于特性 aspectRatio .
另请参阅 aspectRatio ().
[slot]
void
QCameraLens::
setBottom
(
float
bottom
)
Sets the projection's bottom window coordinate to bottom . This triggers a projection matrix update.
注意: this has no effect if the projection type is Qt3DRender::QCameraLens::PerspectiveProjection .
注意: setter 函数对于特性 bottom .
另请参阅 bottom ().
[slot]
void
QCameraLens::
setExposure
(
float
exposure
)
Sets the camera lens' exposure
注意: setter 函数对于特性 exposure .
另请参阅 exposure ().
[slot]
void
QCameraLens::
setFarPlane
(
float
farPlane
)
Sets the projection's far plane to farPlane . This triggers a projection matrix update.
注意: setter 函数对于特性 farPlane .
另请参阅 farPlane ().
[slot]
void
QCameraLens::
setFieldOfView
(
float
fieldOfView
)
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 Qt3DRender::QCameraLens::PerspectiveProjection .
注意: setter 函数对于特性 fieldOfView .
另请参阅 fieldOfView ().
[slot]
void
QCameraLens::
setLeft
(
float
left
)
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 Qt3DRender::QCameraLens::PerspectiveProjection .
注意: setter 函数对于特性 left .
另请参阅 left ().
[slot]
void
QCameraLens::
setNearPlane
(
float
nearPlane
)
Sets the projection's near plane to nearPlane . This triggers a projection matrix update.
注意: setter 函数对于特性 nearPlane .
另请参阅 nearPlane ().
[slot]
void
QCameraLens::
setProjectionMatrix
(const
QMatrix4x4
&
projectionMatrix
)
Sets the project matrix to projectionMatrix .
注意: This will set the projection type to Qt3DRender::QCameraLens::CustomProjection and thus ignore all other camera parameters that might have been specified.
注意: setter 函数对于特性 projectionMatrix .
另请参阅 projectionMatrix ().
[slot]
void
QCameraLens::
setProjectionType
(
Qt3DRender::QCameraLens::ProjectionType
projectionType
)
Sets the lens' projection type projectionType .
注意: Qt3DRender::QCameraLens::Frustum and Qt3DRender::QCameraLens::PerspectiveProjection are two different ways of specifying the same projection.
注意: setter 函数对于特性 projectionType .
另请参阅 projectionType ().
[slot]
void
QCameraLens::
setRight
(
float
right
)
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 Qt3DRender::QCameraLens::PerspectiveProjection .
注意: setter 函数对于特性 right .
另请参阅 right ().
[slot]
void
QCameraLens::
setTop
(
float
top
)
Sets the projection's top window coordinate to top . This triggers a projection matrix update.
注意: this has no effect if the projection type is Qt3DRender::QCameraLens::PerspectiveProjection .
注意: setter 函数对于特性 top .
另请参阅 top ().
Defines an orthographic projection based on left , right , bottom , top , nearPlane , farPlane .
Defines an orthographic projection based on left , right , bottom , top , nearPlane , farPlane .
Defines a perspective projection based on fieldOfView , aspectRatio , nearPlane , farPlane .