Qt3DRender::QCameraLens Class
class Qt3DRender::QCameraLensQt3DRender::QCameraLens especifica la matriz de proyección que se utilizará para definir una Cámara para una escena 3D. Más...
| Cabecera: | #include <Qt3DRender/QCameraLens> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender)target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| En QML: | CameraLens |
| Hereda: | Qt3DCore::QComponent |
| Status: | Obsoleto |
Tipos públicos
| enum | ProjectionType { OrthographicProjection, PerspectiveProjection, FrustumProjection, CustomProjection } |
Propiedades
|
|
Funciones públicas
| 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 |
Ranuras públicas
| 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) |
Señales
| 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(Qt3DRender::QCameraLens::ProjectionType projectionType) |
| void | rightChanged(float right) |
| void | topChanged(float top) |
Documentación de los tipos de miembros
enum QCameraLens::ProjectionType
Especifica qué parámetros de Qt3DRender::QCameraLens se utilizan para calcular la matriz de proyección.
| Constante | Valor | Descripción |
|---|---|---|
Qt3DRender::QCameraLens::OrthographicProjection | 0 | Proyección ortogonal |
Qt3DRender::QCameraLens::PerspectiveProjection | 1 | Proyección en perspectiva |
Qt3DRender::QCameraLens::FrustumProjection | 2 | Proyección frustum |
Qt3DRender::QCameraLens::CustomProjection | 3 | Proyección personalizada definida por el usuario |
Documentación de propiedades
aspectRatio : float
Mantiene la relación de aspecto actual de la lente de la cámara.
Nota: : El valor de retorno puede ser indefinido si el tipo de proyección no es Qt3DRender::QCameraLens::PerspectiveProjection.
Funciones de acceso:
| float | aspectRatio() const |
| void | setAspectRatio(float aspectRatio) |
Señal notificadora:
| void | aspectRatioChanged(float aspectRatio) |
bottom : float
Mantiene el plano inferior actual de la lente de la cámara.
Nota: El valor de retorno puede ser indefinido si el tipo de proyección es Qt3DRender::QCameraLens::PerspectiveProjection.
Funciones de acceso:
| float | bottom() const |
| void | setBottom(float bottom) |
Señal notificadora:
| void | bottomChanged(float bottom) |
exposure : float
Mantiene la exposición actual del objetivo de la cámara.
Funciones de acceso:
| float | exposure() const |
| void | setExposure(float exposure) |
Señal de aviso:
| void | exposureChanged(float exposure) |
farPlane : float
Mantiene el plano cercano actual del objetivo de la cámara.
Funciones de acceso:
| float | farPlane() const |
| void | setFarPlane(float farPlane) |
Señal notificadora:
| void | farPlaneChanged(float farPlane) |
fieldOfView : float
Mantiene el campo de visión actual del objetivo de la cámara.
Nota: : El valor de retorno puede ser indefinido si el tipo de proyección no es Qt3DRender::QCameraLens::PerspectiveProjection.
Funciones de acceso:
| float | fieldOfView() const |
| void | setFieldOfView(float fieldOfView) |
Señal notificadora:
| void | fieldOfViewChanged(float fieldOfView) |
left : float
Mantiene el plano izquierdo actual de la lente de la cámara.
Nota: El valor de retorno puede ser indefinido si el tipo de proyección es Qt3DRender::QCameraLens::PerspectiveProjection.
Funciones de acceso:
| float | left() const |
| void | setLeft(float left) |
Señal notificadora:
| void | leftChanged(float left) |
nearPlane : float
Mantiene el plano cercano actual del objetivo de la cámara.
Funciones de acceso:
| float | nearPlane() const |
| void | setNearPlane(float nearPlane) |
Señal notificadora:
| void | nearPlaneChanged(float nearPlane) |
projectionMatrix : QMatrix4x4
Mantiene la matriz de proyección actual del objetivo de la cámara.
Funciones de acceso:
| QMatrix4x4 | projectionMatrix() const |
| void | setProjectionMatrix(const QMatrix4x4 &projectionMatrix) |
Señal notificadora:
| void | projectionMatrixChanged(const QMatrix4x4 &projectionMatrix) |
projectionType : ProjectionType
Contiene el tipo de proyección de la cámara.
Funciones de acceso:
| Qt3DRender::QCameraLens::ProjectionType | projectionType() const |
| void | setProjectionType(Qt3DRender::QCameraLens::ProjectionType projectionType) |
Señal del notificador:
| void | projectionTypeChanged(Qt3DRender::QCameraLens::ProjectionType projectionType) |
Véase también Qt3DRender::QCameraLens::ProjectionType.
right : float
Mantiene el plano derecho actual de la lente de la cámara.
Nota: El valor de retorno puede ser indefinido si el tipo de proyección es Qt3DRender::QCameraLens::PerspectiveProjection.
Funciones de acceso:
| float | right() const |
| void | setRight(float right) |
Señal notificadora:
| void | rightChanged(float right) |
top : float
Mantiene el plano superior actual de la lente de la cámara.
Nota: El valor de retorno puede ser indefinido si el tipo de proyección es Qt3DRender::QCameraLens::PerspectiveProjection.
Funciones de acceso:
| float | top() const |
| void | setTop(float top) |
Señal del notificador:
| void | topChanged(float top) |
Documentación de la función miembro
[explicit] QCameraLens::QCameraLens(Qt3DCore::QNode *parent = nullptr)
Construye una QCameraLens con el objeto parent
[slot] void QCameraLens::setAspectRatio(float aspectRatio)
Establece la relación de aspecto de la proyección en aspectRatio. Esto provoca una actualización de la matriz de proyección.
Nota: esto no tiene efecto si el tipo de proyección no es Qt3DRender::QCameraLens::PerspectiveProjection.
Nota: Función Setter para la propiedad aspectRatio.
Véase también aspectRatio().
[slot] void QCameraLens::setBottom(float bottom)
Establece la coordenada de la ventana inferior de la proyección en bottom. Esto provoca una actualización de la matriz de proyección.
Nota: esto no tiene efecto si el tipo de proyección es Qt3DRender::QCameraLens::PerspectiveProjection.
Nota: Función Setter para la propiedad bottom.
Véase también bottom().
[slot] void QCameraLens::setExposure(float exposure)
Establece el objetivo de la cámara exposure
Nota: Función Setter para la propiedad exposure.
Véase también exposure().
[slot] void QCameraLens::setFarPlane(float farPlane)
Establece el plano lejano de la proyección en farPlane. Esto provoca una actualización de la matriz de proyección.
Nota: Función Setter para la propiedad farPlane.
Véase también farPlane().
[slot] void QCameraLens::setFieldOfView(float fieldOfView)
Establece el campo de visión de la proyección en fieldOfView grados. Esto provoca una actualización de la matriz de proyección.
Nota: esto no tiene efecto si el tipo de proyección no es Qt3DRender::QCameraLens::PerspectiveProjection.
Nota: Función Setter para la propiedad fieldOfView.
Véase también fieldOfView().
void QCameraLens::setFrustumProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane)
Define una proyección ortográfica basada en left, right, bottom, top, nearPlane, farPlane.
[slot] void QCameraLens::setLeft(float left)
Establece la coordenada de la ventana inferior izquierda de la proyección en left. Esto desencadena una actualización de la matriz de proyección.
Nota : esto no tiene efecto si el tipo de proyección es Qt3DRender::QCameraLens::PerspectiveProjection.
Nota: Función Setter para la propiedad left.
Véase también left().
[slot] void QCameraLens::setNearPlane(float nearPlane)
Establece el plano cercano de la proyección en nearPlane. Esto provoca una actualización de la matriz de proyección.
Nota: Función Setter para la propiedad nearPlane.
Véase también nearPlane().
void QCameraLens::setOrthographicProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane)
Define una proyección ortográfica basada en left, right, bottom, top, nearPlane, farPlane.
void QCameraLens::setPerspectiveProjection(float fieldOfView, float aspectRatio, float nearPlane, float farPlane)
Define una proyección en perspectiva basada en fieldOfView, aspectRatio, nearPlane, farPlane.
[slot] void QCameraLens::setProjectionMatrix(const QMatrix4x4 &projectionMatrix)
Establece la matriz de proyección en projectionMatrix.
Nota: Esto establecerá el tipo de proyección a Qt3DRender::QCameraLens::CustomProjection y por lo tanto ignorará todos los demás parámetros de cámara que pudieran haber sido especificados.
Nota: Función Setter para la propiedad projectionMatrix.
Véase también projectionMatrix().
[slot] void QCameraLens::setProjectionType(Qt3DRender::QCameraLens::ProjectionType projectionType)
Establece el tipo de proyección de la lente projectionType.
Nota: Qt3DRender::QCameraLens::Frustum y Qt3DRender::QCameraLens::PerspectiveProjection son dos formas diferentes de especificar la misma proyección.
Nota: Función Setter para la propiedad projectionType.
Ver también projectionType().
[slot] void QCameraLens::setRight(float right)
Establece la coordenada superior derecha de la ventana de proyección en right. Esto provoca una actualización de la matriz de proyección.
Nota : esto no tiene efecto si el tipo de proyección es Qt3DRender::QCameraLens::PerspectiveProjection.
Nota: Función Setter para la propiedad right.
Véase también right().
[slot] void QCameraLens::setTop(float top)
Establece la coordenada de la ventana superior de la proyección en top. Esto desencadena una actualización de la matriz de proyección.
Nota: esto no tiene efecto si el tipo de proyección es Qt3DRender::QCameraLens::PerspectiveProjection.
Nota: Función Setter para la propiedad top.
Véase también top().
© 2026 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.