Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7933 in orxonox.OLD for branches/cr/src


Ignore:
Timestamp:
May 28, 2006, 9:37:55 PM (19 years ago)
Author:
patrick
Message:

cr: more registration framework

Location:
branches/cr/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/cr/src/lib/collision_reaction/Makefile.am

    r7927 r7933  
    1010
    1111noinst_HEADERS =     cr_engine.h \
    12                                                                                  collision_handle.h
     12                     collision_handle.h
    1313
  • branches/cr/src/lib/collision_reaction/collision_handle.cc

    r7932 r7933  
    6161  this->targetList.push_back(classID);
    6262}
     63
     64
     65/**
     66 * this is the function to be called on a collision event for this handle
     67 *  @param collision the collision objects containing all collision informations
     68 */
     69void CollisionHandle::registerCollision(Collision* collision)
     70{
     71  this->collisionList.push_back(collision);
     72}
     73
     74
  • branches/cr/src/lib/collision_reaction/cr_engine.cc

    r7932 r7933  
    5555
    5656
     57void CREngine::debug()
     58{
     59
     60}
  • branches/cr/src/lib/collision_reaction/cr_engine.h

    r7932 r7933  
    5555
    5656
     57  void debug();
     58
    5759private:
    5860  CREngine(void);
  • branches/cr/src/world_entities/world_entity.cc

    r7932 r7933  
    3434#include "cr_engine.h"
    3535#include "collision_handle.h"
     36
     37#include <stdarg.h>
    3638
    3739
     
    239241 *  @param ... the targets as classIDs
    240242 */
    241 void WorldEntity::subscribeReaction(CREngine::CRType type, int nrOfTargets, ...)
     243void WorldEntity::subscribeReaction(CREngine::CRType type, int nrOfTargets, long target...)
    242244{
    243245
     
    245247
    246248  va_list itemlist;
    247   va_start (itemlist, CREngine::CRType);
     249  va_start (itemlist, target);
    248250  for (int i = 0; i < nrOfTargets; i++)
    249     this->collisionHandles[type].push_back(va_arg(itemlist, long));
     251    this->collisionHandles[type]->addTarget(va_arg(itemlist, long));
    250252  va_end(itemlist);
    251253}
  • branches/cr/src/world_entities/world_entity.h

    r7932 r7933  
    1515#include "glincl.h"
    1616#include <vector>
    17 #include <stdarg.h>
     17
    1818
    1919
     
    6868
    6969  /* --- Collision Reaction Block --- */
    70   void subscribeReaction(CREngine::CRType type, int nrOfTargets, ...);
     70  void subscribeReaction(CREngine::CRType type, int nrOfTargets, long target, ...);
    7171
    7272
Note: See TracChangeset for help on using the changeset viewer.