Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 20, 2006, 1:21:09 PM (18 years ago)
Author:
patrick
Message:

more interface and more structure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/coll_rect/src/lib/collision_reaction/collision_filter.cc

    r9896 r9898  
    151151
    152152
     153  /**
     154  * tests if the owner WorldEntity is listening to collisions from another specif WorldEntity entity
     155  *  @param entity WorldEntity to test against
     156  *
     157  * This is the most important interface function of this class: it performs a check and returns true
     158  * if the WorldEntity entity is actualy responsive for a certain other WorldEntity
     159   */
     160  bool CollisionFilter::operator()(const WorldEntity* entity, const CREngine::ReactionType type) const
     161  {
     162    // if there are no installed criterions just ommit and
     163    if( this->bReactive())
     164      return false;
    153165
    154 }
     166    // goes through all registered filter criterions and looks for matches
     167    std::vector<ClassID>::const_iterator it = this->_filters[type].begin();
     168    for(; it != this->_filters[type].end(); i++ )
     169      if( unlikely(entity->isA(*it)))
     170        return true;
     171
     172    return false;
     173  }
    155174
    156175
    157176
     177} // namespace end
     178
     179
     180
Note: See TracChangeset for help on using the changeset viewer.