Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9892 in orxonox.OLD for branches/coll_rect/src/world_entities


Ignore:
Timestamp:
Oct 14, 2006, 1:25:47 AM (18 years ago)
Author:
patrick
Message:

new interface to collision registers, more transparent. some more functionality

Location:
branches/coll_rect/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/coll_rect/src/world_entities/world_entity.cc

    r9889 r9892  
    302302 *  @param target1 a filter target (classID)
    303303 */
    304 void WorldEntity::subscribeReaction(CoRe::CREngine::CRType type, const ClassID& target1)
     304void WorldEntity::subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1)
    305305{
    306306  this->subscribeReaction(type);
     
    316316 *  @param target1 a filter target (classID)
    317317 */
    318 void WorldEntity::subscribeReaction(CoRe::CREngine::CRType type, const ClassID& target1, const ClassID& target2)
     318void WorldEntity::subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1, const ClassID& target2)
    319319{
    320320  this->subscribeReaction(type);
     
    331331 *  @param target1 a filter target (classID)
    332332 */
    333 void WorldEntity::subscribeReaction(CoRe::CREngine::CRType type, const ClassID& target1, const ClassID& target2, const ClassID& target3)
     333void WorldEntity::subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1, const ClassID& target2, const ClassID& target3)
    334334{
    335335  this->subscribeReaction(type);
     
    349349 *  @param ... the targets as classIDs
    350350 */
    351 void WorldEntity::subscribeReaction(CoRe::CREngine::CRType type)
     351void WorldEntity::subscribeReaction(CoRe::CREngine::ReactionType type)
    352352{
    353353  if( this->collisionHandles[type] != NULL)
     
    368368 *  @param type the reaction to unsubscribe
    369369 */
    370 void WorldEntity::unsubscribeReaction(CoRe::CREngine::CRType type)
     370void WorldEntity::unsubscribeReaction(CoRe::CREngine::ReactionType type)
    371371{
    372372  if( this->collisionHandles[type] == NULL)
     
    395395{
    396396  for( int i = 0; i < CoRe::CREngine::CR_NUMBER; i++)
    397     this->unsubscribeReaction((CoRe::CREngine::CRType)i);
     397    this->unsubscribeReaction((CoRe::CREngine::ReactionType)i);
    398398
    399399  // there are no reactions subscribed from now on
     
    419419  CoRe::CollisionEvent* c = CoRe::CREngine::getInstance()->popCollisionEventObject();
    420420  assert(c != NULL); // if this should fail: we got not enough precached CollisionEvents: alter value in cr_defs.h
    421   c->collide(COLLISION_TYPE_OBB, entityA, entityB, bvA, bvB);
     421//  c->collide(COLLISION_TYPE_OBB, entityA, entityB, bvA, bvB);
    422422
    423423  for( int i = 0; i < CoRe::CREngine::CR_NUMBER; ++i)
     
    443443  CoRe::CollisionEvent* c = CoRe::CREngine::getInstance()->popCollisionEventObject();
    444444  assert(c != NULL); // if this should fail: we got not enough precached CollisionEvents: alter value in cr_defs.h
    445   c->collide(type, entity, groundEntity, normal, position, bInWall);
     445//  c->collide(type, entity, groundEntity, normal, position, bInWall);
    446446
    447447  for( int i = 0; i < CoRe::CREngine::CR_NUMBER; ++i)
  • branches/coll_rect/src/world_entities/world_entity.h

    r9890 r9892  
    7878
    7979  /* --- Collision Reaction Block --- */
    80   void subscribeReaction(CoRe::CREngine::CRType type);
    81   void subscribeReaction(CoRe::CREngine::CRType type, const ClassID& target1);
    82   void subscribeReaction(CoRe::CREngine::CRType type, const ClassID& target1, const ClassID& target2);
    83   void subscribeReaction(CoRe::CREngine::CRType type, const ClassID& target1, const ClassID& target2, const ClassID& target3);
    84 
    85   void unsubscribeReaction(CoRe::CREngine::CRType type);
     80  void subscribeReaction(CoRe::CREngine::ReactionType type);
     81  void subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1);
     82  void subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1, const ClassID& target2);
     83  void subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1, const ClassID& target2, const ClassID& target3);
     84
     85  void unsubscribeReaction(CoRe::CREngine::ReactionType type);
    8686  void unsubscribeReaction();
    8787
     
    9191  inline bool isReactive() const { return this->bReactive; }
    9292
    93   CoRe::CollisionHandle* getCollisionHandle(CoRe::CREngine::CRType type) const { return this->collisionHandles[type]; }
     93  CoRe::CollisionHandle* getCollisionHandle(CoRe::CREngine::ReactionType type) const { return this->collisionHandles[type]; }
    9494
    9595  /** @returns true if this entity is standing on ground (BSP model) */
Note: See TracChangeset for help on using the changeset viewer.