Changeset 3831 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Apr 14, 2005, 2:54:02 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/animation.h
r3830 r3831 328 328 float tAnim<T>::sine(float timePassed) const 329 329 { 330 float d = this->currentKeyFrame->value - this->nextKeyFrame->value; 331 float e = 0.5 * d * (1 - cos(M_PI * timePassed / this->currentKeyFrame->duration)); 332 //printf("d=%f, t=%f, T=%f\n", d, timePassed, this->currentKeyFrame->duration); 333 return this->currentKeyFrame->value - e; 334 /* 330 335 return this->currentKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value) 331 336 * sin(timePassed / this->currentKeyFrame->duration * M_PI); 337 */ 332 338 } 333 339 -
orxonox/trunk/src/lib/util/list.h
r3790 r3831 78 78 79 79 template<class T> 80 tIterator<T>::~tIterator ()80 inline tIterator<T>::~tIterator () 81 81 { 82 82 this->currentEl = NULL; … … 126 126 127 127 template<class T> 128 tList<T>::tList ()128 inline tList<T>::tList () 129 129 { 130 130 this->first = NULL; … … 134 134 135 135 template<class T> 136 tList<T>::~tList ()136 inline tList<T>::~tList () 137 137 { 138 138 this->currentEl = this->first; … … 153 153 inline void tList<T>::add(T* entity) 154 154 { 155 if( entity == NULL) return;155 __UNLIKELY_IF( entity == NULL) return; 156 156 listElement<T>* el = new listElement<T>; 157 157 el->prev = this->last; … … 161 161 this->last = el; 162 162 163 if(el->prev == NULL) this->first = el; /* if first element */163 __UNLIKELY_IF(el->prev == NULL) this->first = el; /* if first element */ 164 164 else el->prev->next = el; 165 165 this->size++; … … 170 170 inline void tList<T>::remove(T* entity) 171 171 { 172 if( entity == NULL) return;172 //__UNLIKELY( entity == NULL) return; 173 173 this->currentEl = this->first; 174 174 listElement<T>* te; … … 196 196 197 197 template<class T> 198 void tList<T>::destroy()198 inline void tList<T>::destroy() 199 199 { 200 200 this->currentEl = this->first; … … 213 213 214 214 template<class T> 215 T* tList<T>::firstElement()215 inline T* tList<T>::firstElement() 216 216 { 217 217 return this->first->curr; … … 219 219 220 220 template<class T> 221 T* tList<T>::lastElement()221 inline T* tList<T>::lastElement() 222 222 { 223 223 return this->last->curr; … … 226 226 227 227 template<class T> 228 bool tList<T>::isEmpty()228 inline bool tList<T>::isEmpty() 229 229 { 230 230 return (this->size==0)?true:false; … … 233 233 234 234 template<class T> 235 in t tList<T>::getSize()235 inline int tList<T>::getSize() 236 236 { 237 237 return this->size; … … 239 239 240 240 241 /* deprecated */ 241 242 template<class T> 242 243 T* tList<T>::enumerate() … … 257 258 258 259 260 /* deprecated */ 259 261 template<class T> 260 262 T* tList<T>::nextElement() … … 272 274 */ 273 275 template<class T> 274 T* tList<T>::nextElement(T* toEntity)276 inline T* tList<T>::nextElement(T* toEntity) 275 277 { 276 278 //if( this->last == this->first == NULL) return NULL; -
orxonox/trunk/src/story_entities/world.cc
r3828 r3831 380 380 aTest* test = new aTest(); 381 381 tAnim<aTest>* testAnim = new tAnim<aTest>(test, &aTest::littleDebug); 382 testAnim->addKeyFrame(0.0, 1.0, ANIM_ LINEAR);383 testAnim->addKeyFrame( 1.0, 1.0, ANIM_LINEAR);382 testAnim->addKeyFrame(0.0, 1.0, ANIM_SINE); 383 testAnim->addKeyFrame(3.5, 1.0, ANIM_SINE); 384 384 //testAnim->addKeyFrame(0.0, 1.0, ANIM_LINEAR); 385 385 //testAnim->addKeyFrame(1.0, 1.0, ANIM_LINEAR);
Note: See TracChangeset
for help on using the changeset viewer.