このページでは

Qt3DExtras::QOrbitCameraController Class

class Qt3DExtras::QOrbitCameraController

QOrbitCameraController クラスを使用すると、シーンのカメラを軌道に沿って制御することができます。詳細...

ヘッダー: #include <qorbitcameracontroller.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
継承元: Qt3DExtras::QAbstractCameraController
ステータス: 非推奨

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

プロパティ

パブリック関数

bool inversePan() const
bool inverseTilt() const
bool inverseXTranslate() const
bool inverseYTranslate() const
QVector3D upVector() const
float zoomInLimit() const
bool zoomTranslateViewCenter() const

パブリックスロット

void setInversePan(bool isInverse)
void setInverseTilt(bool isInverse)
void setInverseXTranslate(bool isInverse)
void setInverseYTranslate(bool isInverse)
void setUpVector(const QVector3D &upVector)
void setZoomInLimit(float zoomInLimit)
void setZoomTranslateViewCenter(bool isTranslate)

シグナル

void inversePanChanged(bool isInverse)
void inverseTiltChanged(bool isInverse)
void inverseXTranslateChanged(bool isInverse)
void inverseYTranslateChanged(bool isInverse)
void upVectorChanged(const QVector3D &upVector)
void zoomInLimitChanged()
void zoomTranslateViewCenterChanged(bool isTranslate)

詳細な説明

コントロールは以下の通りです:

入力操作
マウスの左ボタンマウスの左ボタンを押している間、x軸に沿ってマウスを動かすとカメラが左右に動き、y軸に沿って動かすと上下に動きます。
マウスの右ボタンマウス右ボタンを押している間、x 軸に沿ってマウスを動かすとカメラがビューの中心を軸に左右にパンし、y 軸に沿って動かすとカメラがビューの中心を軸に上下にチルトします。
マウスの左ボタンと右ボタンの両方マウスの左ボタンと右ボタンの両方を押している間、Y 軸に沿ってマウスを動かすと、ビューの中心を変えずにカメラのズームイン・ズームアウトが行われます。
マウスのスクロールホイールビューの中心位置を変えずに、カメラのズームイン・ズームアウトを行います。
矢印キーカメラのビューポートを基準に、カメラを垂直方向および水平方向に移動させます。
Page Up キーおよび Page Down キーカメラを前後に移動します。
Shiftキー上矢印キーと下矢印キーの動作を変更し、ビューの中心位置を変えずにカメラをズームイン・ズームアウトします。その他の移動キーは無効になります。
Altキー矢印キーの動作を変更し、ビューの中心を基準にカメラをパンおよびチルトさせます。Page Up キーと Page Down キーは無効になります。
Escキーカメラを移動させ、シーン全体がカメラのビューポートに収まるようにします。

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

inversePan : bool

パンが反転しているかどうかを指定します。

有効にすると、水平方向のパン操作により、カメラがビューの中心を軸として反対方向に回転します。

アクセス関数:

bool inversePan() const
void setInversePan(bool isInverse)

通知シグナル:

void inversePanChanged(bool isInverse)

inverseTilt : bool

チルトが反転しているかどうかを示します。

有効にすると、垂直方向のチルト操作により、カメラがビューの中心を基準に逆方向に回転します。

アクセス機能:

bool inverseTilt() const
void setInverseTilt(bool isInverse)

通知信号:

void inverseTiltChanged(bool isInverse)

inverseXTranslate : bool

水平方向の移動が反転しているかどうかを指定します。

有効にすると、マウスの水平方向の移動や入力によって、カメラが反対方向に移動します。

アクセス関数:

bool inverseXTranslate() const
void setInverseXTranslate(bool isInverse)

通知シグナル:

void inverseXTranslateChanged(bool isInverse)

inverseYTranslate : bool

垂直方向の平行移動が反転しているかどうかを示します。

有効にすると、マウスの垂直方向の動きや入力によって、カメラが反対方向に移動します。

アクセス関数:

bool inverseYTranslate() const
void setInverseYTranslate(bool isInverse)

通知シグナル:

void inverseYTranslateChanged(bool isInverse)

upVector : QVector3D

カメラの軌道回転用の上方向ベクトルを保持します。

アップベクトルは、カメラが公転する垂直軸を定義します。デフォルト値は (0.0, 1.0, 0.0) です。

アクセス関数:

QVector3D upVector() const
void setUpVector(const QVector3D &upVector)

通知シグナル:

void upVectorChanged(const QVector3D &upVector)

zoomInLimit : float

現在のズームイン上限を保持します。ズームイン上限は、カメラがビューの中心からどれだけ近くまでズームできるかを決定します。

アクセス関数:

float zoomInLimit() const
void setZoomInLimit(float zoomInLimit)

通知シグナル:

void zoomInLimitChanged()

zoomTranslateViewCenter : bool

ズーム操作中にビューの中心が移動するかどうかを指定します。

有効にすると、ズーム操作時にビューの中心が移動します。無効にすると、ズーム操作中に変更されるのはカメラ位置のみです。デフォルト値は true です。

アクセス関数:

bool zoomTranslateViewCenter() const
void setZoomTranslateViewCenter(bool isTranslate)

通知シグナル:

void zoomTranslateViewCenterChanged(bool isTranslate)

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