Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7944 in orxonox.OLD for branches/cr/src/world_entities


Ignore:
Timestamp:
May 29, 2006, 12:02:04 AM (18 years ago)
Author:
patrick
Message:

cr: collision registration work

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

Legend:

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

    r7937 r7944  
    254254
    255255/**
     256 * registers a new collision to this world entity
     257 *  @param collisionEvent the event
     258 */
     259void WorldEntity::registerCollision(WorldEntity* entityA, WorldEntity* entityB, BouningVolume* bvA, BoundingVolume* bvB)
     260{
     261  // create a collision event
     262  Collision* c = CREngine::getInstance()->popCollisionObject();
     263  c->collide(entityA, entityB, bvA, bvB);
     264
     265  for(int i = 0; i < CREngine::CR_NUMBER; ++i)
     266    if( this->collisionHandles[i] != NULL)
     267      this->collisionHandles[i]->registerCollision(c);
     268}
     269
     270
     271/**
    256272 * @brief moves this entity to the List OM_List
    257273 * @param list the list to set this Entity to.
  • branches/cr/src/world_entities/world_entity.h

    r7933 r7944  
    2424
    2525class BVTree;
     26class BoundingVolume;
    2627class Model;
    2728class CollisionHandle;
     29class Collision;
    2830
    2931
     
    6971  /* --- Collision Reaction Block --- */
    7072  void subscribeReaction(CREngine::CRType type, int nrOfTargets, long target, ...);
     73  void registerCollision(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB);
    7174
    7275
Note: See TracChangeset for help on using the changeset viewer.