Updated ozz-animation to version 0.14.1 @35b2efd4

This commit is contained in:
Martin Felis
2023-03-26 13:28:12 +02:00
parent bf3189ff49
commit 15871f349c
194 changed files with 3495 additions and 1957 deletions
+1
View File
@@ -25,6 +25,7 @@ add_executable(sample_look_at
"${CMAKE_CURRENT_BINARY_DIR}/media/mesh.ozz")
target_link_libraries(sample_look_at
sample_framework)
target_copy_shared_libraries(sample_look_at)
set_target_properties(sample_look_at
PROPERTIES FOLDER "samples")
+18 -22
View File
@@ -25,27 +25,23 @@
// //
//----------------------------------------------------------------------------//
#include "ozz/animation/runtime/animation.h"
#include "ozz/animation/runtime/ik_aim_job.h"
#include "ozz/animation/runtime/local_to_model_job.h"
#include "ozz/animation/runtime/sampling_job.h"
#include "ozz/animation/runtime/skeleton.h"
#include "ozz/base/log.h"
#include "ozz/base/maths/box.h"
#include "ozz/base/maths/simd_math.h"
#include "ozz/base/maths/simd_quaternion.h"
#include "ozz/base/maths/soa_transform.h"
#include "ozz/base/maths/vec_float.h"
#include "ozz/options/options.h"
#include "framework/application.h"
#include "framework/imgui.h"
#include "framework/mesh.h"
#include "framework/renderer.h"
#include "framework/utils.h"
#include "ozz/animation/runtime/animation.h"
#include "ozz/animation/runtime/ik_aim_job.h"
#include "ozz/animation/runtime/local_to_model_job.h"
#include "ozz/animation/runtime/sampling_job.h"
#include "ozz/animation/runtime/skeleton.h"
#include "ozz/base/log.h"
#include "ozz/base/maths/box.h"
#include "ozz/base/maths/simd_math.h"
#include "ozz/base/maths/simd_quaternion.h"
#include "ozz/base/maths/soa_transform.h"
#include "ozz/base/maths/vec_float.h"
#include "ozz/options/options.h"
// Skeleton archive can be specified as an option.
OZZ_OPTIONS_DECLARE_STRING(skeleton,
@@ -106,7 +102,7 @@ class LookAtSampleApplication : public ozz::sample::Application {
// Samples optimized animation at t = animation_time_.
ozz::animation::SamplingJob sampling_job;
sampling_job.animation = &animation_;
sampling_job.cache = &cache_;
sampling_job.context = &context_;
sampling_job.ratio = controller_.time_ratio();
sampling_job.output = make_span(locals_);
if (!sampling_job.Run()) {
@@ -339,8 +335,8 @@ class LookAtSampleApplication : public ozz::sample::Application {
const int num_joints = skeleton_.num_joints();
models_.resize(num_joints);
// Allocates a cache that matches animation requirements.
cache_.Resize(num_joints);
// Allocates a context that matches animation requirements.
context_.Resize(num_joints);
// Reading animation.
if (!ozz::sample::LoadAnimation(OPTIONS_animation, &animation_)) {
@@ -472,8 +468,8 @@ class LookAtSampleApplication : public ozz::sample::Application {
// Runtime animation.
ozz::animation::Animation animation_;
// Sampling cache.
ozz::animation::SamplingCache cache_;
// Sampling context.
ozz::animation::SamplingJob::Context context_;
// Buffer of local transforms as sampled from animation_.
ozz::vector<ozz::math::SoaTransform> locals_;
@@ -482,7 +478,7 @@ class LookAtSampleApplication : public ozz::sample::Application {
ozz::vector<ozz::math::Float4x4> models_;
// Buffer of skinning matrices, result of the joint multiplication of the
// inverse bind pose with the model-space matrix.
// inverse rest pose with the model-space matrix.
ozz::vector<ozz::math::Float4x4> skinning_matrices_;
// The mesh used by the sample.