QAxisAccumulator Class
class Qt3DInput::QAxisAccumulatorQ축축적기는 QAxis...에서 속도 또는 가속도 데이터를 처리합니다... .
헤더: | #include <QAxisAccumulator> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dinput) target_link_libraries(mytarget PRIVATE Qt6::3dinput) |
qmake: | QT += 3dinput |
QML에서: | AxisAccumulator |
상속합니다: | Qt3DCore::QComponent |
상태: | Deprecated |
공용 유형
enum | SourceAxisType { Velocity, Acceleration } |
속성
- value : const float
공용 기능
QAxisAccumulator(Qt3DCore::QNode *parent = nullptr) | |
float | scale() const |
Qt3DInput::QAxis * | sourceAxis() const |
Qt3DInput::QAxisAccumulator::SourceAxisType | sourceAxisType() const |
float | value() const |
float | velocity() const |
공용 슬롯
void | setScale(float scale) |
void | setSourceAxis(Qt3DInput::QAxis *sourceAxis) |
void | setSourceAxisType(Qt3DInput::QAxisAccumulator::SourceAxisType sourceAxisType) |
신호
void | scaleChanged(float scale) |
void | sourceAxisChanged(Qt3DInput::QAxis *sourceAxis) |
void | sourceAxisTypeChanged(Qt3DInput::QAxisAccumulator::SourceAxisType sourceAxisType) |
void | valueChanged(float value) |
void | velocityChanged(float value) |
상세 설명
parent 로 새 QAxisAccumulator 인스턴스를 생성합니다.
Qt3DInput::QAxis 은 입력 장치에서 축의 현재 위치를 보고합니다. 축이 중립 위치로 반환되면 해당 축의 값은 0으로 돌아갑니다. 종종 축의 입력이 다른 방식으로 변수를 제어해야 하는 경우가 있는데, 예를 들어 Qt3DInput::QAxis 의 값을 속도(시간에 대한 1차 미분) 또는 가속도(시간에 대한 2차 미분)로 처리하는 것이 필요합니다. 이 작업은 사용자 코드 또는 Qt3DLogic::QFrameAction 을 사용하여 수행할 수 있지만 이러한 접근 방식은 메인 스레드에 더 많은 작업을 추가하고 본질적으로 필수적이기 때문에 이상적이지 않습니다. Qt3DInput::QAxisAccumulator 클래스를 사용하면 Qt 3D 백엔드에서 이 일반적인 작업을 수행할 수 있으며 선언적 방식으로 지정할 수 있습니다.
멤버 유형 문서
enum QAxisAccumulator::SourceAxisType
상수 | Value |
---|---|
Qt3DInput::QAxisAccumulator::Velocity | 0 |
Qt3DInput::QAxisAccumulator::Acceleration | 1 |
속성 문서
[read-only]
value : const float
누적(통합) 값을 반환합니다.
함수에 액세스합니다:
float | value() const |
알림 신호:
void | valueChanged(float value) |
멤버 함수 문서
QAxisAccumulator::QAxisAccumulator(Qt3DCore::QNode *parent = nullptr)
부모가 parent 인 새 QAxisAccumulator 인스턴스를 생성합니다.
float QAxisAccumulator::scale() const
누적할 때 축 값의 배율을 조정할 양입니다. 축이 제어할 수 있는 최대 속도 또는 가속도라고 생각하면 됩니다.
입력 축 값의 스케일 값을 반환합니다.
참고: 프로퍼티 스케일을 위한 게터 함수입니다.
setScale()도 참조하세요 .
[slot]
void QAxisAccumulator::setSourceAxis(Qt3DInput::QAxis *sourceAxis)
누산기가 값을 수신할 원본 축을 sourceAxis 으로 설정합니다. 이러한 값이 처리되는 방식은 sourceAxisType 및 스케일 속성에 의해 제어됩니다.
참고: sourceAxis 속성에 대한 세터 함수.
sourceAxis()도 참조하세요 .
[slot]
void QAxisAccumulator::setSourceAxisType(Qt3DInput::QAxisAccumulator::SourceAxisType sourceAxisType)
누산기가 sourceAxisType 에서 발생한 값을 처리하는 방법을 설정합니다.
참고: sourceAxisType 속성에 대한 세터 함수입니다.
sourceAxisType()도 참조하세요 .
Qt3DInput::QAxis *QAxisAccumulator::sourceAxis() const
누산기가 축 값을 적분할 QAxis 을 반환합니다.
참고: sourceAxis 프로퍼티에 대한 게터 함수입니다.
setSourceAxis()도 참조하세요 .
Qt3DInput::QAxisAccumulator::SourceAxisType QAxisAccumulator::sourceAxisType() const
누산기가 sourceAxis 의 값을 처리하는 방법을 반환합니다.
참고: sourceAxisType 프로퍼티에 대한 게터 함수입니다.
setSourceAxisType()도 참조하세요 .
float QAxisAccumulator::velocity() const
속도를 반환합니다. sourceAxisType 이 속도(Velocity)로 설정된 경우 이 값은 단순히 소스 축의 값에 배율을 곱한 값입니다. sourceAxisType 이 가속도로 설정된 경우, 속도는 소스 축의 값을 가속도로 사용하여 통합됩니다.
참고: 속성 속도에 대한 게터 함수.
© 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.