Changeset 8109 in orxonox.OLD for branches/cr/src
- Timestamp:
- Jun 1, 2006, 11:34:14 PM (19 years ago)
- Location:
- branches/cr/src/lib/collision_reaction
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/lib/collision_reaction/collision_handle.cc
r8108 r8109 129 129 void CollisionHandle::registerCollisionEvent(CollisionEvent* collisionEvent) 130 130 { 131 if( !this->filterCollisionEvent(collisionEvent)) 132 return; 133 131 134 // set the state to not dispatched 132 135 this->bDispatched = false; … … 165 168 this->flushCollisions(); 166 169 } 170 171 172 /** 173 * filter out the CollisionEvents that are not wanted 174 * @param collisionEvent the collision event to filter 175 */ 176 bool CollisionHandle::filterCollisionEvent(CollisionEvent* collisionEvent) 177 { 178 vector<long>::iterator it = this->targetList.begin(); 179 for(; it < this->targetList.end(); it++) 180 { 181 if( !collisionEvent->getEntityA()->isA((ClassID)(*it))) 182 return false; 183 } 184 185 return true; 186 } 187 188 189 190 191 192 193 194 -
branches/cr/src/lib/collision_reaction/collision_handle.h
r8106 r8109 46 46 private: 47 47 void flushCollisions(); 48 bool filterCollisionEvent(CollisionEvent* collisionEvent); 48 49 49 50
Note: See TracChangeset
for help on using the changeset viewer.