이 페이지에서

Qt3DInput::QAxisAccumulator Class

class Qt3DInput::QAxisAccumulator

QAxisAccumulator는 QAxis 에서 제공하는 속도 또는 가속도 데이터를 처리합니다. 더 보기...

헤더: #include <qaxisaccumulator.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dinput)
target_link_libraries(mytarget PRIVATE Qt6::3dinput)
qmake: QT += 3dinput
QML에서: AxisAccumulator
상속: Qt3DCore::QComponent
상태: 사용 중단됨

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

공개 유형

enum SourceAxisType { Velocity, Acceleration }

속성

공개 함수

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 를 사용하여 수행할 수 있지만, 이러한 접근 방식은 메인 스레드에 추가적인 부하를 주고 본질적으로 명령형(imperative)이기 때문에 이상적이지 않습니다. Qt3DInput::QAxisAccumulator 클래스를 사용하면 이 일반적인 작업을 Qt 3D 백엔드에서 수행하고 선언적인 방식으로 지정할 수 있습니다.

멤버 유형 문서

enum QAxisAccumulator::SourceAxisType

상수상수
Qt3DInput::QAxisAccumulator::Velocity0
Qt3DInput::QAxisAccumulator::Acceleration1

속성 문서

scale : float

누적 시 축 값을 조정할 배율을 저장합니다. 이는 해당 축이 제어할 수 있는 최대 속도 또는 가속도로 볼 수 있습니다.

액세스 함수:

float scale() const
void setScale(float scale)

알림 신호:

void scaleChanged(float scale)

sourceAxis : Qt3DInput::QAxis*

누산기가 축 값을 적분해야 하는 QAxis를 보관합니다.

액세스 함수:

Qt3DInput::QAxis *sourceAxis() const
void setSourceAxis(Qt3DInput::QAxis *sourceAxis)

알림 신호:

void sourceAxisChanged(Qt3DInput::QAxis *sourceAxis)

sourceAxisType : SourceAxisType

소스 축의 값을 누적기가 어떻게 처리할지 지정하는 유형을 저장합니다.

액세스 함수:

Qt3DInput::QAxisAccumulator::SourceAxisType sourceAxisType() const
void setSourceAxisType(Qt3DInput::QAxisAccumulator::SourceAxisType sourceAxisType)

알림 신호:

void sourceAxisTypeChanged(Qt3DInput::QAxisAccumulator::SourceAxisType sourceAxisType)

[read-only] value : float

누적(적분)된 값을 반환합니다.

액세스 함수:

float value() const

알림 신호:

void valueChanged(float value)

[read-only] velocity : float

속도 값을 저장합니다.

sourceAxisType 가 Velocity로 설정된 경우, 이는 소스 축의 값에 스케일을 곱한 값이 됩니다. sourceAxisType 가 Acceleration으로 설정된 경우, 소스 축의 값을 가속도로 사용하여 속도를 적분합니다.

액세스 함수:

float velocity() const

알림 신호:

void velocityChanged(float value)

멤버 함수 문서

QAxisAccumulator::QAxisAccumulator(Qt3DCore::QNode *parent = nullptr)

parent 를 부모로 하는 새로운 QAxisAccumulator 인스턴스를 생성합니다.

float QAxisAccumulator::scale() const

누적 시 축 값을 스케일링할 배율입니다. 이는 해당 축이 제어할 수 있는 최대 속도 또는 가속도로 생각할 수 있습니다.

입력 축 값이 스케일링되는 비율을 반환합니다.

참고: scale 속성에 대한게터 함수입니다.

setScale()도 참조하십시오 .

[slot] void QAxisAccumulator::setSourceAxis(Qt3DInput::QAxis *sourceAxis)

누적기가 값을 수신할 소스 축을 ` sourceAxis`로 설정합니다. 이러한 값이 어떻게 처리되는지는 ` sourceAxisType ` 및 `scale` 속성에 의해 제어됩니다.

참고: 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 ’가 ‘Acceleration’으로 설정된 경우, 소스 축의 값을 가속도로 사용하여 속도를 적분합니다.

참고: velocity 속성에 대한게터 함수입니다.

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