Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4160 in orxonox.OLD


Ignore:
Timestamp:
May 11, 2005, 12:49:49 AM (19 years ago)
Author:
patrick
Message:

orxonox/branches/md2_loader: merged trunk into md2_loader branche using command: svn merge ../trunk md2_loader -r 4139:HEAD

Location:
orxonox/branches/md2_loader/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/md2_loader/src/Makefile.am

    r4151 r4160  
    3333
    3434orxonox_DEPENDENCIES = libORXgui.a
    35 orxonox_LDADD = libORXgui.a
     35orxonox_LDADD = libORXgui.a $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
    3636orxonox_SOURCES= orxonox.cc \
    3737                 game_loader.cc \
     
    179179
    180180libORXgui_a_CPPFLAGS=$(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
    181 AM_LDFLAGS=$(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
    182181
    183182libORXgui_a_SOURCES = lib/gui/gui/gui.cc \
  • orxonox/branches/md2_loader/src/Makefile.in

    r4151 r4160  
    9393        tinyxmlparser.$(OBJEXT) benchmark.$(OBJEXT)
    9494orxonox_OBJECTS = $(am_orxonox_OBJECTS)
     95am__DEPENDENCIES_1 =
    9596DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
    9697depcomp = $(SHELL) $(top_srcdir)/depcomp
     
    279280noinst_LIBRARIES = libORXgui.a
    280281orxonox_DEPENDENCIES = libORXgui.a
    281 orxonox_LDADD = libORXgui.a
     282orxonox_LDADD = libORXgui.a $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
    282283orxonox_SOURCES = orxonox.cc \
    283284                 game_loader.cc \
     
    425426
    426427libORXgui_a_CPPFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
    427 AM_LDFLAGS = $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
    428428libORXgui_a_SOURCES = lib/gui/gui/gui.cc \
    429429                            lib/gui/gui/gui_gtk.cc \
  • orxonox/branches/md2_loader/src/lib/coord/p_node.cc

    r3966 r4160  
    9999  this->parent = parent;
    100100  this->objectName = NULL;
    101   this->time = 1.0; /* set time to 1 to make divisions by zero impossible */
    102101}
    103102
     
    281280}
    282281
    283 
    284 
    285 /**
    286    \brief this calculates the current movement speed of the node
    287 */
    288 float PNode::getSpeed() const
    289 {
    290   return (this->absCoordinate - this->lastAbsCoordinate).len() / this->time;
    291 }
    292 
    293 /**
    294    \returns the Velocity of the PNode
    295 */
    296 Vector PNode::getVelocity() const
    297 {
    298   return (this->absCoordinate - this->lastAbsCoordinate) / this->time;
    299 }
    300 
    301282/**
    302283   \brief adds a child and makes this node to a parent
     
    424405{
    425406  this->lastAbsCoordinate = this->absCoordinate;
    426   this->time = dt;
     407
    427408  PRINTF(4)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
    428409
     
    499480  delete iterator;
    500481
     482  this->velocity = (this->absCoordinate - this->lastAbsCoordinate) / dt;
    501483  this->timeStamp = timeStamp;
    502484  this->bRelCoorChanged = false;
  • orxonox/branches/md2_loader/src/lib/coord/p_node.h

    r3966 r4160  
    6969  void shiftDir (const Quaternion& shift);
    7070
    71   float getSpeed() const;
    72   Vector getVelocity() const;
     71  /** \returns the Speed of the Node */
     72  inline float getSpeed() const {return this->velocity.len()/1000;} //! \FIX THIS SHOULD NOT BE /1000
     73  /** \returns the Velocity of the Node */
     74  inline const Vector& getVelocity() const {return this->velocity;}
    7375
    7476  void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE);
     
    110112  void init(PNode* parent);
    111113
     114  Vector velocity;          //!< Saves the velocity.
    112115  Vector lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate
    113   Vector diffCoordinate;    //!< this is stored here for performance reasons, difference to the last vector
    114   float time;                //!< time since last update
    115116};
    116117
  • orxonox/branches/md2_loader/src/story_entities/world.cc

    r4153 r4160  
    11211121     
    11221122      /* function to let all entities tick (iterate through list) */
    1123       float seconds = this->dt / 1000.0;     
    1124       this->gameTime += seconds;
     1123      this->dtS = (float)this->dt / 1000.0;     
     1124      this->gameTime += this->dtS;
    11251125      //entity = entities->enumerate();
    11261126      tIterator<WorldEntity>* iterator = this->entities->getIterator();
     
    11281128      while( entity != NULL)
    11291129        {
    1130           entity->tick (seconds);
     1130          entity->tick (this->dtS);
    11311131          entity = iterator->nextElement();
    11321132        }
     
    11361136      this->trackManager->tick(this->dt);
    11371137      this->localCamera->tick(this->dt);
    1138       this->garbageCollector->tick(seconds);
     1138      this->garbageCollector->tick(this->dtS);
    11391139         
    1140           /* actualy the Graphics Engine should tick the world not the other way around...
    1141                 but since we like the things not too complicated we got it this way around
    1142                 until there is need or time to do it the other way around.
    1143                 \todo: GraphicsEngine ticks world: separation of processes and data...
    1144           */
    1145       GraphicsEngine::getInstance()->tick(seconds);
    1146           AnimationPlayer::getInstance()->tick(seconds);
     1140      /* actualy the Graphics Engine should tick the world not the other way around...
     1141        but since we like the things not too complicated we got it this way around
     1142        until there is need or time to do it the other way around.
     1143        \todo: GraphicsEngine ticks world: separation of processes and data...
     1144      */
     1145      GraphicsEngine::getInstance()->tick(this->dtS);
     1146      AnimationPlayer::getInstance()->tick(this->dtS);
    11471147    }
    11481148  this->lastFrame = currentFrame;
     
    11591159{
    11601160  this->garbageCollector->update();
    1161   this->nullParent->update (dt);
     1161  this->nullParent->update (this->dtS);
    11621162}
    11631163
  • orxonox/branches/md2_loader/src/story_entities/world.h

    r4152 r4160  
    9595  Uint32 lastFrame;                   //!< last time of frame
    9696  Uint32 dt;                          //!< time needed to calculate this frame
     97  float dtS;                          //!< The time needed for caluculations in seconds
    9798  double gameTime;                    //!< this is where the game time is saved
    9899  bool bQuitOrxonox;                  //!< quit this application
Note: See TracChangeset for help on using the changeset viewer.