Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9891 in orxonox.OLD


Ignore:
Timestamp:
Oct 14, 2006, 12:34:41 AM (18 years ago)
Author:
patrick
Message:

collision tube register collision events interface

Location:
branches/coll_rect/src/lib/collision_reaction
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/coll_rect/src/lib/collision_reaction/collision.h

    r9889 r9891  
    5353
    5454
     55    inline bool match(const WorldEntity& entityA, WorldEntity& entityB) const { return (this->entityA == &entityA && this->entityB == &entityB); }
    5556    /** @returns true if this Collision has already been dispatched */
    5657    inline bool isDispatched() { return this->bDispatched; }
  • branches/coll_rect/src/lib/collision_reaction/collision_tube.cc

    r9890 r9891  
    5252  }
    5353
     54
     55  /**
     56   * registers a new CollisionEvent
     57   * @param entityA one collision object
     58   * @param entityB the other collision objectName
     59   * @param bvA bounding volume of object A
     60   * @param bvB bounding volume of object B
     61   *
     62   * this function doesn't check if the entities in question actualy are registered for any collisions
     63   */
     64  void CollisionTube::registerCollisionEvent(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
     65  {
     66    Collision* collision = this->_collisionList.back();
     67    if( collision->match(*entityA, *entityB))
     68    {}
     69  }
     70
     71
     72  /**
     73   * registers a new CollisionEvent, only used by ground to object collision (eg. bsp model)
     74   * @param type type of collision as stated in cr_def.h
     75   * @param entity the WorldEntity colliding with the ground
     76   * @param groundEntity the WorldEntity representing the ground
     77   * @param normal the normal vector for the ground (up) - not always specified
     78   * @param position the position of the collision relative to the object center
     79   * @param bInWall true if the entity is in the ground material
     80   */
     81  void CollisionTube::registerCollisionEvent(int type, WorldEntity* entity, WorldEntity* groundEntity,
     82                              const Vector& normal, const Vector& position, bool bInWall)
     83  {
     84    //
     85  }
     86
     87  /**
     88   * handles all collisions in registered in this tube
     89   */
     90  void CollisionTube::handleCollisions()
     91  {
     92    //
     93  }
     94
     95
    5496}
    5597
  • branches/coll_rect/src/lib/collision_reaction/collision_tube.h

    r9890 r9891  
    3838    { return (entityA.isReactive() && entityB.isReactive()); }
    3939
    40     bool registerCollisionEvent(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB);
    41     bool registerCollisionEvent(int type, WorldEntity* entity, WorldEntity* groundEntity,
     40    void registerCollisionEvent(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB);
     41    void registerCollisionEvent(int type, WorldEntity* entity, WorldEntity* groundEntity,
    4242                                const Vector& normal, const Vector& position, bool bInWall = false);
    4343
Note: See TracChangeset for help on using the changeset viewer.