CustomCamera QML Type
カスタム投影行列を持つCameraを定義します。詳細...
Import Statement: | import QtQuick3D |
Inherits: |
プロパティ
- projection : matrix4x4
詳細説明
Camera は、3D シーンのコンテンツが、View3D のような 2D サーフェスにどのように投影されるかを定義します。シーンのコンテンツを視覚化するには、少なくとも 1 つのCamera が必要です。
シーン内の他の空間Node のように、Camera の位置と回転が可能です。Node の位置と向きは、Camera がシーンのどこにあり、どの方向を向いているかを決定します。Camera のデフォルトの向きは、前方ベクトルが負の Z 軸に沿い、上方ベクトルが正の Y 軸に沿います。
CustomCamera タイプは、投影行列を自由にカスタマイズできるCamera を提供します。
次の例では、シーンの位置 [0, 200, 300] に、ピッチが 30 度下向きで、近景と遠景のカスタム距離とカスタム視野に基づいたカスタム投影行列を持つ CustomCamera を作成します。
CustomCamera { position: Qt.vector3d(0, 200, 300) eulerRotation.x: -30 property real near: 10.0 property real far: 10000.0 property real fov: 60.0 * Math.PI / 180.0 projection: Qt.matrix4x4(Math.cos(fov / 2) / Math.sin(fov / 2) * (window.height / window.width), 0, 0, 0, 0, Math.cos(fov / 2) / Math.sin(fov / 2), 0, 0, 0, 0, -(near + far) / (far - near), -(2.0 * near * far) / (far - near), 0, 0, -1, 0); }
注: CustomCameraを使用する場合、一部のアンチエイリアスモード(Temporal AAおよびProgressive AA)は正しく適用できません。
PerspectiveCamera 、OrthographicCamera 、FrustumCameraも参照してください 。
プロパティ ドキュメント
projection : matrix4x4 |
このプロパティは、CustomCamera の投影行列を定義します。
© 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.