Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 29, 2006, 12:02:04 AM (19 years ago)
Author:
patrick
Message:

cr: collision registration work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cr/src/lib/collision_reaction/cr_engine.h

    r7940 r7944  
    5050  bool unsubscribeReaction(CollisionHandle* collisionHandle);
    5151
    52 
    5352  void handleCollisions();
    5453
    5554  /** @returns an instance to a collision object. instead of creating new object this ones can be resycled */
    56   inline Collision* getCollisionObject() { /* return the first element of the cache list*/ }
     55  inline Collision* popCollisionObject() { if(!this->cachedCollisions.empty()) { this->cachedCollisions.back(); this->cachedCollisions.pop_back();} else return NULL; }
    5756  /** @param collision: returns the Collision object back to the cache list */
    58   inline void putCollisionObject(Collision* collision) { this->cachedCollisions.push_back(collision); }
     57  inline void pushCollisionObject(Collision* collision) { this->cachedCollisions.push_back(collision); }
    5958
    6059
Note: See TracChangeset for help on using the changeset viewer.