Skip to content

Commit

Permalink
Cleans application interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumeblanc committed May 20, 2024
1 parent 0c6f77b commit e409377
Show file tree
Hide file tree
Showing 18 changed files with 8 additions and 63 deletions.
2 changes: 0 additions & 2 deletions samples/additive/sample_additive.cc
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ class AdditiveBlendSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
char label[64];

Expand Down
2 changes: 0 additions & 2 deletions samples/attach/sample_attach.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ class AttachSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
// Exposes animation runtime playback controls.
{
Expand Down
2 changes: 0 additions & 2 deletions samples/baked/sample_baked.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ class BakedSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

virtual bool OnDisplay(ozz::sample::Renderer* _renderer) {
// Render a 1m size boxes for every joint. The scale of each box come from
// the animation.
Expand Down
2 changes: 0 additions & 2 deletions samples/blend/sample_blend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ class BlendSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
// Exposes blending parameters.
{
Expand Down
2 changes: 0 additions & 2 deletions samples/foot_ik/sample_foot_ik.cc
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,6 @@ class FootIKSampleApplication : public ozz::sample::Application {
return found == 3;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
char label[32];

Expand Down
37 changes: 8 additions & 29 deletions samples/framework/application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -670,44 +670,23 @@ bool Application::OnInitialize() { return true; }

void Application::OnDestroy() {}

bool Application::OnUpdate(float _dt, float _time) {
(void)_dt;
(void)_time;
return true;
}
bool Application::OnUpdate(float, float) { return true; }

bool Application::OnGui(ImGui* _im_gui) {
(void)_im_gui;
return true;
}
bool Application::OnGui(ImGui*) { return true; }

bool Application::OnFloatingGui(ImGui* _im_gui) {
(void)_im_gui;
return true;
}
bool Application::OnFloatingGui(ImGui*) { return true; }

bool Application::OnDisplay(Renderer* _renderer) {
(void)_renderer;
return true;
}
bool Application::OnDisplay(Renderer*) { return true; }

bool Application::GetCameraInitialSetup(math::Float3* _center,
math::Float2* _angles,
float* _distance) const {
(void)_center;
(void)_angles;
(void)_distance;
bool Application::GetCameraInitialSetup(math::Float3*, math::Float2*,
float*) const {
return false;
}

// Default implementation doesn't override camera location.
bool Application::GetCameraOverride(math::Float4x4* _transform) const {
(void)_transform;
assert(_transform);
return false;
}
bool Application::GetCameraOverride(math::Float4x4*) const { return false; }

void Application::GetSceneBounds(math::Box* _bound) const { (void)_bound; }
void Application::GetSceneBounds(math::Box*) const {}

math::Float2 Application::WorldToScreen(const math::Float3& _world) const {
const math::SimdFloat4 ndc =
Expand Down
2 changes: 0 additions & 2 deletions samples/look_at/sample_look_at.cc
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,6 @@ class LookAtSampleApplication : public ozz::sample::Application {
return count == i;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
char label[64];

Expand Down
2 changes: 0 additions & 2 deletions samples/millipede/sample_millipede.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ class MillipedeSampleApplication : public ozz::sample::Application {

virtual bool OnInitialize() { return Build(); }

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
// Rebuilds all if the number of joints has changed.
int joints = skeleton_->num_joints();
Expand Down
2 changes: 0 additions & 2 deletions samples/motion_blend/sample_motion_blend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,6 @@ class MotionBlendSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
char label[64];

Expand Down
2 changes: 0 additions & 2 deletions samples/motion_extraction/sample_motion_extraction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,6 @@ class MotionExtractionSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
// Exposes animation runtime playback controls.
{
Expand Down
2 changes: 0 additions & 2 deletions samples/motion_playback/sample_motion_playback.cc
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ class MotionPlaybackSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
char label[64];
// Exposes animation runtime playback controls.
Expand Down
2 changes: 0 additions & 2 deletions samples/multithread/sample_multithread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@ class MultithreadSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
// Exposes number of characters.
{
Expand Down
2 changes: 0 additions & 2 deletions samples/optimize/sample_optimize.cc
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,6 @@ class OptimizeSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

bool BuildAnimations() {
// Instantiate an animation builder.
ozz::animation::offline::AnimationBuilder animation_builder;
Expand Down
2 changes: 0 additions & 2 deletions samples/partial_blend/sample_partial_blend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,6 @@ class PartialBlendSampleApplication : public ozz::sample::Application {
ozz::animation::IterateJointsDF(skeleton_, upper_it, upper_body_root_);
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
// Exposes blending parameters.
{
Expand Down
2 changes: 0 additions & 2 deletions samples/playback/sample_playback.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ class PlaybackSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
// Exposes animation runtime playback controls.
{
Expand Down
2 changes: 0 additions & 2 deletions samples/skinning/sample_skinning.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ class SkinningSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
// Exposes model informations.
{
Expand Down
2 changes: 0 additions & 2 deletions samples/two_bone_ik/sample_two_bone_ik.cc
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,6 @@ class TwoBoneIKSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
char label[32];

Expand Down
2 changes: 0 additions & 2 deletions samples/user_channel/sample_user_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,6 @@ class UserChannelSampleApplication : public ozz::sample::Application {
return true;
}

virtual void OnDestroy() {}

virtual bool OnGui(ozz::sample::ImGui* _im_gui) {
// Exposes sample specific parameters.
{
Expand Down

0 comments on commit e409377

Please sign in to comment.