38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "domain/Project.h"
|
|
|
|
#include <QHash>
|
|
#include <QPointF>
|
|
#include <QString>
|
|
#include <QVector>
|
|
|
|
namespace core::eval {
|
|
|
|
struct ResolvedEntity {
|
|
core::Project::Entity entity; // 拷贝:originWorld/imageTopLeftWorld 已替换为求值后的值
|
|
double opacity = 1.0; // 0..1
|
|
};
|
|
|
|
struct ResolvedTool {
|
|
core::Project::Tool tool; // 拷贝:originWorld 已替换为求值后的值
|
|
double opacity = 1.0; // 0..1
|
|
};
|
|
|
|
struct ResolvedCamera {
|
|
core::Project::Camera camera; // 拷贝:centerWorld / viewScale 已替换为求值后的值
|
|
};
|
|
|
|
struct ResolvedProjectFrame {
|
|
QVector<ResolvedEntity> entities;
|
|
QVector<ResolvedTool> tools;
|
|
QVector<ResolvedCamera> cameras;
|
|
};
|
|
|
|
/// 逐帧求值:处理父子跟随与工具可见性淡入淡出。animationId 为空时使用 activeAnimationId(含既有回退)。
|
|
ResolvedProjectFrame evaluateAtFrame(const core::Project& project, int frame, int fadeFrames = 10,
|
|
const QString& animationId = QString());
|
|
|
|
} // namespace core::eval
|
|
|