summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2012-12-11 12:11:11 -0800
committerMatt Turner <mattst88@gmail.com>2012-12-11 12:11:11 -0800
commit156741f3e9f251bd873db5bf37a94f52fec7bf1d (patch)
treeb4c15d62044dc5778c2e145d74a99f8a2d8b47d9
parent6864066ecdf3291d2a443ab05bd2e793a38af683 (diff)
Generate forward-kinematic transformations for each of the bones
-rw-r--r--src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 78050f3..1614479 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -309,10 +309,10 @@ Redisplay(void)
transformations[0] = model;
for (unsigned i = 1; i < (ARRAY_SIZE(transformations) - 1); i++) {
- /* FINISHME: Generate forward-kinematic transformations for
- * FINISHME: each of the bones.
- */
- transformations[i] = model;
+ transformations[i] = transformations[i - 1] *
+ gluTranslate(0.0f, 2.0f * i, 0.0f) *
+ gluRotate(GLUvec4(1.0f, 0.0f, 0.0f, 0.0f), angle) *
+ gluTranslate(0.0f, -2.0f * i, 0.0f);
}
transformations[5] = transformations[4];