Changeset 10007 in orxonox.OLD for branches/coll_rect/src/lib/collision_reaction
- Timestamp:
- Dec 4, 2006, 3:55:03 PM (18 years ago)
- Location:
- branches/coll_rect/src/lib/collision_reaction
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/coll_rect/src/lib/collision_reaction/collision_filter.cc
r10006 r10007 142 142 bool CollisionFilter::operator()(const WorldEntity& entity) const 143 143 { 144 PRINTF(0)("operator()(const WorldEntity& entity)\n");144 // PRINTF(0)("operator()(const WorldEntity& entity)\n"); 145 145 146 146 // if there are no installed criterions just ommit and return … … 154 154 for(; it != this->_filters[i].end(); it++ ) 155 155 { 156 PRINTF(0)("[%i] check %s is a %s?\n", i, entity.getClassName().c_str(), (*it).name().c_str());156 // PRINTF(0)("[%i] check %s is a %s?\n", i, entity.getClassName().c_str(), (*it).name().c_str()); 157 157 if( unlikely(entity.isA(*it) ) ) 158 158 return true; … … 175 175 assert(&entity != NULL); 176 176 177 PRINTF(0)("operator()(const WorldEntity& entity, const CREngine::ReactionType type)\n");177 // PRINTF(0)("operator()(const WorldEntity& entity, const CREngine::ReactionType type)\n"); 178 178 // if there are no installed criterions just omit and return 179 179 if( !this->isReactive()) … … 185 185 for(; it != this->_filters[type].end(); it++ ) 186 186 { 187 PRINTF(0)("size: %i - %s is a %s?\n", this->_filters[type].size(), entity.getClassName().c_str(), (*it).name().c_str());187 // PRINTF(0)("size: %i - %s is a %s?\n", this->_filters[type].size(), entity.getClassName().c_str(), (*it).name().c_str()); 188 188 if( entity.isA(*it)) 189 189 return true; -
branches/coll_rect/src/lib/collision_reaction/cr_engine.cc
r10006 r10007 166 166 assert((*ci)->getEntityA() != NULL && (*ci)->getEntityB() != NULL); 167 167 168 PRINTF(0)("CR CHECK: collision between: %s, %s\n", (*ci)->getEntityA()->getClassName().c_str(), (*ci)->getEntityB()->getClassName().c_str());168 // PRINTF(0)("CR CHECK: collision between: %s, %s\n", (*ci)->getEntityA()->getClassName().c_str(), (*ci)->getEntityB()->getClassName().c_str()); 169 169 170 170 // check if entity A or B is subscibed for this event … … 173 173 { 174 174 this->_reactionList[i]->reactToCollision(*ci); 175 PRINTF(0)(" react to %i\n", i);175 PRINTF(0)("executing reaction: %s, between %s - %s\n", this->_reactionList[i]->getClassName().c_str(), (*ci)->getEntityA()->getClassName().c_str(), (*ci)->getEntityB()->getClassName().c_str()); 176 176 } 177 177 } -
branches/coll_rect/src/lib/collision_reaction/cr_physics_full_walk.cc
r9990 r10007 61 61 { 62 62 63 AABB* box = collision->getEntity B()->getModelAABB();64 WorldEntity* entity = collision->getEntity B();63 AABB* box = collision->getEntityA()->getModelAABB(); 64 WorldEntity* entity = collision->getEntityA(); 65 65 66 66 if( box == NULL) … … 89 89 90 90 // calculate the collision position 91 Vector collPos = collision->getEntity B()->getAbsCoor() + box->center - ce->getCollisionPosition();91 Vector collPos = collision->getEntityA()->getAbsCoor() + box->center - ce->getCollisionPosition(); 92 92 93 93 // test the 3 axis differently -
branches/coll_rect/src/lib/collision_reaction/cr_physics_ground_walk.cc
r9988 r10007 64 64 { 65 65 66 AABB* box = collision->getEntity B()->getModelAABB();67 WorldEntity* entity = collision->getEntity B();66 AABB* box = collision->getEntityA()->getModelAABB(); 67 WorldEntity* entity = collision->getEntityA(); 68 68 69 69 if( box == NULL) … … 87 87 88 88 // calculate the collision position 89 Vector collPos = collision->getEntity B()->getAbsCoor() + box->center - ce->getCollisionPosition();89 Vector collPos = collision->getEntityA()->getAbsCoor() + box->center - ce->getCollisionPosition(); 90 90 91 91 // test the 3 axis differently
Note: See TracChangeset
for help on using the changeset viewer.