Changeset 7958 in orxonox.OLD for branches/cr/src/lib/collision_reaction
- Timestamp:
- May 29, 2006, 5:32:42 PM (18 years ago)
- Location:
- branches/cr/src/lib/collision_reaction
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/lib/collision_reaction/cr_engine.cc
r7950 r7958 52 52 53 53 if( this->cachedCollisions.size() != CR_MAX_COLLISIONS) 54 PRINTF(0)("CollisionReaction Error: cache size missmatch: %i of %i\n", this->cachedCollisions.size(), CR_ NUMBER);54 PRINTF(0)("CollisionReaction Error: cache size missmatch: %i of %i\n", this->cachedCollisions.size(), CR_MAX_COLLISIONS); 55 55 56 56 this->reset(); … … 59 59 for(; it < this->cachedCollisions.end(); it++) 60 60 delete *it; 61 62 // while( !this->cachedCollisions.empty())63 // delete this->cachedCollisions.back();64 61 65 62 this->cachedCollisions.clear(); -
branches/cr/src/lib/collision_reaction/cr_engine.h
r7946 r7958 51 51 52 52 /** @returns an instance to a collision object. instead of creating new object this ones can be resycled */ 53 inline Collision* popCollisionObject() { if(!this->cachedCollisions.empty()) { this->cachedCollisions.back(); this->cachedCollisions.pop_back();} else return NULL; }53 inline Collision* popCollisionObject() { if(!this->cachedCollisions.empty()) { return this->cachedCollisions.back(); this->cachedCollisions.pop_back();} else return NULL; } 54 54 /** @param collision: returns the Collision object back to the cache list */ 55 55 inline void pushCollisionObject(Collision* collision) { this->cachedCollisions.push_back(collision); }
Note: See TracChangeset
for help on using the changeset viewer.