OrbitCameraController QML Type
原点を中心に回転するカメラコントローラ。詳細...
| Import Statement: | import QtQuick3D.Helpers |
| Inherits: |
プロパティ
- acceptedButtons : Qt::MouseButtons
(since 6.9) - automaticClipping : bool
(since 6.9) - camera : QtQuick3D::Camera
- mouseEnabled : bool
- origin : QtQuick3D::Node
- panEnabled : bool
- xInvert : bool
- xSpeed : real
- yInvert : bool
- ySpeed : real
詳細な説明
このヘルパーは、原点を中心にカメラを回転させる機能を提供します。OrbitCameraControllerは、原点となるNodeと、制御対象となるCameraオブジェクト(このCameraオブジェクトは、制御対象のNodeの子ノードである必要があります)を受け取って動作します。 子カメラの 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]
camera のclipNear およびl{PerspectiveCamera::}{clipFar}プロパティを、カメラのz座標に基づいて自動的に更新できるようにします。
このプロパティは Qt 6.9 で導入されました。
camera : QtQuick3D::Camera
制御対象のカメラノードを指定します。これは必須のプロパティであり、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軸に沿って移動させた際の移動速度を指定します。
© 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.