QCameraLens Class
class Qt3DRender::QCameraLensQt3DRender::QCameraLens gibt die Projektionsmatrix an, die zur Definition einer Kamera für eine 3D-Szene verwendet wird. Mehr...
Kopfzeile: | #include <Qt3DRender/QCameraLens> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake: | QT += 3drender |
In QML: | CameraLens |
Vererbt: | Qt3DCore::QComponent |
Status: | Veraltet |
Öffentliche Typen
enum | ProjectionType { OrthographicProjection, PerspectiveProjection, FrustumProjection, CustomProjection } |
Eigenschaften
|
|
Öffentliche Funktionen
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 |
Öffentliche Slots
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) |
Signale
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) |
Dokumentation der Mitgliedstypen
enum QCameraLens::ProjectionType
Gibt an, welche Parameter von Qt3DRender::QCameraLens verwendet werden, um die Projektionsmatrix zu berechnen.
Konstante | Wert | Beschreibung |
---|---|---|
Qt3DRender::QCameraLens::OrthographicProjection | 0 | Orthogonale Projektion |
Qt3DRender::QCameraLens::PerspectiveProjection | 1 | Perspektivische Projektion |
Qt3DRender::QCameraLens::FrustumProjection | 2 | Frustum-Projektion |
Qt3DRender::QCameraLens::CustomProjection | 3 | Eigene benutzerdefinierte Projektion |
Eigenschaft Dokumentation
aspectRatio : float
Speichert das aktuelle Seitenverhältnis des Kameraobjektivs.
Anmerkung: : Der Rückgabewert kann undefiniert sein, wenn der Projektionstyp nicht Qt3DRender::QCameraLens::PerspectiveProjection ist.
Zugriffsfunktionen:
float | aspectRatio() const |
void | setAspectRatio(float aspectRatio) |
Melder-Signal:
void | aspectRatioChanged(float aspectRatio) |
bottom : float
Enthält die aktuelle untere Ebene des Kameraobjektivs.
Hinweis: Der Rückgabewert kann undefiniert sein, wenn der Projektionstyp Qt3DRender::QCameraLens::PerspectiveProjection ist.
Zugriffsfunktionen:
float | bottom() const |
void | setBottom(float bottom) |
Benachrichtigungssignal:
void | bottomChanged(float bottom) |
exposure : float
Speichert die aktuelle Belichtung des Kameraobjektivs.
Zugriff auf Funktionen:
float | exposure() const |
void | setExposure(float exposure) |
Benachrichtigungssignal:
void | exposureChanged(float exposure) |
farPlane : float
Speichert die aktuelle Nähebene des Kameraobjektivs.
Zugriffsfunktionen:
float | farPlane() const |
void | setFarPlane(float farPlane) |
Benachrichtigungssignal:
void | farPlaneChanged(float farPlane) |
fieldOfView : float
Speichert das aktuelle Sichtfeld des Kameraobjektivs.
Hinweis: : Der Rückgabewert kann undefiniert sein, wenn der Projektionstyp nicht Qt3DRender::QCameraLens::PerspectiveProjection ist.
Zugriffsfunktionen:
float | fieldOfView() const |
void | setFieldOfView(float fieldOfView) |
Melder-Signal:
void | fieldOfViewChanged(float fieldOfView) |
left : float
Enthält die aktuelle linke Ebene des Kameraobjektivs.
Hinweis: Der Rückgabewert kann undefiniert sein, wenn der Projektionstyp Qt3DRender::QCameraLens::PerspectiveProjection ist.
Zugriffsfunktionen:
float | left() const |
void | setLeft(float left) |
Melder-Signal:
void | leftChanged(float left) |
nearPlane : float
Speichert die aktuelle Nähebene des Kameraobjektivs.
Zugriffsfunktionen:
float | nearPlane() const |
void | setNearPlane(float nearPlane) |
Benachrichtigungssignal:
void | nearPlaneChanged(float nearPlane) |
projectionMatrix : QMatrix4x4
Enthält die aktuelle Projektionsmatrix des Kameraobjektivs.
Zugriffsfunktionen:
QMatrix4x4 | projectionMatrix() const |
void | setProjectionMatrix(const QMatrix4x4 &projectionMatrix) |
Melder-Signal:
void | projectionMatrixChanged(const QMatrix4x4 &projectionMatrix) |
projectionType : ProjectionType
Enthält den Typ der Kameraprojektion.
Zugriffsfunktionen:
Qt3DRender::QCameraLens::ProjectionType | projectionType() const |
void | setProjectionType(Qt3DRender::QCameraLens::ProjectionType projectionType) |
Melder-Signal:
void | projectionTypeChanged(Qt3DRender::QCameraLens::ProjectionType projectionType) |
Siehe auch Qt3DRender::QCameraLens::ProjectionType.
right : float
Enthält die aktuelle rechte Ebene des Kameraobjektivs.
Hinweis: Der Rückgabewert kann undefiniert sein, wenn der Projektionstyp Qt3DRender::QCameraLens::PerspectiveProjection ist.
Zugriffsfunktionen:
float | right() const |
void | setRight(float right) |
Melder-Signal:
void | rightChanged(float right) |
top : float
Enthält die aktuelle obere Ebene des Kameraobjektivs.
Hinweis: Der Rückgabewert kann undefiniert sein, wenn der Projektionstyp Qt3DRender::QCameraLens::PerspectiveProjection ist.
Zugriffsfunktionen:
float | top() const |
void | setTop(float top) |
Benachrichtigungssignal:
void | topChanged(float top) |
Member Function Dokumentation
[explicit]
QCameraLens::QCameraLens(Qt3DCore::QNode *parent = nullptr)
Konstruiert ein QCameraLens mit gegebener parent
[slot]
void QCameraLens::setAspectRatio(float aspectRatio)
Setzt das Seitenverhältnis der Projektion auf aspectRatio. Dadurch wird eine Aktualisierung der Projektionsmatrix ausgelöst.
Hinweis: Dies hat keine Auswirkungen, wenn der Projektionstyp nicht Qt3DRender::QCameraLens::PerspectiveProjection ist.
Hinweis: Setter-Funktion für die Eigenschaft aspectRatio.
Siehe auch aspectRatio().
[slot]
void QCameraLens::setBottom(float bottom)
Setzt die untere Fensterkoordinate der Projektion auf bottom. Dadurch wird eine Aktualisierung der Projektionsmatrix ausgelöst.
Hinweis: Dies hat keine Auswirkungen, wenn der Projektionstyp Qt3DRender::QCameraLens::PerspectiveProjection ist.
Hinweis: Setter-Funktion für die Eigenschaft bottom.
Siehe auch bottom().
[slot]
void QCameraLens::setExposure(float exposure)
Legt das Objektiv der Kamera fest. exposure
Hinweis: Setter-Funktion für die Eigenschaft exposure.
Siehe auch exposure().
[slot]
void QCameraLens::setFarPlane(float farPlane)
Setzt die weite Ebene der Projektion auf farPlane. Dies löst eine Aktualisierung der Projektionsmatrix aus.
Hinweis: Setter-Funktion für die Eigenschaft farPlane.
Siehe auch farPlane().
[slot]
void QCameraLens::setFieldOfView(float fieldOfView)
Setzt das Sichtfeld der Projektion auf fieldOfView Grad. Dies löst eine Aktualisierung der Projektionsmatrix aus.
Hinweis: Dies hat keine Auswirkungen, wenn der Projektionstyp nicht Qt3DRender::QCameraLens::PerspectiveProjection ist.
Hinweis: Setter-Funktion für die Eigenschaft fieldOfView.
Siehe auch fieldOfView().
void QCameraLens::setFrustumProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane)
Definiert eine orthografische Projektion basierend auf left, right, bottom, top, nearPlane, farPlane.
[slot]
void QCameraLens::setLeft(float left)
Setzt die untere linke Fensterkoordinate der Projektion auf left. Dadurch wird eine Aktualisierung der Projektionsmatrix ausgelöst.
Hinweis: Dies hat keine Wirkung, wenn der Projektionstyp Qt3DRender::QCameraLens::PerspectiveProjection ist.
Hinweis: Setter-Funktion für die Eigenschaft left.
Siehe auch left().
[slot]
void QCameraLens::setNearPlane(float nearPlane)
Setzt die nahe Ebene der Projektion auf nearPlane. Dadurch wird eine Aktualisierung der Projektionsmatrix ausgelöst.
Hinweis: Setter-Funktion für die Eigenschaft nearPlane.
Siehe auch nearPlane().
void QCameraLens::setOrthographicProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane)
Definiert eine orthografische Projektion basierend auf left, right, bottom, top, nearPlane, farPlane.
void QCameraLens::setPerspectiveProjection(float fieldOfView, float aspectRatio, float nearPlane, float farPlane)
Definiert eine perspektivische Projektion basierend auf fieldOfView, aspectRatio, nearPlane, farPlane.
[slot]
void QCameraLens::setProjectionMatrix(const QMatrix4x4 &projectionMatrix)
Setzt die Projektmatrix auf projectionMatrix.
Hinweis: Dies setzt den Projektionstyp auf Qt3DRender::QCameraLens::CustomProjection und ignoriert somit alle anderen Kameraparameter, die möglicherweise angegeben wurden.
Hinweis: Setter-Funktion für die Eigenschaft projectionMatrix.
Siehe auch projectionMatrix().
[slot]
void QCameraLens::setProjectionType(Qt3DRender::QCameraLens::ProjectionType projectionType)
Setzt den Projektionstyp des Objektivs projectionType.
Hinweis: Qt3DRender::QCameraLens::Frustum und Qt3DRender::QCameraLens::PerspectiveProjection sind zwei verschiedene Arten, dieselbe Projektion zu spezifizieren.
Hinweis: Setter-Funktion für die Eigenschaft projectionType.
Siehe auch projectionType().
[slot]
void QCameraLens::setRight(float right)
Setzt die obere rechte Fensterkoordinate der Projektion auf right. Dadurch wird eine Aktualisierung der Projektionsmatrix ausgelöst.
Hinweis: Dies hat keine Wirkung, wenn der Projektionstyp Qt3DRender::QCameraLens::PerspectiveProjection ist.
Hinweis: Setter-Funktion für die Eigenschaft right.
Siehe auch right().
[slot]
void QCameraLens::setTop(float top)
Setzt die obere Fensterkoordinate der Projektion auf top. Dadurch wird eine Aktualisierung der Projektionsmatrix ausgelöst.
Hinweis: Dies hat keine Auswirkungen, wenn der Projektionstyp Qt3DRender::QCameraLens::PerspectiveProjection ist.
Hinweis: Setter-Funktion für die Eigenschaft top.
Siehe auch top().
© 2025 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.