Changeset 7932 in orxonox.OLD for branches/cr/src/lib/collision_reaction
- Timestamp:
- May 28, 2006, 9:00:40 PM (19 years ago)
- Location:
- branches/cr/src/lib/collision_reaction
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/lib/collision_reaction/collision_handle.cc
r7927 r7932 16 16 17 17 #include "collision_handle.h" 18 19 20 18 21 19 22 using namespace std; … … 41 44 // delete what has to be deleted here 42 45 } 46 47 48 /** 49 * add more filter targets to this collision handle 50 * @param classID the classid to look for 51 */ 52 void CollisionHandle::addTarget(long classID) 53 { 54 // make sure there is no dublicate 55 std::vector<long>::iterator it; 56 for( it = this->targetList.begin(); it != this->targetList.end(); it++) 57 if(*it == classID) 58 return; 59 60 // add element 61 this->targetList.push_back(classID); 62 } -
branches/cr/src/lib/collision_reaction/collision_handle.h
r7927 r7932 27 27 28 28 29 void addTarget( );29 void addTarget(long classID); 30 30 31 31 void registerCollision(Collision* collision); -
branches/cr/src/lib/collision_reaction/cr_engine.cc
r7927 r7932 47 47 48 48 49 CollisionHandle* CREngine::subscribeReaction(WorldEntity* owner, CRType type , int nrOfTargets, ...)49 CollisionHandle* CREngine::subscribeReaction(WorldEntity* owner, CRType type) 50 50 { 51 51 52 va_list itemlist;53 va_start (itemlist, type);54 // for (int i = 0; i < nrOfTargets; i++)55 // this->targetList.push_back(va_arg(itemlist, int));56 va_end(itemlist);57 52 } 58 53 -
branches/cr/src/lib/collision_reaction/cr_engine.h
r7927 r7932 41 41 inline static CREngine* getInstance(void) { if (!singletonRef) singletonRef = new CREngine(); return singletonRef; }; 42 42 43 44 CollisionHandle* subscribeReaction(WorldEntity* worldEntity, CRType type, int nrOfTargets, ...); 43 CollisionHandle* subscribeReaction(WorldEntity* worldEntity, CRType type); 45 44 46 45 bool unsubscribeReaction(WorldEntity* worldEntity); … … 51 50 52 51 /** @returns an instance to a collision object. instead of creating new object this ones can be resycled */ 53 inline Collision* getCollisionObject() { /* return the first element of the cache list*/ }52 inline Collision* getCollisionObject() { /* return the first element of the cache list*/ } 54 53 /** @param collision: returns the Collision object back to the cache list */ 55 54 inline void putCollisionObject(Collision* collision) { this->cachedCollisions.push_back(collision); }
Note: See TracChangeset
for help on using the changeset viewer.