Changeset 9980 in orxonox.OLD for branches/coll_rect/src
- Timestamp:
- Dec 2, 2006, 2:43:13 PM (18 years ago)
- Location:
- branches/coll_rect/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/coll_rect/src/lib/collision_reaction/collision.cc
r9889 r9980 51 51 this->bDispatched = true; 52 52 53 this-> collisionEvents.clear();53 this->_collisionEvents.clear(); 54 54 } 55 55 -
branches/coll_rect/src/lib/collision_reaction/collision_filter.cc
r9939 r9980 71 71 { 72 72 //check if this class isn't already registered 73 std::vector<ClassID>::iterator it = this->_filters[type].begin();73 TargetIterator it = this->_filters[type].begin(); 74 74 for(; it != this->_filters[type].end(); it++) 75 75 { … … 141 141 for( int i = 0; i < CREngine::CR_NUMBER; i++ ) 142 142 { 143 std::vector<ClassID>::const_iterator it = this->_filters[i].begin();143 TargetIterator it = this->_filters[i].begin(); 144 144 for(; it != this->_filters[i].end(); i++ ) 145 145 if( unlikely(entity.isA(*it))) … … 160 160 bool CollisionFilter::operator()(const WorldEntity& entity, const CREngine::ReactionType type) const 161 161 { 162 // if there are no installed criterions just om mit and163 if( this->bReactive())162 // if there are no installed criterions just omit and return 163 if( !this->bReactive()) 164 164 return false; 165 165 166 166 // goes through all registered filter criterions and looks for matches 167 std::vector<ClassID>::const_iterator it = this->_filters[type].begin();167 TargetIterator it = this->_filters[type].begin(); 168 168 for(; it != this->_filters[type].end(); it++ ) 169 169 if( unlikely(entity.isA(*it))) -
branches/coll_rect/src/lib/collision_reaction/collision_filter.h
r9939 r9980 35 35 ObjectListDeclaration(CollisionFilter); 36 36 37 38 typedef std::vector<ClassID>::iterator TargetIterator; 37 39 38 40 /* Constructor/Deconstructors */ -
branches/coll_rect/src/lib/collision_reaction/collision_tube.cc
r9939 r9980 120 120 { 121 121 // for all collisions: 122 std::vector<Collision*>::iterator collisions= this->_collisionList.begin();123 for(; c ollisions < this->_collisionList.end(); collisions++)122 CollisionIterator ci = this->_collisionList.begin(); 123 for(; ci < this->_collisionList.end(); ++ci) 124 124 { 125 // check if entity A is subscibed for this event 126 (*ci)->getEntityA()-> 125 127 128 // check if entity B is subscribed for this event 126 129 127 // for all collision events of each collision:128 Collision::iterator events = (*collisions)->begin();129 for(; events < (*collisions)->end(); events++)130 {131 132 }133 130 } 134 131 } -
branches/coll_rect/src/lib/collision_reaction/collision_tube.h
r9939 r9980 48 48 ObjectListDeclaration(CollisionTube); 49 49 50 typedef std::vector<Collision*>::iterator CollisionIterator; 50 51 51 52 /* Constructor/Deconstructor/Singleton Interface */ -
branches/coll_rect/src/world_entities/world_entity.h
r9939 r9980 92 92 /** @return true if there is at least on collision reaction subscribed */ 93 93 inline bool isReactive() const { return this->bReactive; } 94 95 /** @param worldEntity the world entity to be checked @returns true if there is a collisionreaction registered for the worldEntity */ 94 96 inline bool isReactive( const WorldEntity& worldEntity) const { return this->isReactive() || (this->_collisionFilter(worldEntity)); } 97 /** @param worldEntity the world entity to be checked @param type special reaction type @returns true if collision reaction reg. */ 98 inline bool isReactive( const WorldEntity& worldEntity, CoRe::ReactionType type) const 99 { return this->isReactive() || (this->_collisionFilter(worldEntity, type)); } 100 95 101 96 102 const CoRe::CollisionFilter& getCollisionFilter(CoRe::CREngine::ReactionType type) const { return this->_collisionFilter; }
Note: See TracChangeset
for help on using the changeset viewer.