Changeset 9406 in orxonox.OLD for trunk/src/lib/collision_reaction/collision_handle.cc
- Timestamp:
- Jul 24, 2006, 11:09:47 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_reaction/collision_handle.cc
r9235 r9406 29 29 #include "debug.h" 30 30 31 using namespace std; 31 32 32 33 33 … … 178 178 179 179 c->registerCollisionEvent(collisionEvent); 180 PRINTF(5)("Registering Collision Event: %s, %s\n", collisionEvent->getEntityA()->getClass Name(), collisionEvent->getEntityB()->getClassName());180 PRINTF(5)("Registering Collision Event: %s, %s\n", collisionEvent->getEntityA()->getClassCName(), collisionEvent->getEntityB()->getClassCName()); 181 181 } 182 182 … … 204 204 205 205 // 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(); 207 207 for(; it < this->collisionList.end(); it++) { 208 208 if( !(*it)->isDispatched()) … … 227 227 bool CollisionHandle::filterCollisionEvent(CollisionEvent* collisionEvent) 228 228 { 229 vector<long>::iterator it = this->targetList.begin();229 std::vector<long>::iterator it = this->targetList.begin(); 230 230 for(; it < this->targetList.end(); it++) 231 231 { 232 232 // if(collisionEvent->getEntityB()->isA(CL_AIMING_SYSTEM) || collisionEvent->getEntityA()->isA(CL_AIMING_SYSTEM)) 233 233 // { 234 // PRINTF(0)("I am: %s colliding with: %s\n", owner->getClass Name(), collisionEvent->getEntityB()->getClassName(), *it);234 // PRINTF(0)("I am: %s colliding with: %s\n", owner->getClassCName(), collisionEvent->getEntityB()->getClassCName(), *it); 235 235 // if( collisionEvent->getEntityA() == this->owner) { 236 // PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClass Name(),237 // collisionEvent->getEntityB()->getClass Name(), *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); 238 238 // 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->getClass Name(),240 // collisionEvent->getEntityB()->getClass Name(), *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); 241 241 // } 242 242 // } 243 243 // else { 244 // PRINTF(0)("I am not owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClass Name(),245 // collisionEvent->getEntityB()->getClass Name(), *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); 246 246 // 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->getClass Name(),248 // collisionEvent->getEntityA()->getClass Name(), *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); 249 249 // } 250 250 // } … … 254 254 if( collisionEvent->getEntityA() == this->owner) { 255 255 if( collisionEvent->getEntityB()->isA((ClassID)(*it))) { 256 PRINTF(5)("I am: %s colliding with: %s is a %i filter ok\n", owner->getClass Name(),257 collisionEvent->getEntityB()->getClass Name(), *it);256 PRINTF(5)("I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(), 257 collisionEvent->getEntityB()->getClassCName(), *it); 258 258 return true; } 259 259 } 260 260 else { 261 261 if( collisionEvent->getEntityA()->isA((ClassID)(*it))) { 262 PRINTF(5)("I am: %s colliding with: %s is a %i filter ok\n", owner->getClass Name(),263 collisionEvent->getEntityA()->getClass Name(), *it);262 PRINTF(5)("I am: %s colliding with: %s is a %i filter ok\n", owner->getClassCName(), 263 collisionEvent->getEntityA()->getClassCName(), *it); 264 264 return true; } 265 265 } … … 276 276 bool CollisionHandle::filterCollision(Collision* collision) 277 277 { 278 vector<long>::iterator it = this->targetList.begin();278 std::vector<long>::iterator it = this->targetList.begin(); 279 279 for(; it < this->targetList.end(); it++) 280 280 { … … 282 282 // if(collision->getEntityB()->isA(CL_AIMING_SYSTEM) || collision->getEntityA()->isA(CL_AIMING_SYSTEM)) 283 283 // { 284 // PRINTF(0)("Shared!!! I am: %s colliding with: %s\n", owner->getClass Name(), collision->getEntityB()->getClassName(), *it);284 // PRINTF(0)("Shared!!! I am: %s colliding with: %s\n", owner->getClassCName(), collision->getEntityB()->getClassCName(), *it); 285 285 // if( collision->getEntityA() == this->owner) { 286 // PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClass Name(),287 // collision->getEntityB()->getClass Name(), *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); 288 288 // 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->getClass Name(),290 // collision->getEntityB()->getClass Name(), *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); 291 291 // } 292 292 // } 293 293 // else { 294 // PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClass Name(),295 // collision->getEntityB()->getClass Name(), *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); 296 296 // 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->getClass Name(),298 // collision->getEntityA()->getClass Name(), *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); 299 299 // } 300 300 // }
Note: See TracChangeset
for help on using the changeset viewer.