QAbstractAnimationClip Class
class Qt3DAnimation::QAbstractAnimationClipQAbstractAnimationClip은 키 프레임 애니메이션 데이터를 제공하는 타입의 베이스 클래스입니다. 더 보기...
Header: | #include <QAbstractAnimationClip> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3danimation) target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
qmake: | QT += 3danimation |
상속합니다: | Qt3DCore::QNode |
상속 대상 | Qt3DAnimation::QAnimationClip 그리고 Qt3DAnimation::QAnimationClipLoader |
Status: | Deprecated |
속성
- duration : const float
공공 기능
virtual | ~QAbstractAnimationClip() |
float | duration() const |
신호
void | durationChanged(float duration) |
상세 설명
Qt 3D 애니메이션 모듈에서 키 프레임 애니메이션 프레임워크를 활용하려면 사용 중인 애니메이터 컴포넌트에 키 프레임 애니메이션 데이터를 제공해야 합니다. 애니메이션 데이터는 QAbstractAnimationClip의 구체적인 서브클래스 중 하나에서 제공됩니다:
QAnimationClip 애플리케이션 내에서 프로그래밍 방식으로 애니메이션 데이터를 생성하려는 경우 이 클래스를 사용해야 합니다. 실제 데이터는 QAnimationClipData 값 유형으로 설정됩니다.
아티스트가 만든 파일에서 베이크된 애니메이션 데이터를 로드하는 경우 QAnimationClipLoader 클래스를 사용하고 source
속성을 설정합니다.
위의 방법을 사용하여 애니메이션 클립을 데이터로 채우면 Qt 3D 애니메이션 백엔드에서 읽기 전용 지속 시간 속성이 업데이트됩니다.
애니메이션 클립의 일반적인 사용법은 다음과 같습니다:
auto animator = new QClipAnimator(); auto clip = new QAnimationClipLoader(); clip->setSource(QUrl::fromLocalFile("bounce.json")); animator->setClip(clip); animator->setChannelMapper(...); animator->setRunning(true);
애니메이션 클립은 애니메이션 블렌드 트리의 리프 노드 값으로도 사용됩니다:
// Create leaf nodes of blend tree auto slideClipValue = new QClipBlendValue( new QAnimationClipLoader(QUrl::fromLocalFile("slide.json"))); auto bounceClipValue = new QClipBlendValue( new QAnimationClipLoader(QUrl::fromLocalFile("bounce.json"))); // Create blend tree inner node auto additiveNode = new QAdditiveClipBlend(); additiveNode->setBaseClip(slideClipValue); additiveNode->setAdditiveClip(bounceClipValue); additiveNode->setAdditiveFactor(0.5f); // Run the animator auto animator = new QBlendedClipAnimator(); animator->setBlendTree(additiveNode); animator->setChannelMapper(...); animator->setRunning(true);
Qt3DAnimation::QAnimationClip 및 Qt3DAnimation::QAnimationClipLoader 을참조하세요 .
© 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.