Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

cr: more cr cleanup

File:
1 edited

Legend:

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

    r7945 r7946  
    6464
    6565
     66/**
     67 * flushes the CollisionHandles and restores the CREngine to the initial state
     68 */
    6669void CREngine::reset()
    6770{
     
    6972  std::vector<CollisionHandle*>::iterator it;
    7073  for( it = this->collisionHandles.begin(); it != this->collisionHandles.end(); it++)
     74  {
     75    (*it)->reset();
    7176    delete *it;
     77  }
    7278  this->collisionHandles.clear();
    7379}
     
    7884 *  @param owner: the WE to subscribe
    7985 *  @param type: the type of collision reaction to perform
     86 *  @return the newly created CollisionHandle
    8087 */
    8188CollisionHandle* CREngine::subscribeReaction(WorldEntity* owner, CRType type)
     
    8693
    8794
    88 bool CREngine::unsubscribeReaction(WorldEntity* worldEntity)
    89 {}
    90 
    91 
     95/**
     96 * unsubscribe reaction from the reaction list
     97 *  @param collisionHandle the CollisionHandle to remove
     98 *  @param returns true if worked collrectly
     99 */
    92100bool CREngine::unsubscribeReaction(CollisionHandle* collisionHandle)
    93 {}
     101{
     102  std::vector<CollisionHandle*>::iterator it;
     103  for( it = this->collisionHandles.begin(); it != this->collisionHandles.end(); it++)
     104  {
     105    if( *it == collisionHandle)
     106    {
     107      this->collisionHandles.erase(it);
     108      delete collisionHandle;
     109      return true;
     110    }
     111  }
     112  return false;
     113}
    94114
    95115
Note: See TracChangeset for help on using the changeset viewer.