Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9406 in orxonox.OLD for trunk/src/lib/collision_reaction


Ignore:
Timestamp:
Jul 24, 2006, 11:09:47 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the proxy back

merged with commandsvn merge -r9346:HEAD https://svn.orxonox.net/orxonox/branches/proxy .

no conflicts

Location:
trunk/src/lib/collision_reaction
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_reaction/collision.cc

    r8190 r9406  
    1919#include "debug.h"
    2020
    21 using namespace std;
     21
    2222
    2323
  • trunk/src/lib/collision_reaction/collision_event.cc

    r8190 r9406  
    1919#include "debug.h"
    2020
    21 using namespace std;
     21
    2222
    2323
  • trunk/src/lib/collision_reaction/collision_handle.cc

    r9235 r9406  
    2929#include "debug.h"
    3030
    31 using namespace std;
     31
    3232
    3333
     
    178178
    179179 c->registerCollisionEvent(collisionEvent);
    180  PRINTF(5)("Registering Collision Event: %s, %s\n", collisionEvent->getEntityA()->getClassName(), collisionEvent->getEntityB()->getClassName());
     180 PRINTF(5)("Registering Collision Event: %s, %s\n", collisionEvent->getEntityA()->getClassCName(), collisionEvent->getEntityB()->getClassCName());
    181181}
    182182
     
    204204
    205205  // collision reaction calculations (for every collision there will be a reaction)
    206   vector<Collision*>::iterator it = this->collisionList.begin();
     206  std::vector<Collision*>::iterator it = this->collisionList.begin();
    207207  for(; it < this->collisionList.end(); it++) {
    208208    if( !(*it)->isDispatched())
     
    227227bool CollisionHandle::filterCollisionEvent(CollisionEvent* collisionEvent)
    228228{
    229   vector<long>::iterator it = this->targetList.begin();
     229  std::vector<long>::iterator it = this->targetList.begin();
    230230  for(; it < this->targetList.end(); it++)
    231231  {
    232232//     if(collisionEvent->getEntityB()->isA(CL_AIMING_SYSTEM) || collisionEvent->getEntityA()->isA(CL_AIMING_SYSTEM))
    233233//     {
    234 //        PRINTF(0)("I am: %s colliding with: %s\n", owner->getClassName(), collisionEvent->getEntityB()->getClassName(), *it);
     234//        PRINTF(0)("I am: %s colliding with: %s\n", owner->getClassCName(), collisionEvent->getEntityB()->getClassCName(), *it);
    235235//        if( collisionEvent->getEntityA() == this->owner) {
    236 //          PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassName(),
    237 //          collisionEvent->getEntityB()->getClassName(), *it);
     236//          PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassCName(),
     237//          collisionEvent->getEntityB()->getClassCName(), *it);
    238238//          if( collisionEvent->getEntityB()->isA((ClassID)(*it))) {
    239 //            PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassName(),
    240 //            collisionEvent->getEntityB()->getClassName(), *it);
     239//            PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
     240//            collisionEvent->getEntityB()->getClassCName(), *it);
    241241//             }
    242242//        }
    243243//        else {
    244 //          PRINTF(0)("I am not owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassName(),
    245 //          collisionEvent->getEntityB()->getClassName(), *it);
     244//          PRINTF(0)("I am not owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassCName(),
     245//          collisionEvent->getEntityB()->getClassCName(), *it);
    246246//          if( collisionEvent->getEntityA()->isA((ClassID)(*it))) {
    247 //            PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassName(),
    248 //            collisionEvent->getEntityA()->getClassName(), *it);
     247//            PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
     248//            collisionEvent->getEntityA()->getClassCName(), *it);
    249249//             }
    250250//        }
     
    254254    if( collisionEvent->getEntityA() == this->owner) {
    255255      if( collisionEvent->getEntityB()->isA((ClassID)(*it))) {
    256         PRINTF(5)("I am: %s colliding with: %s is a %i filter ok\n", owner->getClassName(),
    257                   collisionEvent->getEntityB()->getClassName(), *it);
     256        PRINTF(5)("I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
     257                  collisionEvent->getEntityB()->getClassCName(), *it);
    258258        return true; }
    259259    }
    260260    else {
    261261      if( collisionEvent->getEntityA()->isA((ClassID)(*it))) {
    262         PRINTF(5)("I am: %s colliding with: %s is a %i filter ok\n", owner->getClassName(),
    263                   collisionEvent->getEntityA()->getClassName(), *it);
     262        PRINTF(5)("I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
     263                  collisionEvent->getEntityA()->getClassCName(), *it);
    264264      return true; }
    265265    }
     
    276276bool CollisionHandle::filterCollision(Collision* collision)
    277277{
    278   vector<long>::iterator it = this->targetList.begin();
     278  std::vector<long>::iterator it = this->targetList.begin();
    279279  for(; it < this->targetList.end(); it++)
    280280  {
     
    282282//     if(collision->getEntityB()->isA(CL_AIMING_SYSTEM) || collision->getEntityA()->isA(CL_AIMING_SYSTEM))
    283283//     {
    284 //       PRINTF(0)("Shared!!! I am: %s colliding with: %s\n", owner->getClassName(), collision->getEntityB()->getClassName(), *it);
     284//       PRINTF(0)("Shared!!! I am: %s colliding with: %s\n", owner->getClassCName(), collision->getEntityB()->getClassCName(), *it);
    285285//       if( collision->getEntityA() == this->owner) {
    286 //         PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassName(),
    287 //         collision->getEntityB()->getClassName(), *it);
     286//         PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassCName(),
     287//         collision->getEntityB()->getClassCName(), *it);
    288288//         if( collision->getEntityB()->isA((ClassID)(*it))) {
    289 //           PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassName(),
    290 //           collision->getEntityB()->getClassName(), *it);
     289//           PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
     290//           collision->getEntityB()->getClassCName(), *it);
    291291//         }
    292292//       }
    293293//       else {
    294 //         PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassName(),
    295 //         collision->getEntityB()->getClassName(), *it);
     294//         PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassCName(),
     295//         collision->getEntityB()->getClassCName(), *it);
    296296//         if( collision->getEntityA()->isA((ClassID)(*it))) {
    297 //           PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassName(),
    298 //           collision->getEntityA()->getClassName(), *it);
     297//           PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(),
     298//           collision->getEntityA()->getClassCName(), *it);
    299299//         }
    300300//       }
  • trunk/src/lib/collision_reaction/collision_reaction.cc

    r8190 r9406  
    1919
    2020
    21 using namespace std;
     21
    2222
    2323
  • trunk/src/lib/collision_reaction/cr_engine.cc

    r8490 r9406  
    2727#include "debug.h"
    2828
    29 using namespace std;
     29
    3030
    3131
     
    6161  this->reset();
    6262
    63   vector<Collision*>::iterator it1 = this->collisionsUnused.begin();
     63  std::vector<Collision*>::iterator it1 = this->collisionsUnused.begin();
    6464  for(; it1 < this->collisionsUnused.end(); it1++)
    6565    delete *it1;
    66   vector<CollisionEvent*>::iterator it2 = this->collisionEventsUnused.begin();
     66  std::vector<CollisionEvent*>::iterator it2 = this->collisionEventsUnused.begin();
    6767  for(; it2 < this->collisionEventsUnused.end(); it2++)
    6868    delete *it2;
     
    9292  // first clear all CollisionHandles
    9393
    94   vector<CollisionHandle*>::iterator it = this->collisionHandles.begin();
     94  std::vector<CollisionHandle*>::iterator it = this->collisionHandles.begin();
    9595  for(; it < this->collisionHandles.end(); it++)
    9696  {
     
    159159void CREngine::flushCollisions()
    160160{
    161   vector<Collision*>::iterator it1 = this->collisionsUsed.begin();
     161  std::vector<Collision*>::iterator it1 = this->collisionsUsed.begin();
    162162  for(; it1 < this->collisionsUsed.end(); it1++)
    163163    this->collisionsUnused.push_back(*it1);
    164164
    165   vector<CollisionEvent*>::iterator it2 = this->collisionEventsUsed.begin();
     165  std::vector<CollisionEvent*>::iterator it2 = this->collisionEventsUsed.begin();
    166166  for(; it2 < this->collisionEventsUsed.end(); it2++)
    167167    this->collisionEventsUnused.push_back(*it2);
  • trunk/src/lib/collision_reaction/cr_object_damage.cc

    r9235 r9406  
    2626#include "debug.h"
    2727
    28 using namespace std;
     28
    2929
    3030
     
    5757
    5858  PRINTF(4)("Dealing damage - Handling collision: %s vs %s\n",
    59             collision->getEntityA()->getClassName(),
    60             collision->getEntityB()->getClassName());
     59            collision->getEntityA()->getClassCName(),
     60            collision->getEntityB()->getClassCName());
    6161
    6262  // the collision damage been dealed by the entity
     
    6464    damage = collision->getEntityB()->getDamage();
    6565    collision->getEntityA()->hit(damage, collision->getEntityB());
    66     PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassName());
     66    PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassCName());
    6767  }
    6868
     
    7070    damage = collision->getEntityA()->getDamage();
    7171    collision->getEntityB()->hit(damage, collision->getEntityA());
    72     PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassName());
     72    PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassCName());
    7373  }
    7474
  • trunk/src/lib/collision_reaction/cr_physics_full_walk.cc

    r9235 r9406  
    3333#include "cr_defs.h"
    3434
    35 using namespace std;
     35
    3636
    3737
  • trunk/src/lib/collision_reaction/cr_physics_ground_walk.cc

    r9235 r9406  
    3333#include "cr_defs.h"
    3434
    35 using namespace std;
     35
    3636
    3737
Note: See TracChangeset for help on using the changeset viewer.