change to manager namespace, cleaned indentation in manager
[physics.git] / src / entityManager.cpp
index 351808a..5a6249d 100644 (file)
@@ -27,76 +27,76 @@ bool clearPhysics;
 
 /// ***** Public Methods *****
 
-void entityManager::init()
+void manager::init()
 {
 }
-void entityManager::clean()
+void manager::clean()
 {
 }
 
-void entityManager::add(Entity* e)
+void manager::add(Entity* e)
 {
     {
-    Particle* p = dynamic_cast<Particle*>(e);
-    if( p != 0 )
-    {
-        particles_To_Add.insert(p);
-        return;
-    }
+        Particle* p = dynamic_cast<Particle*>(e);
+        if( p != 0 )
+        {
+            particles_To_Add.insert(p);
+            return;
+        }
     }
 
     {
-    PhysicsEntity* p = dynamic_cast<PhysicsEntity*>(e);
-    if( p != 0 )
-    {
-        physics_To_Add.insert(p);
-        return;
-    }
+        PhysicsEntity* p = dynamic_cast<PhysicsEntity*>(e);
+        if( p != 0 )
+        {
+            physics_To_Add.insert(p);
+            return;
+        }
     }
 
     std::cerr << "ENTITY TYPE NOT SUPPORTED BY addEntity()!!";
     std::cerr << std::endl;
 }
-void entityManager::remove(Entity* e)
+void manager::remove(Entity* e)
 {
     {
-    Particle* p = dynamic_cast<Particle*>(e);
-    if( p != 0 )
-    {
-        particles_To_Remove.insert(p);
-        return;
-    }
+        Particle* p = dynamic_cast<Particle*>(e);
+        if( p != 0 )
+        {
+            particles_To_Remove.insert(p);
+            return;
+        }
     }
 
     {
-    PhysicsEntity* p = dynamic_cast<PhysicsEntity*>(e);
-    if( p != 0 )
-    {
-        physics_To_Remove.insert(p);
-        return;
-    }
+        PhysicsEntity* p = dynamic_cast<PhysicsEntity*>(e);
+        if( p != 0 )
+        {
+            physics_To_Remove.insert(p);
+            return;
+        }
     }
 
     std::cerr << "ENTITY TYPE NOT SUPPORTED BY deleteEntity()!!";
     std::cerr << std::endl;
 }
 
-void entityManager::clear()
+void manager::clear()
 {
     clearParticles = true;
     clearPhysics = true;
 }
 
-void entityManager::handleInput()
+void manager::handleInput()
 {
     // TODO
 }
-void entityManager::update(float time_step)
+void manager::update(float time_step)
 {
     updateParticles(time_step);
     updatePhysics(time_step);
 }
-void entityManager::draw()
+void manager::draw()
 {
     // update active Particle*s
     for( setPart::iterator it = active_Particles.begin();