OrbitCameraController QML Type

原点を中心に回転するカメラコントローラー。詳細...

Import Statement: import QtQuick3D.Helpers
Inherits:

Item

プロパティ

詳しい説明

このヘルパーは原点を中心にカメラを回転させる方法を提供する。関数OrbitCameraControllerは原点としてNodeを受け取り、制御するためにoriginNodeの子であるべきCameraオブジェクトを受け取ります。親原点に対する子カメラのz位置のみを調整することで、カメラをターゲット原点に近づけたり遠ざけたりすることができます。原点ノードに回転を加えることで、子カメラは原点ノードの周りを周回します。

OrbitCameraControllerアイテム自体は入力イベントを受け付ける2Dアイテムなので、そのサイズと位置が入力イベントを受け付ける場所になります。ズームするには、マウスのスクロールホイールを使うか、ピンチジェスチャーを行います。回転させるには、クリックするか、タッチしてドラッグします。パンするには、controlキーを押しながら領域をドラッグします。パンすると、原点ノードの位置が変わります。2本指でドラッグしてパンするジェスチャーも可能です。

View3D {
    camera: cameraNode
    Node {
        id: originNode
        PerspectiveCamera {
            id: cameraNode
            z: 100
        }
    }
    OrbitCameraController {
        anchors.fill: parent
        origin: originNode
        camera: cameraNode
    }
    ...
}

プロパティの説明

acceptedButtons : Qt::MouseButtons [default: Qt.LeftButton, since 6.9]

カメラを制御するマウスボタンを指定します。

このプロパティは Qt 6.9 で導入されました。


automaticClipping : bool [default: true, since 6.9]

カメラの z 位置に基づいたcameraclipNear と l{PerspectiveCamera::}{clipFar} プロパティの自動更新を有効にします。

このプロパティは Qt 6.9 で導入されました。


制御するカメラノードを指定します。これは必須プロパティで、origin ノードの子でなければなりません。


mouseEnabled : bool [default: true]

マウスコントロールを有効にします。


origin : QtQuick3D::Node

制御する原点ノードを指定します。これは必須プロパティで、 ノードの親でなければなりません。camera


panEnabled : bool [default: true]

パンコントロールを有効にします。


xInvert : bool [default: false]

X 軸コントロールを無効にします。


xSpeed : real [default: 0.1]

X 軸に沿ってマウスを動かしたときのナビゲーションの速度を指定します。


yInvert : bool [default: true]

Y軸コントロールを無効にする。


ySpeed : real [default: 0.1]

Y軸に沿ってマウスを動かしたときのナビゲーションの速度を指定する。


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