Changeset 4160 in orxonox.OLD
- Timestamp:
- May 11, 2005, 12:49:49 AM (19 years ago)
- Location:
- orxonox/branches/md2_loader/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/md2_loader/src/Makefile.am
r4151 r4160 33 33 34 34 orxonox_DEPENDENCIES = libORXgui.a 35 orxonox_LDADD = libORXgui.a 35 orxonox_LDADD = libORXgui.a $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS) 36 36 orxonox_SOURCES= orxonox.cc \ 37 37 game_loader.cc \ … … 179 179 180 180 libORXgui_a_CPPFLAGS=$(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) 181 AM_LDFLAGS=$(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)182 181 183 182 libORXgui_a_SOURCES = lib/gui/gui/gui.cc \ -
orxonox/branches/md2_loader/src/Makefile.in
r4151 r4160 93 93 tinyxmlparser.$(OBJEXT) benchmark.$(OBJEXT) 94 94 orxonox_OBJECTS = $(am_orxonox_OBJECTS) 95 am__DEPENDENCIES_1 = 95 96 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) 96 97 depcomp = $(SHELL) $(top_srcdir)/depcomp … … 279 280 noinst_LIBRARIES = libORXgui.a 280 281 orxonox_DEPENDENCIES = libORXgui.a 281 orxonox_LDADD = libORXgui.a 282 orxonox_LDADD = libORXgui.a $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS) 282 283 orxonox_SOURCES = orxonox.cc \ 283 284 game_loader.cc \ … … 425 426 426 427 libORXgui_a_CPPFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) 427 AM_LDFLAGS = $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)428 428 libORXgui_a_SOURCES = lib/gui/gui/gui.cc \ 429 429 lib/gui/gui/gui_gtk.cc \ -
orxonox/branches/md2_loader/src/lib/coord/p_node.cc
r3966 r4160 99 99 this->parent = parent; 100 100 this->objectName = NULL; 101 this->time = 1.0; /* set time to 1 to make divisions by zero impossible */102 101 } 103 102 … … 281 280 } 282 281 283 284 285 /**286 \brief this calculates the current movement speed of the node287 */288 float PNode::getSpeed() const289 {290 return (this->absCoordinate - this->lastAbsCoordinate).len() / this->time;291 }292 293 /**294 \returns the Velocity of the PNode295 */296 Vector PNode::getVelocity() const297 {298 return (this->absCoordinate - this->lastAbsCoordinate) / this->time;299 }300 301 282 /** 302 283 \brief adds a child and makes this node to a parent … … 424 405 { 425 406 this->lastAbsCoordinate = this->absCoordinate; 426 this->time = dt; 407 427 408 PRINTF(4)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z); 428 409 … … 499 480 delete iterator; 500 481 482 this->velocity = (this->absCoordinate - this->lastAbsCoordinate) / dt; 501 483 this->timeStamp = timeStamp; 502 484 this->bRelCoorChanged = false; -
orxonox/branches/md2_loader/src/lib/coord/p_node.h
r3966 r4160 69 69 void shiftDir (const Quaternion& shift); 70 70 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;} 73 75 74 76 void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE); … … 110 112 void init(PNode* parent); 111 113 114 Vector velocity; //!< Saves the velocity. 112 115 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 vector114 float time; //!< time since last update115 116 }; 116 117 -
orxonox/branches/md2_loader/src/story_entities/world.cc
r4153 r4160 1121 1121 1122 1122 /* 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; 1125 1125 //entity = entities->enumerate(); 1126 1126 tIterator<WorldEntity>* iterator = this->entities->getIterator(); … … 1128 1128 while( entity != NULL) 1129 1129 { 1130 entity->tick ( seconds);1130 entity->tick (this->dtS); 1131 1131 entity = iterator->nextElement(); 1132 1132 } … … 1136 1136 this->trackManager->tick(this->dt); 1137 1137 this->localCamera->tick(this->dt); 1138 this->garbageCollector->tick( seconds);1138 this->garbageCollector->tick(this->dtS); 1139 1139 1140 1141 1142 1143 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); 1147 1147 } 1148 1148 this->lastFrame = currentFrame; … … 1159 1159 { 1160 1160 this->garbageCollector->update(); 1161 this->nullParent->update ( dt);1161 this->nullParent->update (this->dtS); 1162 1162 } 1163 1163 -
orxonox/branches/md2_loader/src/story_entities/world.h
r4152 r4160 95 95 Uint32 lastFrame; //!< last time of frame 96 96 Uint32 dt; //!< time needed to calculate this frame 97 float dtS; //!< The time needed for caluculations in seconds 97 98 double gameTime; //!< this is where the game time is saved 98 99 bool bQuitOrxonox; //!< quit this application
Note: See TracChangeset
for help on using the changeset viewer.