Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 29, 2006, 12:48:21 AM (18 years ago)
Author:
patrick
Message:

cr: collision objects handling

File:
1 edited

Legend:

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

    r7944 r7945  
    1919
    2020#include "collision.h"
     21#include "collision_handle.h"
    2122#include "cr_defs.h"
    2223
     
    5152}
    5253
    53 
     54/**
     55 * inits the CREngine to a working state
     56 */
    5457void CREngine::init()
    5558{
     
    6265
    6366void CREngine::reset()
    64 {}
     67{
     68  // first clear all CollisionHandles
     69  std::vector<CollisionHandle*>::iterator it;
     70  for( it = this->collisionHandles.begin(); it != this->collisionHandles.end(); it++)
     71    delete *it;
     72  this->collisionHandles.clear();
     73}
    6574
    6675
     
    7281CollisionHandle* CREngine::subscribeReaction(WorldEntity* owner, CRType type)
    7382{
     83  CollisionHandle* ch = new CollisionHandle(owner, type);
     84  this->collisionHandles.push_back(ch);
     85}
    7486
    75 }
    7687
    7788bool CREngine::unsubscribeReaction(WorldEntity* worldEntity)
Note: See TracChangeset for help on using the changeset viewer.