From c909a27227a21b4c1860f6eaab041ed8a1cd9431 Mon Sep 17 00:00:00 2001 From: Ranveer Aggarwal Date: Fri, 3 Oct 2014 22:22:32 +0530 Subject: [PATCH] Finalised stuff. Fin Ende --- README.md | 1 + body_draw.cpp | 2 +- body_manip.cpp | 6 +++--- transformer.cpp | 10 +++++----- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 33ba8f8..1f6f40d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ #TRANSFORMER +The report for this bot can be found at http://www.cse.iitb.ac.in/~ranveer/graphics_2_1/ ##Movements The components of the transformer's body are mapped to keys. Pressing one of these keys will activate the corresponding component. diff --git a/body_draw.cpp b/body_draw.cpp index 8931880..204a03f 100644 --- a/body_draw.cpp +++ b/body_draw.cpp @@ -9,7 +9,7 @@ double body::shoulder_x_max = 135; double body::shoulder_y_min = 0; double body::shoulder_y_max = 135; double body::shoulder_z_min = -225; -double body::shoulder_z_max = 0; +double body::shoulder_z_max = 225; double body::waist_x_min = 0; double body::waist_x_max = 180; diff --git a/body_manip.cpp b/body_manip.cpp index 43a06fd..57e737e 100644 --- a/body_manip.cpp +++ b/body_manip.cpp @@ -242,10 +242,10 @@ void body::move_left_hip_y(double t) void body::move_left_hip_z(double t) { double new_t = left_hip_z + t; - if(new_t > hip_z_max) + if(new_t < hip_z_max) new_t = hip_z_max; - else if(new_t < hip_z_min) - new_t = hip_z_min; + else if(new_t > -hip_z_min) + new_t = -hip_z_min; left_hip_z = new_t; } diff --git a/transformer.cpp b/transformer.cpp index c42aea8..8f43d06 100644 --- a/transformer.cpp +++ b/transformer.cpp @@ -40,11 +40,11 @@ int main(int argc, char** argv) std::cerr<<"GLEW Init Failed : %s"<