Skip to content

Commit

Permalink
Implements missing DrawMotion implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumeblanc committed Apr 28, 2024
1 parent 65de51f commit 92efb06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions samples/framework/motion_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ bool MotionSampler::Update(const MotionTrack& _motion, float _ratio, int _loops,
return true;
}

bool DrawMotion(ozz::sample::Renderer* _renderer,
const MotionTrack& _motion_track, float _from, float _at,
float _to, float _step, const ozz::math::Float4x4& _transform) {
return DrawMotion(_renderer, _motion_track, _from, _at, _to, _step,
_transform, ozz::math::Quaternion::identity());
}

// Uses a MotionSampler to estimate past and future positions arount _at.
// This is a great test for the MotionSampler and MotionAccumulator.
bool DrawMotion(ozz::sample::Renderer* _renderer,
Expand Down
5 changes: 2 additions & 3 deletions samples/motion_extraction/sample_motion_extraction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@ class MotionExtractionSampleApplication : public ozz::sample::Application {
// Draw motion tracks.
const float at = controller_.time_ratio();
const float step = 1.f / (animation_.duration() * 60.f);
success &=
ozz::sample::DrawMotion(_renderer, motion_track_, 0.f, at, 1.f, step,
transform_, ozz::math::Quaternion::identity());
success &= ozz::sample::DrawMotion(_renderer, motion_track_, 0.f, at, 1.f,
step, transform_);
return success;
}

Expand Down

0 comments on commit 92efb06

Please sign in to comment.