initial commit
This commit is contained in:
33
client/core/animation/AnimationSampling.h
Normal file
33
client/core/animation/AnimationSampling.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "domain/Project.h"
|
||||
|
||||
#include <QPointF>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
namespace core {
|
||||
|
||||
enum class KeyInterpolation { Hold, Linear };
|
||||
|
||||
// 关键帧按 frame 排序后使用;内部会对副本排序以保证稳健。
|
||||
[[nodiscard]] QPointF sampleLocation(const QVector<Project::Entity::KeyframeVec2>& keys,
|
||||
int frame,
|
||||
const QPointF& fallbackOrigin,
|
||||
KeyInterpolation mode);
|
||||
|
||||
[[nodiscard]] double sampleDepthScale01(const QVector<Project::Entity::KeyframeFloat01>& keys,
|
||||
int frame,
|
||||
double fallback01,
|
||||
KeyInterpolation mode);
|
||||
|
||||
[[nodiscard]] double sampleUserScale(const QVector<Project::Entity::KeyframeDouble>& keys,
|
||||
int frame,
|
||||
double fallback,
|
||||
KeyInterpolation mode);
|
||||
|
||||
[[nodiscard]] QString sampleImagePath(const QVector<Project::Entity::ImageFrame>& frames,
|
||||
int frame,
|
||||
const QString& fallbackPath);
|
||||
|
||||
} // namespace core
|
||||
Reference in New Issue
Block a user