Updated ozz-animation to version 0.14.1 @35b2efd4
This commit is contained in:
@@ -27,7 +27,7 @@ void Blend2Node::Evaluate(AnimGraphContext& context) {
|
||||
ozz::animation::BlendingJob blend_job;
|
||||
blend_job.threshold = ozz::animation::BlendingJob().threshold;
|
||||
blend_job.layers = layers;
|
||||
blend_job.bind_pose = context.m_skeleton->joint_bind_poses();
|
||||
blend_job.rest_pose = context.m_skeleton->joint_rest_poses();
|
||||
blend_job.output = make_span(o_output->m_local_matrices);
|
||||
|
||||
if (!blend_job.Run()) {
|
||||
@@ -69,7 +69,7 @@ bool AnimSamplerNode::Init(AnimGraphContext& context) {
|
||||
}
|
||||
|
||||
assert (context.m_skeleton != nullptr);
|
||||
m_sampling_cache.Resize(context.m_skeleton->num_joints());
|
||||
m_sampling_context.Resize(context.m_skeleton->num_joints());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ void AnimSamplerNode::Evaluate(AnimGraphContext& context) {
|
||||
|
||||
ozz::animation::SamplingJob sampling_job;
|
||||
sampling_job.animation = m_animation;
|
||||
sampling_job.cache = &m_sampling_cache;
|
||||
sampling_job.context = &m_sampling_context;
|
||||
sampling_job.ratio = m_time_now;
|
||||
sampling_job.output = make_span(o_output->m_local_matrices);
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ struct NodeSocketAccessor<SpeedScaleNode> : public NodeSocketAccessorBase {
|
||||
struct AnimSamplerNode : public AnimNode {
|
||||
AnimData* o_output = nullptr;
|
||||
std::string m_filename;
|
||||
ozz::animation::SamplingCache m_sampling_cache;
|
||||
ozz::animation::SamplingJob::Context m_sampling_context;
|
||||
ozz::animation::Animation* m_animation = nullptr;
|
||||
|
||||
virtual ~AnimSamplerNode();
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@ bool SkinnedMesh::LoadSkeleton(const char* filename) {
|
||||
const int num_joints = m_skeleton.num_joints();
|
||||
m_local_matrices.resize(num_soa_joints);
|
||||
m_model_matrices.resize(num_joints);
|
||||
m_cache.Resize(num_joints);
|
||||
m_sampling_context.Resize(num_joints);
|
||||
std::cout << "Successfully loaded " << skeleton_file
|
||||
<< " (soa: " << num_soa_joints << ", joints: " << num_joints << ")"
|
||||
<< std::endl;
|
||||
@@ -129,7 +129,7 @@ void SkinnedMesh::DrawDebugUi() {
|
||||
|
||||
ozz::animation::SamplingJob sampling_job;
|
||||
sampling_job.animation = m_animations[selected];
|
||||
sampling_job.cache = &m_cache;
|
||||
sampling_job.context = &m_sampling_context;
|
||||
sampling_job.ratio = m_override_ratio;
|
||||
sampling_job.output = make_span(m_local_matrices);
|
||||
if (!sampling_job.Run()) {
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ struct SkinnedMesh {
|
||||
std::vector<SyncTrack> m_animation_sync_track;
|
||||
ozz::animation::Skeleton m_skeleton;
|
||||
ozz::animation::Animation* m_current_animation;
|
||||
ozz::animation::SamplingCache m_cache;
|
||||
ozz::animation::SamplingJob::Context m_sampling_context;
|
||||
ozz::vector<ozz::math::SoaTransform> m_local_matrices;
|
||||
ozz::vector<ozz::math::Float4x4> m_model_matrices;
|
||||
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ static void draw_imgui(ImDrawData*);
|
||||
typedef struct {
|
||||
ozz::animation::Skeleton skeleton;
|
||||
ozz::animation::Animation animation;
|
||||
ozz::animation::SamplingCache cache;
|
||||
ozz::animation::SamplingJob::Context sampling_context;
|
||||
ozz::vector<ozz::math::SoaTransform> local_matrices;
|
||||
ozz::vector<ozz::math::Float4x4> model_matrices;
|
||||
} ozz_t;
|
||||
|
||||
Reference in New Issue
Block a user