aboutsummaryrefslogtreecommitdiffstats
path: root/dev/a4-dance/dance_app.cc
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2021-11-10 13:40:26 -0600
committerMatt Strapp <matt@mattstrapp.net>2021-11-10 13:40:26 -0600
commit4be57d24a1fe1540527c4fc80e978cbace528958 (patch)
tree86e8f20ec08f2b6ca8d25c4a13ad74363914708d /dev/a4-dance/dance_app.cc
parentMerge branch 'support-code' of https://github.umn.edu/umn-csci-4611-f21/share... (diff)
downloadcsci4611-4be57d24a1fe1540527c4fc80e978cbace528958.tar
csci4611-4be57d24a1fe1540527c4fc80e978cbace528958.tar.gz
csci4611-4be57d24a1fe1540527c4fc80e978cbace528958.tar.bz2
csci4611-4be57d24a1fe1540527c4fc80e978cbace528958.tar.lz
csci4611-4be57d24a1fe1540527c4fc80e978cbace528958.tar.xz
csci4611-4be57d24a1fe1540527c4fc80e978cbace528958.tar.zst
csci4611-4be57d24a1fe1540527c4fc80e978cbace528958.zip
Diffstat (limited to '')
-rw-r--r--dev/a4-dance/dance_app.cc31
1 files changed, 23 insertions, 8 deletions
diff --git a/dev/a4-dance/dance_app.cc b/dev/a4-dance/dance_app.cc
index 84f394a..3393cec 100644
--- a/dev/a4-dance/dance_app.cc
+++ b/dev/a4-dance/dance_app.cc
@@ -62,10 +62,25 @@ DanceApp::DanceApp() : GraphicsApp(1280,768, "So You Think Ants Can Dance") {
// you can use the same dance moves that we did. We used:
// 05_10.amc, 05_09.amc, 05_20.amc, and 05_06.amc -- you need to trim them
// isolate the interesting portions of the motion.
-
-
-
-
+ ballet_special2_.LoadFromAMC(Platform::FindFile("05_10.amc", searchPath_), *ballet_ant_.skeleton_ptr());
+ ballet_special2_.TrimFront(280);
+ ballet_special2_.TrimBack(200);
+ ballet_special2_.CalcRelativeTranslations();
+
+ ballet_special3_.LoadFromAMC(Platform::FindFile("05_09.amc", searchPath_), *ballet_ant_.skeleton_ptr());
+ ballet_special3_.TrimFront(280);
+ ballet_special3_.TrimBack(200);
+ ballet_special3_.CalcRelativeTranslations();
+
+ ballet_special4_.LoadFromAMC(Platform::FindFile("05_20.amc", searchPath_), *ballet_ant_.skeleton_ptr());
+ ballet_special4_.TrimFront(280);
+ ballet_special4_.TrimBack(200);
+ ballet_special4_.CalcRelativeTranslations();
+
+ ballet_special5_.LoadFromAMC(Platform::FindFile("05_06.amc", searchPath_), *ballet_ant_.skeleton_ptr());
+ ballet_special5_.TrimFront(280);
+ ballet_special5_.TrimBack(200);
+ ballet_special5_.CalcRelativeTranslations();
// 3. Start the base loop motion
ballet_ant_.Play(ballet_base_loop_);
@@ -121,22 +136,22 @@ void DanceApp::OnMotion1BtnPressed() {
void DanceApp::OnMotion2BtnPressed() {
// TODO: add a call similar to this:
- // ballet_ant_.OverlayClip(ballet_special2_, 100);
+ ballet_ant_.OverlayClip(ballet_special2_, 100);
}
void DanceApp::OnMotion3BtnPressed() {
// TODO: add a call similar to this:
- // ballet_ant_.OverlayClip(ballet_special3_, 100);
+ ballet_ant_.OverlayClip(ballet_special3_, 100);
}
void DanceApp::OnMotion4BtnPressed() {
// TODO: add a call similar to this:
- // ballet_ant_.OverlayClip(ballet_special4_, 100);
+ ballet_ant_.OverlayClip(ballet_special4_, 100);
}
void DanceApp::OnMotion5BtnPressed() {
// TODO: add a call similar to this:
- // ballet_ant_.OverlayClip(ballet_special5_, 100);
+ ballet_ant_.OverlayClip(ballet_special5_, 100);
}
void DanceApp::UpdateSimulation(double dt) {