Changeset 5068 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Aug 18, 2005, 3:51:43 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/render2D/element_2d.cc
r4862 r5068 55 55 56 56 this->setVisibility(true); 57 this->setActiveness(true); 57 58 this->setPosition2D(0,0); 58 59 this->setAlignment(E2D_ALIGN_NONE); -
orxonox/trunk/src/lib/graphics/render2D/element_2d.h
r4862 r5068 69 69 /** @param visible true if the Element should be visible false otherwise (will not be rendered) */ 70 70 inline void setVisibility(bool visible) { this->visible = visible; }; 71 /** @param active true if the Element should be active, false otherwise (will not be ticked) */ 72 inline void setActiveness(bool active) { this->active = active; }; 73 71 74 72 75 /** @param bindNode the Node this 2D-element should follow. if NULL the Element will not follow anything */ … … 76 79 /** @returns the visibility state */ 77 80 inline bool isVisible() { return this->visible; }; 81 /** @returns the active-State */ 82 inline bool isActive() { return this->active; }; 78 83 79 84 virtual void tick(float dt); … … 91 96 92 97 private: 93 bool visible; 94 E2D_LAYER layer; 98 bool visible; //!< If the given Element2D is visible. 99 bool active; //!< If the given Element2D is active. 100 E2D_LAYER layer; //!< What layer this Element2D is on. 95 101 }; 96 102 -
orxonox/trunk/src/lib/graphics/render2D/render_2d.cc
r4955 r5068 105 105 while (elem != NULL) 106 106 { 107 elem->tick(dt); 107 if (elem->isActive()) 108 elem->tick(dt); 108 109 elem = iterator->nextElement(); 109 110 } -
orxonox/trunk/src/lib/util/list.h
r4836 r5068 1 1 /*! 2 \file list.h3 \briefa File that includes a List-template4 */2 * @file list.h 3 * a File that includes a List-template 4 */ 5 5 6 6 #ifndef _LIST_H … … 132 132 void add(T* entity); 133 133 void remove(T* entity); 134 void removeLast(); 134 135 void flush(); 135 136 T* firstElement(); … … 214 215 { 215 216 this->currentEl = this->first; 216 listElement<T>* te;217 217 while( this->currentEl != NULL) 218 218 { … … 233 233 } 234 234 235 /** 236 * removes the Last Element of the List 237 */ 238 template<class T> 239 inline void tList<T>::removeLast() 240 { 241 if (this->last == NULL) 242 return; 243 else if (this->last == this->first) 244 { 245 delete this->first; 246 this->first = NULL; 247 this->last = NULL; 248 this->size--; 249 } 250 else 251 { 252 listElement<T>* delLast = this->last; 253 this->last->prev->next = NULL; 254 this->last = this->last->prev; 255 delete delLast; 256 } 257 } 235 258 236 259 /**
Note: See TracChangeset
for help on using the changeset viewer.