Files
hfut-bishe/client/core/eval/ProjectEvaluator.h

32 lines
779 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#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 ResolvedProjectFrame {
QVector<ResolvedEntity> entities;
QVector<ResolvedTool> tools;
};
/// 逐帧求值:处理父子跟随与工具可见性淡入淡出。
ResolvedProjectFrame evaluateAtFrame(const core::Project& project, int frame, int fadeFrames = 10);
} // namespace core::eval