이 페이지에서

Qt3DExtras::QAbstractCameraController Class

class Qt3DExtras::QAbstractCameraController

QAbstractCameraController 클래스는 카메라 컨트롤러를 위한 기본 기능을 제공합니다. 더 보기...

헤더: #include <qabstractcameracontroller.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
상속: Qt3DCore::QEntity
상속받는 항목:

Qt3DExtras::QFirstPersonCameraController 그리고 Qt3DExtras::QOrbitCameraController

상태: 사용 중단됨

이 클래스는 사용 중단되었습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.

속성

공개 함수

float acceleration() const
Qt3DRender::QCamera *camera() const
float deceleration() const
float linearSpeed() const
float lookSpeed() const
void setAcceleration(float acceleration)
void setCamera(Qt3DRender::QCamera *camera)
void setDeceleration(float deceleration)
void setLinearSpeed(float linearSpeed)
void setLookSpeed(float lookSpeed)

신호

void accelerationChanged(float acceleration)
void cameraChanged()
void decelerationChanged(float deceleration)
void linearSpeedChanged()
void lookSpeedChanged()

보호된 함수

Qt3DInput::QKeyboardDevice *keyboardDevice() const
Qt3DInput::QMouseDevice *mouseDevice() const

비공개 함수

virtual void moveCamera(const Qt3DExtras::QAbstractCameraController::InputState &state, float dt) = 0

상세 설명

QAbstractCameraController는 키보드, 마우스 및 기타 장치로부터의 입력을 설정하고 처리합니다. QAbstractCameraController는 추상 클래스이므로 그 자체로는 인스턴스화할 수 없습니다. 이 클래스는 카메라 컨트롤러를 위한 표준 인터페이스를 제공합니다.

속성 설명

acceleration : float

카메라 컨트롤러의 현재 가속도를 저장합니다.

액세스 함수:

float acceleration() const
void setAcceleration(float acceleration)

알림 신호:

void accelerationChanged(float acceleration)

camera : Qt3DRender::QCamera*

현재 제어 중인 카메라를 유지합니다.

액세스 기능:

Qt3DRender::QCamera *camera() const
void setCamera(Qt3DRender::QCamera *camera)

알림 신호:

void cameraChanged()

deceleration : float

카메라 컨트롤러의 현재 감속도를 저장합니다.

액세스 함수:

float deceleration() const
void setDeceleration(float deceleration)

알림 신호:

void decelerationChanged(float deceleration)

linearSpeed : float

카메라 컨트롤러의 현재 선형 속도를 저장합니다. 선형 속도는 카메라의 이동 속도를 결정합니다.

기본값은 10.0 입니다.

액세스 함수:

float linearSpeed() const
void setLinearSpeed(float linearSpeed)

알림 신호:

void linearSpeedChanged()

lookSpeed : float

카메라 컨트롤러의 현재 시선 속도를 저장합니다. 시선 속도는 카메라의 팬 및 틸트 회전 속도를 결정합니다.

기본값은 180.0 입니다.

액세스 함수:

float lookSpeed() const
void setLookSpeed(float lookSpeed)

알림 신호:

void lookSpeedChanged()

멤버 함수 문서

[protected] Qt3DInput::QKeyboardDevice *QAbstractCameraController::keyboardDevice() const

키보드 장치에 대한 액세스를 제공합니다.

[protected] Qt3DInput::QMouseDevice *QAbstractCameraController::mouseDevice() const

마우스 장치에 대한 액세스를 제공합니다.

[pure virtual private] void QAbstractCameraController::moveCamera(const Qt3DExtras::QAbstractCameraController::InputState &state, float dt)

하위 클래스는 컨트롤러에 특화된 카메라 이동을 구현하기 위해 이 메서드를 재정의해야 합니다. ` state `는 입력 상태를 나타내며, ` dt `는 시간 단위를 나타냅니다.

이 함수는 프레임 액션이 트리거될 때마다 호출됩니다.

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