このページでは

Qt3DRender::QCameraLens Class

class Qt3DRender::QCameraLens

Qt3DRender::QCameraLens 3Dシーンのカメラを定義するために使用される投影行列を指定します。詳細...

ヘッダー: #include <Qt3DRender/QCameraLens>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
QML内: CameraLens
継承元: Qt3DCore::QComponent
ステータス: 非推奨

このクラスは非推奨です。新しいコードでの使用は強く推奨しません。

パブリック型

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(Qt3DRender::QCameraLens::ProjectionType projectionType)
void rightChanged(float right)
void topChanged(float top)

詳細な説明

メンバ型のドキュメント

enum QCameraLens::ProjectionType

Qt3DRender::QCameraLens のどのパラメータを投影行列の計算に使用するかを指定します。

定数値説明
Qt3DRender::QCameraLens::OrthographicProjection0直交投影
Qt3DRender::QCameraLens::PerspectiveProjection1透視投影
Qt3DRender::QCameraLens::FrustumProjection2円錐台投影
Qt3DRender::QCameraLens::CustomProjection3カスタム(ユーザー定義)投影法

プロパティのドキュメント

aspectRatio : float

カメラレンズの現在のアスペクト比を保持します。

注: 投影タイプがQt3DRender::QCameraLens::PerspectiveProjection でない場合、 戻り値は未定義となる可能性があります。

アクセス関数:

float aspectRatio() const
void setAspectRatio(float aspectRatio)

通知シグナル:

void aspectRatioChanged(float aspectRatio)

bottom : float

カメラレンズの現在の最下層平面を保持します。

注: 投影タイプがQt3DRender::QCameraLens::PerspectiveProjection の場合、戻り値は 未定義となる可能性があります。

アクセス関数:

float bottom() const
void setBottom(float bottom)

通知シグナル:

void bottomChanged(float bottom)

exposure : float

カメラレンズの現在の露出値を保持します。

アクセス機能:

float exposure() const
void setExposure(float exposure)

通知信号:

void exposureChanged(float exposure)

farPlane : float

カメラレンズの現在の近接平面を保持します。

アクセス機能:

float farPlane() const
void setFarPlane(float farPlane)

通知信号:

void farPlaneChanged(float farPlane)

fieldOfView : float

カメラレンズの現在の視野を保持します。

注: 投影タイプがQt3DRender::QCameraLens::PerspectiveProjection でない場合、 戻り値は未定義となる可能性があります。

アクセス関数:

float fieldOfView() const
void setFieldOfView(float fieldOfView)

通知シグナル:

void fieldOfViewChanged(float fieldOfView)

left : float

カメラレンズの現在の左平面を保持します。

注: 投影タイプがQt3DRender::QCameraLens::PerspectiveProjection の場合、戻り値は 未定義となる可能性があります。

アクセス関数:

float left() const
void setLeft(float left)

通知シグナル:

void leftChanged(float left)

nearPlane : float

カメラレンズの現在の近接平面を保持します。

アクセス関数:

float nearPlane() const
void setNearPlane(float nearPlane)

通知信号:

void nearPlaneChanged(float nearPlane)

projectionMatrix : QMatrix4x4

カメラレンズの現在の投影行列を保持します。

アクセス関数:

QMatrix4x4 projectionMatrix() const
void setProjectionMatrix(const QMatrix4x4 &projectionMatrix)

通知シグナル:

void projectionMatrixChanged(const QMatrix4x4 &projectionMatrix)

projectionType : ProjectionType

カメラ投影の型を保持します。

アクセス関数:

Qt3DRender::QCameraLens::ProjectionType projectionType() const
void setProjectionType(Qt3DRender::QCameraLens::ProjectionType projectionType)

通知シグナル:

void projectionTypeChanged(Qt3DRender::QCameraLens::ProjectionType projectionType)

Qt3DRender::QCameraLens::ProjectionTypeも参照してください 。

right : float

カメラレンズの現在の右平面を保持します。

注: 投影タイプがQt3DRender::QCameraLens::PerspectiveProjection の場合、戻り値は 未定義となる可能性があります。

アクセス関数:

float right() const
void setRight(float right)

通知シグナル:

void rightChanged(float right)

top : float

カメラレンズの現在の最前面の平面を保持します。

注: 投影タイプがQt3DRender::QCameraLens::PerspectiveProjection の場合、戻り値は 未定義となる可能性があります。

アクセス関数:

float top() const
void setTop(float top)

通知シグナル:

void topChanged(float top)

