Update.
[universe.git] / dummy.cc
index 73a06f3..67b2fd1 100644 (file)
--- a/dummy.cc
+++ b/dummy.cc
@@ -1,17 +1,6 @@
 
 
-////////////////////////////////////////////////////////////////////////////////
-// This program is free software; you can redistribute it and/or              //
-// modify it under the terms of the GNU General Public License                //
-// version 2 as published by the Free Software Foundation.                    //
-//                                                                            //
-// This program is distributed in the hope that it will be useful, but        //
-// WITHOUT ANY WARRANTY; without even the implied warranty of                 //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU          //
-// General Public License for more details.                                   //
-//                                                                            //
-// Written and (C) by François Fleuret                                        //
-// Contact <francois.fleuret@epfl.ch> for comments & bug reports              //
-////////////////////////////////////////////////////////////////////////////////
+// Written and (C) by Francois Fleuret
+// Contact <francois.fleuret@idiap.ch> for comments & bug reports
 
 #include "task.h"
 #include "universe.h"
 
 #include "task.h"
 #include "universe.h"
@@ -20,7 +9,7 @@
 class Dummy : public Task {
 public:
 
 class Dummy : public Task {
 public:
 
-  virtual char *name() { return "DUMMY"; }
+  virtual const char *name() { return "DUMMY"; }
 
   virtual int nb_degrees() { return 1; }
 
 
   virtual int nb_degrees() { return 1; }
 
@@ -43,7 +32,7 @@ public:
       p->set_vertex(3, 0, height);
       p->set_position(x0 + deltax/2, y0 + deltay/2, 0);
       p->set_speed(0, 0, 0);
       p->set_vertex(3, 0, height);
       p->set_position(x0 + deltax/2, y0 + deltay/2, 0);
       p->set_speed(0, 0, 0);
-      universe->initialize(p);
+      universe->initialize_polygon(p);
       universe->add_polygon(p);
     }
 
       universe->add_polygon(p);
     }
 
@@ -57,7 +46,7 @@ public:
       p->set_vertex(3, 0, height);
       p->set_position(x0, y0 + deltay/2, 0);
       p->set_speed(0, 0, 0);
       p->set_vertex(3, 0, height);
       p->set_position(x0, y0 + deltay/2, 0);
       p->set_speed(0, 0, 0);
-      universe->initialize(p);
+      universe->initialize_polygon(p);
       universe->add_polygon(p);
     }
 
       universe->add_polygon(p);
     }
 
@@ -70,7 +59,7 @@ public:
     p->set_vertex(3, 0, height);
     p->set_position(x0 + deltax, y0 + deltay/2, 0);
     p->set_speed(0, 0, 0);
     p->set_vertex(3, 0, height);
     p->set_position(x0 + deltax, y0 + deltay/2, 0);
     p->set_speed(0, 0, 0);
-    universe->initialize(p);
+    universe->initialize_polygon(p);
     universe->add_polygon(p);
 
     p = new Polygon(1.0, 0.8, 0.2, 0.8, 0, 0, 8);
     universe->add_polygon(p);
 
     p = new Polygon(1.0, 0.8, 0.2, 0.8, 0, 0, 8);
@@ -84,7 +73,7 @@ public:
     p->set_vertex(7,   0.0,  40.0);
     p->set_position(120, 420, 0);
     p->set_speed(0, 0, 0);
     p->set_vertex(7,   0.0,  40.0);
     p->set_position(120, 420, 0);
     p->set_speed(0, 0, 0);
-    universe->initialize(p);
+    universe->initialize_polygon(p);
     universe->add_polygon(p);
 
     int ne = 25;
     universe->add_polygon(p);
 
     int ne = 25;
@@ -95,7 +84,7 @@ public:
     }
     p->set_position(400, 400, 0);
     p->set_speed(0, 0, 0);
     }
     p->set_position(400, 400, 0);
     p->set_speed(0, 0, 0);
-    universe->initialize(p);
+    universe->initialize_polygon(p);
     universe->add_polygon(p);
   }
 
     universe->add_polygon(p);
   }