aboutsummaryrefslogtreecommitdiffstats
path: root/dev/a4-dance/dance_app.cc
diff options
context:
space:
mode:
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) {