Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

rotation.cc

Go to the documentation of this file.
00001 #include "rotation.hh"
00002 #include "register.hh"
00003 #include <GL/gl.h>
00004 #include "abstractworld.hh"
00005 
00006 namespace anoid {
00007     namespace plugin {
00008 
00009         using namespace config;
00010 
00011         void Rotation::redraw() {
00012             glMultMatrixd(rotation);
00013             Ability::redraw();
00014         }
00015 
00016         void Rotation::init(Configuration &c) {
00017             rotation[1] = rotation[2] = rotation[3] =
00018                 rotation[4] = rotation[6] = rotation[7] =
00019                 rotation[8] = rotation[9] = rotation[11] =
00020                 rotation[12] = rotation[13] = rotation[14] = 0.0;
00021             rotation[0] = rotation[5] = rotation[10] = rotation[15] = 1.0; 
00024             /* rotation = c.getMatrix("rotation"); */
00025             Ability::init(c);
00026             registerName("Rotation");
00027 
00028             getWorld()->listen(parentElement, "CollisionMessage");
00029         }
00030 
00031         double *Rotation::getRotation() {
00032             return rotation;
00033         }
00034 
00035         Register(Rotation)
00036 
00037     };
00038 };

Anoid NG © Michael Westergaard, Martin Stig Stissing, Ronni Michael Laursen, and Kristian Bisgaard Lassen