Changeset 7966 in orxonox.OLD for branches/cr/src
- Timestamp:
- May 30, 2006, 1:10:11 AM (18 years ago)
- Location:
- branches/cr/src/lib/collision_reaction
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/lib/collision_reaction/collision_handle.cc
r7964 r7966 73 73 74 74 /** 75 * registers a new Collision Object 76 */ 77 Collision* CollisionHandle::registerCollision(WorldEntity* entityA, WorldEntity* entityB) 78 { 79 // get the new collision object 80 Collision* c = CREngine::getInstance()->popCollisionObject(); 81 82 c->collide(collisionEvent->getEntityA(), collisionEvent->getEntityB()); 83 this->collisionList.push_back(c); 84 } 85 86 87 /** 75 88 * this is the function to be called on a collision event for this handle 76 89 * @param collision the collision objects containing all collision informations … … 81 94 if( this->collisionList.empty()) 82 95 { 83 Collision* c = CREngine::getInstance()->popCollisionObject(); 84 c->collide(collisionEvent->getEntityA(), collisionEvent->getEntityB()); 85 this->collisionList.push_back(c); 96 return; 86 97 } 98 87 99 if( ((this->collisionList.back())->getEntityA() == collisionEvent->getEntityA()) && 88 100 ((this->collisionList.back())->getEntityB() == collisionEvent->getEntityB())) … … 90 102 (this->collisionList.back())->registerCollisionEvent(collisionEvent); 91 103 } 104 } 92 105 93 //this->collisionList.push_back(collisionEvent);94 }95 106 96 107 /** -
branches/cr/src/lib/collision_reaction/collision_handle.h
r7964 r7966 29 29 30 30 void addTarget(long classID); 31 Collision registerCollision(WorldEntity* entityA, WorldEntity* entityB); 31 32 void registerCollisionEvent(CollisionEvent* collisionEvent); 32 33 /** @returns true if regiestered some new collision events in this tick frame */ -
branches/cr/src/lib/collision_reaction/cr_engine.cc
r7964 r7966 133 133 134 134 135 /** 136 * processes the collisions by calling the EventHandlers 137 */ 135 138 void CREngine::handleCollisions() 136 139 { … … 143 146 } 144 147 } 148 this->flushCollisions(); 145 149 } 146 150 151 /** 152 * flushes all the collision lists and puts them to their initial state 153 */ 154 void CREngeine::flushCollisions() 155 { 156 157 } 147 158 148 159 -
branches/cr/src/lib/collision_reaction/cr_engine.h
r7964 r7966 73 73 void init(); 74 74 75 void flushCollisions(); 76 75 77 76 78 private:
Note: See TracChangeset
for help on using the changeset viewer.