このページでは

CustomCamera QML Type

カスタム投影行列を持つカメラを定義します。詳細...

Import Statement: import QtQuick3D
Inherits:

Camera

プロパティ

詳細な説明

Camera は、3DシーンのコンテンツがView3D などの2D表面にどのように投影されるかを定義します。シーンの内容を可視化するには、少なくとも1つのCamera が必要です。

Camera は、シーン内の他の空間的なNode と同様に、位置や回転を調整することができます。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 の投影行列を定義します。

© 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.