本页内容

Qt3DExtras::QFirstPersonCameraController Class

class Qt3DExtras::QFirstPersonCameraController

QFirstPersonCameraController 类允许从第一人称视角控制场景摄像机。更多内容...

头文件: #include <qfirstpersoncameracontroller.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
继承自: Qt3DExtras::QAbstractCameraController
状态: 已弃用

该类已弃用。我们强烈建议不要在新代码中使用它。

详细描述

控件包括:

输入操作
鼠标左键按住鼠标左键时,沿 x 轴移动鼠标可平移摄像头,沿 y 轴移动则可倾斜摄像头。
鼠标滚轮在不改变视图中心的情况下,对镜头进行放大或缩小。
Shift键按住期间启用精细控制模式,使鼠标的平移和俯仰操作灵敏度降低。
方向键使摄像机相对于摄像机视口水平移动。
Page Up 和 Page Down 键使摄像机相对于摄像机视口进行垂直移动。
Esc移动摄像机,使整个场景都能在摄像机视口内显示。

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