- Timestamp:
- May 29, 2006, 5:57:39 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/lib/collision_reaction/cr_engine.h
r7958 r7960 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->c achedCollisions.empty()) { return this->cachedCollisions.back(); this->cachedCollisions.pop_back();} else return NULL; }53 inline Collision* popCollisionObject() { if(!this->collisionsUnused.empty()) { return this->collisionsUnused.back(); this->collisionsUnused.pop_back();} else return NULL; } 54 54 /** @param collision: returns the Collision object back to the cache list */ 55 inline void pushCollisionObject(Collision* collision) { this->c achedCollisions.push_back(collision); }55 inline void pushCollisionObject(Collision* collision) { this->collisionsUsed.push_back(collision); } 56 56 57 57 … … 66 66 private: 67 67 std::vector<CollisionHandle*> collisionHandles; //!< list with the collision handles 68 std::vector<Collision*> cachedCollisions; //!< a list of unused, cached collision events 68 69 std::vector<Collision*> collisionsUsed; //!< a list of used, cached collisions 70 std::vector<Collision*> collisionsUnused; //!< a list of unused, cached collisions 71 72 std::vector<Collision*> collisionEventsUsed; //!< a list of used, cached collision events 73 std::vector<Collision*> collisionEventsUnused; //!< a list of unused, cached collision events 69 74 70 75 static CREngine* singletonRef; //!< the reference to the CREngine object (singleton)
Note: See TracChangeset
for help on using the changeset viewer.