Changeset 7947 in orxonox.OLD for branches/cr/src/lib/collision_reaction
- Timestamp:
- May 29, 2006, 1:12:19 AM (18 years ago)
- Location:
- branches/cr/src/lib/collision_reaction
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/lib/collision_reaction/collision_handle.cc
r7946 r7947 102 102 // now set state to dispatched 103 103 this->bDispatched = true; 104 this->bCollided = false; 104 105 this->flushCollisions(); 105 106 } -
branches/cr/src/lib/collision_reaction/collision_handle.h
r7946 r7947 31 31 void addTarget(long classID); 32 32 void registerCollision(Collision* collision); 33 /** @returns true if regiestered some new collision events in this tick frame */ 34 inline bool isCollided() const { return this->bCollided; } 33 35 34 36 void handleCollisions(); … … 45 47 bool bDispatched; //!< true if this handle has already been dispatched 46 48 bool bStopOnFirstCollision; //!< true if the cd of this object should be terminated after one match 49 bool bCollided; //!< true if the CollsionHandle has registered some new collisions 47 50 48 51 std::vector<Collision*> collisionList; //!< a list full of collisions -
branches/cr/src/lib/collision_reaction/cr_engine.cc
r7946 r7947 115 115 116 116 void CREngine::handleCollisions() 117 {} 117 { 118 std::vector<CollisionHandle*>::iterator it; 119 for( it = this->collisionHandles.begin(); it != this->collisionHandles.end(); it++) 120 { 121 if( (*it)->isCollided()) 122 { 123 (*it)->handleCollisions(); 124 } 125 } 126 } 118 127 119 128
Note: See TracChangeset
for help on using the changeset viewer.