3#include "pixelbullet/scene/components/morph_weights_animation_component.h"
4#include "pixelbullet/scene/components/skeleton_animation_component.h"
5#include "pixelbullet/scene/components/transform_animation_component.h"
6#include "pixelbullet/scene/entity_id.h"
10#include <unordered_map>
20 std::unordered_map<EntityId::ValueType, Transform> values;
22 [[nodiscard]]
bool Empty()
const noexcept
24 return values.empty();
34 const auto it = values.find(entity.Raw());
35 return it != values.end() ? &it->second :
nullptr;
53 const Filesystem& filesystem,
float time_seconds);
57 [[nodiscard]]
static std::optional<SceneTransformOverrides>
60 const Filesystem& filesystem,
float time_seconds);
67 std::string_view clip_name,
float time_seconds);
68 [[nodiscard]]
static std::optional<std::vector<Transform>> SampleRestPoseLocalTransforms(
const SkeletonAnimationComponent& component,
73 std::string_view clip_name);
76enum class LayeredSkeletonPoseBlendMode
85 LayeredSkeletonPoseBlendMode blend_mode = LayeredSkeletonPoseBlendMode::Override;
86 std::vector<std::string> mask_joint_names;
87 float layer_weight = 1.0f;
88 bool reference_pose =
false;
89 std::string primary_clip;
90 std::optional<std::string> secondary_clip;
91 float blend_factor = 0.0f;
92 float time_seconds = 0.0f;
98 [[nodiscard]]
static std::optional<std::vector<Transform>> EvaluateLocalTransforms(
const SkeletonAnimationComponent& component,
100 const Scene& joint_name_scene,
101 const std::vector<LayeredSkeletonPoseLayer>& layers);
106 std::unordered_map<EntityId::ValueType, std::vector<float>> values;
108 [[nodiscard]]
bool Empty()
const noexcept
110 return values.empty();
113 [[nodiscard]]
const std::vector<float>* Find(
EntityId entity)
const noexcept
120 const auto it = values.find(entity.Raw());
121 return it != values.end() ? &it->second :
nullptr;
Definition entity_id.h:11
Definition filesystem.h:19
Definition animation_evaluation.h:96
Definition animation_evaluation.h:126
Definition animation_evaluation.h:49
Definition animation_state_component.h:10
Definition animation_evaluation.h:83
Definition morph_weights_animation_component.h:100
Definition animation_evaluation.h:105
Definition skeleton_animation_component.h:33