Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4392 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
May 30, 2005, 1:30:23 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: physicsInterfaces now check in at constuctiontime with the PhysicsEngine

Location:
orxonox/trunk/src
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/Makefile.in

    r4386 r4392  
    433433          esac; \
    434434        done; \
    435         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
     435        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
    436436        cd $(top_srcdir) && \
    437           $(AUTOMAKE) --foreign  src/Makefile
     437          $(AUTOMAKE) --gnu  src/Makefile
    438438.PRECIOUS: Makefile
    439439Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/Makefile.in

    r4338 r4392  
    184184          esac; \
    185185        done; \
    186         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/Makefile'; \
     186        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/Makefile'; \
    187187        cd $(top_srcdir) && \
    188           $(AUTOMAKE) --foreign  src/lib/Makefile
     188          $(AUTOMAKE) --gnu  src/lib/Makefile
    189189.PRECIOUS: Makefile
    190190Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/graphics/Makefile.in

    r4276 r4392  
    177177          esac; \
    178178        done; \
    179         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/Makefile'; \
     179        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/Makefile'; \
    180180        cd $(top_srcdir) && \
    181           $(AUTOMAKE) --foreign  src/lib/graphics/Makefile
     181          $(AUTOMAKE) --gnu  src/lib/graphics/Makefile
    182182.PRECIOUS: Makefile
    183183Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/graphics/importer/Makefile.in

    r4276 r4392  
    181181          esac; \
    182182        done; \
    183         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile'; \
     183        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile'; \
    184184        cd $(top_srcdir) && \
    185           $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile
     185          $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile
    186186.PRECIOUS: Makefile
    187187Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/gui/Makefile.in

    r4276 r4392  
    179179          esac; \
    180180        done; \
    181         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/Makefile'; \
     181        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/Makefile'; \
    182182        cd $(top_srcdir) && \
    183           $(AUTOMAKE) --foreign  src/lib/gui/Makefile
     183          $(AUTOMAKE) --gnu  src/lib/gui/Makefile
    184184.PRECIOUS: Makefile
    185185Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/gui/console/Makefile.in

    r4276 r4392  
    205205          esac; \
    206206        done; \
    207         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/console/Makefile'; \
     207        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/console/Makefile'; \
    208208        cd $(top_srcdir) && \
    209           $(AUTOMAKE) --foreign  src/lib/gui/console/Makefile
     209          $(AUTOMAKE) --gnu  src/lib/gui/console/Makefile
    210210.PRECIOUS: Makefile
    211211Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/gui/gui/Makefile.in

    r4338 r4392  
    242242          esac; \
    243243        done; \
    244         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/gui/Makefile'; \
     244        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/gui/Makefile'; \
    245245        cd $(top_srcdir) && \
    246           $(AUTOMAKE) --foreign  src/lib/gui/gui/Makefile
     246          $(AUTOMAKE) --gnu  src/lib/gui/gui/Makefile
    247247.PRECIOUS: Makefile
    248248Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/physics/Makefile.in

    r4375 r4392  
    218218          esac; \
    219219        done; \
    220         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/physics/Makefile'; \
     220        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/physics/Makefile'; \
    221221        cd $(top_srcdir) && \
    222           $(AUTOMAKE) --foreign  src/lib/physics/Makefile
     222          $(AUTOMAKE) --gnu  src/lib/physics/Makefile
    223223.PRECIOUS: Makefile
    224224Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/lib/physics/physics_engine.cc

    r4381 r4392  
    3333
    3434   this->connections = new tList<PhysicsConnection>;
     35   this->interfaces = new tList<PhysicsInterface>;
    3536}
    3637
     
    5758{
    5859  PhysicsEngine::singletonRef = NULL;
     60}
     61
     62
     63/**
     64   \brief adds a PhysicsInterface to the list of handeled physicsInterfaces
     65   \param physicsInterface the interface to add
     66
     67   this is normally done in the constructor of any PhysicsInterface
     68*/
     69void PhysicsEngine::addPhysicsInterface(PhysicsInterface* physicsInterface)
     70{
     71  this->interfaces->add(physicsInterface);
     72}
     73
     74/**
     75   \brief removes a PhysicsInterface from the list of handeled physicsInterfaces
     76   \param physicsInterface the interface to remove
     77
     78   this is normally done in the destructor of any PhysicsInterface
     79*/
     80void PhysicsEngine::removePhysicsInterface(PhysicsInterface* physicsInterface)
     81{
     82  this->interfaces->remove(physicsInterface); 
    5983}
    6084
     
    114138  PRINT(0)("====================================\n");
    115139  PRINT(0)(" reference: %p\n", this);
    116   PRINT(0)(" numbers of Connections: %d\n", this->connections->getSize());
     140  PRINT(0)(" number of Interfaces: %d\n", this->interfaces->getSize());
     141  PRINT(0)(" number of Connections: %d\n", this->connections->getSize());
    117142
    118143  PRINT(0)("==============================PHYS==\n");
  • orxonox/trunk/src/lib/physics/physics_engine.h

    r4378 r4392  
    99
    1010#include "base_object.h"
     11
    1112#include "physics_connection.h"
     13#include "physics_interface.h"
    1214
    1315// Forward Declaration
     
    2224  virtual ~PhysicsEngine(void);
    2325
     26  void addPhysicsInterface(PhysicsInterface* physicsInterface);
     27  void removePhysicsInterface(PhysicsInterface* physicsInterface);
     28
     29
    2430  void addConnection(PhysicsConnection* connection);
    2531  void removeConnection(PhysicsConnection* connection);
    26  
    27 
    2832
    2933  void tick(float dt);
     
    3337 private:
    3438  PhysicsEngine(void);
    35   static PhysicsEngine* singletonRef;
     39  static PhysicsEngine* singletonRef;      //!< the singleton reference of the PhysicsEngine
    3640
    37   tList<PhysicsConnection>* connections;
     41  tList<PhysicsInterface>* interfaces;     //!< a list of physically based objects
     42  tList<PhysicsConnection>* connections;   //!< a list of physical connections
    3843};
    3944
  • orxonox/trunk/src/lib/physics/physics_interface.cc

    r4377 r4392  
    2121
    2222#include "physics_interface.h"
     23#include "physics_engine.h"
    2324
    2425#include "field.h"
     
    4142   this->massChildren = 0;
    4243   this->forceSum = Vector(0, 0, 0);
     44
     45   PhysicsEngine::getInstance()->addPhysicsInterface(this);
    4346}
    4447
     
    5053PhysicsInterface::~PhysicsInterface ()
    5154{
    52   // delete what has to be deleted here
     55   PhysicsEngine::getInstance()->removePhysicsInterface(this);
    5356}
    5457
  • orxonox/trunk/src/lib/tinyxml/Makefile.in

    r4276 r4392  
    204204          esac; \
    205205        done; \
    206         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/tinyxml/Makefile'; \
     206        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/tinyxml/Makefile'; \
    207207        cd $(top_srcdir) && \
    208           $(AUTOMAKE) --foreign  src/lib/tinyxml/Makefile
     208          $(AUTOMAKE) --gnu  src/lib/tinyxml/Makefile
    209209.PRECIOUS: Makefile
    210210Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/subprojects/Makefile.in

    r4346 r4392  
    186186          esac; \
    187187        done; \
    188         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/Makefile'; \
     188        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/Makefile'; \
    189189        cd $(top_srcdir) && \
    190           $(AUTOMAKE) --foreign  src/subprojects/Makefile
     190          $(AUTOMAKE) --gnu  src/subprojects/Makefile
    191191.PRECIOUS: Makefile
    192192Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/subprojects/gui/Makefile.in

    r4346 r4392  
    229229          esac; \
    230230        done; \
    231         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/gui/Makefile'; \
     231        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/gui/Makefile'; \
    232232        cd $(top_srcdir) && \
    233           $(AUTOMAKE) --foreign  src/subprojects/gui/Makefile
     233          $(AUTOMAKE) --gnu  src/subprojects/gui/Makefile
    234234.PRECIOUS: Makefile
    235235Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/subprojects/importer/Makefile.in

    r4346 r4392  
    228228          esac; \
    229229        done; \
    230         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/importer/Makefile'; \
     230        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/importer/Makefile'; \
    231231        cd $(top_srcdir) && \
    232           $(AUTOMAKE) --foreign  src/subprojects/importer/Makefile
     232          $(AUTOMAKE) --gnu  src/subprojects/importer/Makefile
    233233.PRECIOUS: Makefile
    234234Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/subprojects/particles/Makefile.in

    r4346 r4392  
    257257          esac; \
    258258        done; \
    259         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/particles/Makefile'; \
     259        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/particles/Makefile'; \
    260260        cd $(top_srcdir) && \
    261           $(AUTOMAKE) --foreign  src/subprojects/particles/Makefile
     261          $(AUTOMAKE) --gnu  src/subprojects/particles/Makefile
    262262.PRECIOUS: Makefile
    263263Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/subprojects/particles/particle_fun.cc

    r4385 r4392  
    8787        case SDLK_i:
    8888          ParticleEngine::getInstance()->debug();
     89          PhysicsEngine::getInstance()->debug();
    8990          break;
    9091        }
  • orxonox/trunk/src/subprojects/testmain/Makefile.in

    r4346 r4392  
    197197          esac; \
    198198        done; \
    199         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/testmain/Makefile'; \
     199        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/testmain/Makefile'; \
    200200        cd $(top_srcdir) && \
    201           $(AUTOMAKE) --foreign  src/subprojects/testmain/Makefile
     201          $(AUTOMAKE) --gnu  src/subprojects/testmain/Makefile
    202202.PRECIOUS: Makefile
    203203Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Note: See TracChangeset for help on using the changeset viewer.