Update.
[universe.git] / universe.cc
index b0c28dd..92b7a1b 100644 (file)
@@ -7,7 +7,7 @@
 #include "universe.h"
 
 Universe::Universe(int nb_max_polygons,
-                   scalar_t xmax, scalar_t ymax) : _xmax(xmax), _ymax(ymax),
+                   scalar_t width, scalar_t height) : _width(width), _height(height),
                                                    _nb_max_polygons(nb_max_polygons), _nb_polygons(0) {
   _polygons = new Polygon *[_nb_max_polygons];
   for(int n = 0; n < _nb_max_polygons; n++) _polygons[n] = 0;
@@ -104,7 +104,7 @@ bool Universe::update(scalar_t dt) {
   bool result = false;
   apply_collision_forces(dt);
   for(int n = 0; n < _nb_polygons; n++) if(_polygons[n]) {
-    _polygons[n]->apply_border_forces(dt, _xmax, _ymax);
+    _polygons[n]->apply_border_forces(dt, _width, _height);
     result |= _polygons[n]->update(dt);
   }
   return result;