QCameraLens Class
(Qt3D::QCameraLens)Qt3D::QCameraLens specifies the projection matrix that will be used to define a Camera for a 3D scene. More...
Header: | #include <QCameraLens> |
qmake: | QT += 3dcore |
Since: | Qt 5.5 |
Instantiated By: | CameraLens |
Inherits: | QComponent |
Public Types
enum | ProjectionType { OrthogonalProjection, PerspectiveProjection, FrustumProjection } |
Properties
|
|
- 2 properties inherited from Qt3D::QComponent
- 1 property inherited from Qt3D::QNode
- 1 property inherited from QObject
Public Functions
QCameraLens(QNode * parent = 0) | |
~QCameraLens() | |
float | aspectRatio() const |
float | bottom() const |
float | farPlane() const |
float | fieldOfView() const |
float | left() const |
float | nearPlane() const |
QMatrix4x4 | projectionMatrix() const |
ProjectionType | projectionType() const |
float | right() const |
void | setAspectRatio(float aspectRatio) |
void | setBottom(float bottom) |
void | setFarPlane(float farPlane) |
void | setFieldOfView(float fieldOfView) |
void | setFrustumProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane) |
void | setLeft(float left) |
void | setNearPlane(float nearPlane) |
void | setOrthographicProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane) |
void | setPerspectiveProjection(float fieldOfView, float aspectRatio, float nearPlane, float farPlane) |
void | setProjectionType(ProjectionType projectionType) |
void | setRight(float right) |
void | setTop(float top) |
float | top() const |
- 5 public functions inherited from Qt3D::QComponent
- 6 public functions inherited from Qt3D::QNode
- 31 public functions inherited from QObject
Signals
void | aspectRatioChanged() |
void | bottomChanged() |
void | farPlaneChanged() |
void | fieldOfViewChanged() |
void | leftChanged() |
void | nearPlaneChanged() |
void | projectionMatrixChanged() |
void | projectionTypeChanged() |
void | rightChanged() |
void | topChanged() |
- 2 signals inherited from Qt3D::QComponent
- 1 signal inherited from Qt3D::QNode
- 2 signals inherited from QObject
Protected Functions
QCameraLens(QCameraLensPrivate & dd, QNode * parent = 0) |
Reimplemented Protected Functions
virtual void | copy(const QNode * ref) |
- 1 protected function inherited from Qt3D::QComponent
- 3 protected functions inherited from Qt3D::QNode
- 9 protected functions inherited from QObject
Additional Inherited Members
- 1 public slot inherited from QObject
- 11 static public members inherited from QObject
- 1 static protected member inherited from Qt3D::QNode
Detailed Description
Qt3D::QCameraLens specifies the projection matrix that will be used to define a Camera for a 3D scene.
Property Documentation
aspectRatio : float
Access functions:
float | aspectRatio() const |
void | setAspectRatio(float aspectRatio) |
Notifier signal:
void | aspectRatioChanged() |
bottom : float
Access functions:
Notifier signal:
void | bottomChanged() |
farPlane : float
Access functions:
float | farPlane() const |
void | setFarPlane(float farPlane) |
Notifier signal:
void | farPlaneChanged() |
fieldOfView : float
Access functions:
float | fieldOfView() const |
void | setFieldOfView(float fieldOfView) |
Notifier signal:
void | fieldOfViewChanged() |
left : float
Access functions:
Notifier signal:
void | leftChanged() |
nearPlane : float
Access functions:
float | nearPlane() const |
void | setNearPlane(float nearPlane) |
Notifier signal:
void | nearPlaneChanged() |
projectionMatrix : const QMatrix4x4
Access functions:
QMatrix4x4 | projectionMatrix() const |
Notifier signal:
void | projectionMatrixChanged() |
projectionType : ProjectionType
Access functions:
ProjectionType | projectionType() const |
void | setProjectionType(ProjectionType projectionType) |
Notifier signal:
void | projectionTypeChanged() |
right : float
Access functions:
Notifier signal:
void | rightChanged() |
top : float
Access functions:
Notifier signal:
void | topChanged() |
Member Function Documentation
QCameraLens::QCameraLens(QNode * parent = 0)
[protected]
QCameraLens::QCameraLens(QCameraLensPrivate & dd, QNode * parent = 0)
QCameraLens::~QCameraLens()
float QCameraLens::aspectRatio() const
Returns the projection's aspect ratio.
Note: : The return value may be undefined if the projection type is not Qt3D::QCameraLens::PerspectiveProjection.
Note: Getter function for property aspectRatio.
See also setAspectRatio().
float QCameraLens::bottom() const
Returns the bottom window coordinate of the projection.
Note: The return value may be undefined if the projection type is Qt3D::QCameraLens::PerspectiveProjection.
Note: Getter function for property bottom.
See also setBottom().
[virtual protected]
void QCameraLens::copy(const QNode * ref)
float QCameraLens::farPlane() const
Returns the projection's far plane.
Note: Getter function for property farPlane.
See also setFarPlane().
float QCameraLens::fieldOfView() const
Returns the projection's field of view in degrees.
Note: : The return value may be undefined if the projection type is not Qt3D::QCameraLens::PerspectiveProjection.
Note: Getter function for property fieldOfView.
See also setFieldOfView().
float QCameraLens::left() const
Returns the lower left window coordinate of the projection.
Note: The return value may be undefined if the projection type is Qt3D::QCameraLens::PerspectiveProjection.
Note: Getter function for property left.
See also setLeft().
float QCameraLens::nearPlane() const
Returns the projection's near plane.
Note: Getter function for property nearPlane.
See also setNearPlane().
QMatrix4x4 QCameraLens::projectionMatrix() const
Returns the projection matrix.
Note: Getter function for property projectionMatrix.
ProjectionType QCameraLens::projectionType() const
Returns the lens' projection type.
Note: Getter function for property projectionType.
See also setProjectionType().
float QCameraLens::right() const
Returns the upper right window coordinate of the projection.
Note: The return value may be undefined if the projection type is Qt3D::QCameraLens::PerspectiveProjection.
Note: Getter function for property right.
See also setRight().
void QCameraLens::setAspectRatio(float aspectRatio)
Sets the projection's aspect ratio to aspectRatio. This triggers a projection matrix update.
Note: this has no effect if the projection type is not Qt3D::QCameraLens::PerspectiveProjection.
Note: Setter function for property aspectRatio.
See also aspectRatio().
void QCameraLens::setBottom(float bottom)
Sets the projection's bottom window coordinate to bottom. This triggers a projection matrix update.
Note: this has no effect if the projection type is Qt3D::QCameraLens::PerspectiveProjection.
Note: Setter function for property bottom.
See also bottom().
void QCameraLens::setFarPlane(float farPlane)
Sets the projection's far plane to farPlane. This triggers a projection matrix update.
Note: Setter function for property farPlane.
See also farPlane().
void QCameraLens::setFieldOfView(float fieldOfView)
Sets the projection's field of view to fieldOfView degrees. This triggers a projection matrix update.
Note: this has no effect if the projection type is not Qt3D::QCameraLens::PerspectiveProjection.
Note: Setter function for property fieldOfView.
See also fieldOfView().
void QCameraLens::setFrustumProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane)
Defines an orthographic projection based on left, right, bottom, top, nearPlane, farPlane.
void QCameraLens::setLeft(float left)
Sets the projection's lower left window coordinate to left. This triggers a projection matrix update.
Note: this has no effect if the projection type is Qt3D::QCameraLens::PerspectiveProjection.
Note: Setter function for property left.
See also left().
void QCameraLens::setNearPlane(float nearPlane)
Sets the projection's near plane to nearPlane. This triggers a projection matrix update.
Note: Setter function for property nearPlane.
See also nearPlane().
void QCameraLens::setOrthographicProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane)
Defines an orthographic projection based on left, right, bottom, top, nearPlane, farPlane.
void QCameraLens::setPerspectiveProjection(float fieldOfView, float aspectRatio, float nearPlane, float farPlane)
Defines a perspective projection based on fieldOfView, aspectRatio, nearPlane, farPlane.
void QCameraLens::setProjectionType(ProjectionType projectionType)
Sets the lens' projection type projectionType.
Note: Qt3D::QCameraLens::Frustum and Qt3D::QCameraLens::PerspectiveProjection are two different ways of specifying the same projection.
Note: Setter function for property projectionType.
See also projectionType().
void QCameraLens::setRight(float right)
Sets the projection's upper right window coordinate to right. This triggers a projection matrix update.
Note: this has no effect if the projection type is Qt3D::QCameraLens::PerspectiveProjection.
Note: Setter function for property right.
See also right().
void QCameraLens::setTop(float top)
Sets the projection's top window coordinate to top. This triggers a projection matrix update.
Note: this has no effect if the projection type is Qt3D::QCameraLens::PerspectiveProjection.
Note: Setter function for property top.
See also top().
float QCameraLens::top() const
Returns the bottom window coordinate of the projection.
Note: The return value may be undefined if the projection type is Qt3D::QCameraLens::PerspectiveProjection.
Note: Getter function for property top.
See also setTop().
© 2016 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.