メンバ関数のドキュメント

[explicit] QCameraLens::QCameraLens(Qt3DCore::QNode *parent = nullptr)

指定された内容に基づいて QCameraLens を生成しますparent

[slot] void QCameraLens::setAspectRatio(float aspectRatio)

投影のアスペクト比をaspectRatio に設定します。これにより、投影行列が更新されます。

注: 投影タイプがQt3DRender::QCameraLens::PerspectiveProjection でない場合、この操作は 効果を持ちません。

注: プロパティ `aspectRatio`のセッター 関数です。

関連項目: aspectRatio()。

[slot] void QCameraLens::setBottom(float bottom)

投影の下端ウィンドウ座標をbottom に設定します。これにより、投影行列が更新されます。

注: 投影タイプが `Qt3DRender::QCameraLens::PerspectiveProjection` の場合、この設定は 効果を持ちません。

注: プロパティ `bottom`のセッター 関数です。

関連項目: bottom()。

[slot] void QCameraLens::setExposure(float exposure)

カメラレンズのexposure

注: プロパティ `exposure`のセッター 関数です。

exposure()も参照してください 。

[slot] void QCameraLens::setFarPlane(float farPlane)

投影の遠方平面を `farPlane` に設定します。これにより、投影行列が更新されます。

注: プロパティ `farPlane`のセッター 関数です。

farPlane()も参照してください 。

[slot] void QCameraLens::setFieldOfView(float fieldOfView)

投影の視野角をfieldOfView 度に設定します。これにより、投影行列が更新されます。

注: 投影タイプがQt3DRender::QCameraLens::PerspectiveProjection でない場合、この操作は 効果を持ちません。

注: プロパティ `fieldOfView`のセッター 関数です。

関連項目 :fieldOfView()

void QCameraLens::setFrustumProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane)

left 、right 、bottom 、top 、nearPlane 、farPlane に基づいて、正射影を定義します。

[slot] void QCameraLens::setLeft(float left)

投影の左下ウィンドウ座標を `left` に設定します。これにより、投影行列の更新がトリガーされます。

注: 投影タイプが `Qt3DRender::QCameraLens::PerspectiveProjection` の場合、この操作は 効果を持ちません。

注: プロパティ `left`のセッター 関数です。

関連項目 :left()

[slot] void QCameraLens::setNearPlane(float nearPlane)

投影の近接平面を `nearPlane` に設定します。これにより、投影行列が更新されます。

注: プロパティ `nearPlane`のセッター 関数です。

nearPlane()も参照してください 。

void QCameraLens::setOrthographicProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane)

left 、right 、bottom 、top 、nearPlane 、farPlane に基づいて、正射投影を定義します。

void QCameraLens::setPerspectiveProjection(float fieldOfView, float aspectRatio, float nearPlane, float farPlane)

fieldOfView 、aspectRatio 、nearPlane 、farPlane に基づいて、透視投影を定義します。

[slot] void QCameraLens::setProjectionMatrix(const QMatrix4x4 &projectionMatrix)

プロジェクト行列を「projectionMatrix 」に設定します。

注:これにより 、投影タイプがQt3DRender::QCameraLens::CustomProjection に設定されるため、指定されていた可能性のある他のすべてのカメラパラメータは無視されます。

注: プロパティ `projectionMatrix`のセッター 関数です。

projectionMatrix()も参照してください 。

[slot] void QCameraLens::setProjectionType(Qt3DRender::QCameraLens::ProjectionType projectionType)

レンズの投影タイプprojectionType を設定します。

注:Qt3DRender ::QCameraLens::Frustum とQt3DRender::QCameraLens::PerspectiveProjection は、同じ投影を指定する2つの異なる方法です。

注: プロパティprojectionType のセッター 関数。

projectionType()も参照してください 。

[slot] void QCameraLens::setRight(float right)

投影の右上ウィンドウ座標をright に設定します。これにより、投影行列の更新が行われます。

注: 投影タイプが `Qt3DRender::QCameraLens::PerspectiveProjection` の場合、この操作は 効果を持ちません。

注: プロパティ `right`のセッター 関数です。

関連項目: right()。

[slot] void QCameraLens::setTop(float top)

投影のウィンドウ上端座標を `top` に設定します。これにより、投影行列が更新されます。

注: 投影タイプが `Qt3DRender::QCameraLens::PerspectiveProjection` の場合、この操作は 効果を持ちません。

注: プロパティ `top`のセッター 関数です。

関連項目: ` 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.