Changeset 3833 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Apr 14, 2005, 2:03:05 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/animation.cc
r3820 r3833 25 25 this->bHasKeys = false; 26 26 this->bHandled = true; 27 this->baseObject = NULL; 27 28 28 29 // setting default values … … 55 56 this->bRunning = true; 56 57 } 58 59 57 60 void Anim::stop() 58 61 { -
orxonox/trunk/src/animation.h
r3832 r3833 28 28 29 29 #include "list.h" 30 #include "base_object.h" 31 30 32 // FORWARD DEFINITION 31 33 … … 52 54 ANIM_FUNCTION animFunc; 53 55 }; 54 55 56 /**********************TEST*******************************/57 class aTest58 {59 public:60 aTest() { last = 0.0;}61 ~aTest() {}62 void littleDebug(float f) { diff = f - last; printf("f=%f, diff=%f\n", f,diff); last = f;}63 private:64 float diff;65 float last;66 };67 68 //aTest::aTest() {}69 //aTest::~aTest() {}70 71 //void aTest::littleDebug(float f)72 73 /**********************TEST*******************************/74 75 56 76 57 class Anim … … 99 80 * virtual rewind, to go to the first Keyframe. (other functions will call this one) 100 81 */ 82 83 /** 84 \returns the BaseObject, this animation operates on 85 */ 86 BaseObject* getBaseObject(void) const { return baseObject;} 87 101 88 protected: 102 89 Anim(void); … … 107 94 ANIM_INFINITY postInfinity; 108 95 96 BaseObject* baseObject; //!< The same as object in the derived classes, but with reference to BaseObject 109 97 bool bHasKeys; 110 98 bool bHandled; //!< If this Animation is handled by the AnimationPlayer. … … 209 197 void tAnim<T>::setFuncToAnim(T* object, void (T::*funcToAnim)(float)) 210 198 { 211 this-> object = object;199 this->baseObject = this->object = object; 212 200 this->funcToAnim = funcToAnim; 213 201 } … … 380 368 381 369 370 371 /**********************TEST*******************************/ 372 class aTest 373 { 374 public: 375 aTest() { last = 0.0;} 376 ~aTest() {} 377 void littleDebug(float f) { diff = f - last; printf("f=%f, diff=%f\n", f,diff); last = f;} 378 private: 379 float diff; 380 float last; 381 }; 382 383 //aTest::aTest() {} 384 //aTest::~aTest() {} 385 386 //void aTest::littleDebug(float f) 387 388 /**********************TEST*******************************/ 389 390 382 391 #endif /* _ANIMATION_H */ -
orxonox/trunk/src/animation_player.cc
r3821 r3833 142 142 143 143 144 Anim* AnimationPlayer::getObjectFromBaseObject(const BaseObject* baseObject) const 145 { 146 tIterator<Anim>* animIt = this->animationList->getIterator(); 147 Anim* anim = animIt->nextElement(); 148 while( anim != NULL) 149 { 150 if(anim->getBaseObject() == baseObject) 151 { 152 delete animIt; 153 return anim; 154 } 155 anim = animIt->nextElement(); 156 } 157 delete animIt; 158 159 } 160 161 144 162 145 163 /** -
orxonox/trunk/src/animation_player.h
r3821 r3833 42 42 void pause(void); 43 43 44 Anim* getObjectFromBaseObject(const BaseObject* baseObject) const; 45 44 46 void debug(void); 45 47 -
orxonox/trunk/src/lib/graphics/text_engine.cc
r3790 r3833 51 51 Text::Text(Font* font, int type) 52 52 { 53 this->setClassName("Text"); 54 53 55 // initialize this Text 54 56 this->bindNode = NULL; -
orxonox/trunk/src/lib/graphics/text_engine.h
r3790 r3833 90 90 //////////// 91 91 //! Represents one textElement. 92 class Text 92 class Text : public BaseObject 93 93 { 94 94 friend class TextEngine;
Note: See TracChangeset
for help on using the changeset viewer.