Changeset 4848 in orxonox.OLD for orxonox/trunk/src/lib/graphics/render2D
- Timestamp:
- Jul 13, 2005, 6:36:22 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/graphics/render2D
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/render2D/element_2d.h
r4847 r4848 18 18 E2D_MEDIUM, //!< Will be rendered on the medium Layer. 19 19 E2D_BOTTOM, //!< Will be rendered on the bottom Layer 20 E2D_BELOW_ALL //!< Will be rendered below the 3D-scene. @todo make this work. 20 E2D_BELOW_ALL, //!< Will be rendered below the 3D-scene. @todo make this work. 21 22 E2D_LAYER_COUNT //!< The count of Layers. 21 23 } E2DLayer; 22 24 … … 24 26 typedef enum 25 27 { 26 E LEM2D_ALIGN_NONE,27 E LEM2D_ALIGN_LEFT,28 E LEM2D_ALIGN_RIGHT,29 E LEM2D_ALIGN_CENTER,30 E LEM2D_ALIGN_SCREEN_CENTER31 } E LEM2D_ALIGNMENT;28 E2D_ALIGN_NONE, 29 E2D_ALIGN_LEFT, 30 E2D_ALIGN_RIGHT, 31 E2D_ALIGN_CENTER, 32 E2D_ALIGN_SCREEN_CENTER 33 } E2D_ALIGNMENT; 32 34 33 35 //! A Struct defining the Position of an Element in 2D-space … … 70 72 E2DLayer layer; 71 73 72 E LEM2D_ALIGNMENTalignment; //!< How the Element is aligned around its Position74 E2D_ALIGNMENT alignment; //!< How the Element is aligned around its Position 73 75 const PNode* bindNode; //!< a node over which to display this 2D-element 74 76 }; -
orxonox/trunk/src/lib/graphics/render2D/render_2d.cc
r4847 r4848 35 35 this->setName("Render2D"); 36 36 37 this->element2DList = new tList<Element2D> ();37 this->element2DList = new tList<Element2D>; 38 38 } 39 39 … … 57 57 * registers a 2D-element to the 2D-Renderer 58 58 * @param element2D the element to registers 59 * 60 * do not use this function by yourself, because this is used by Element2D's constructor 59 61 */ 60 62 void Render2D::registerElement2D(Element2D* element2D) … … 66 68 * unregisters a 2D-element from the 2D-Renderer 67 69 * @param element2D The element to unregister 70 * 71 * do not use this function by yourself, because this is used by Element2D's destructor 68 72 */ 69 73 void Render2D::unregisterElement2D(Element2D* element2D) … … 75 79 void Render2D::draw() const 76 80 { 81 GraphicsEngine::enter2DMode(); 82 77 83 tIterator<Element2D>* iterator = this->element2DList->getIterator(); 78 84 Element2D* elem = iterator->nextElement(); … … 84 90 } 85 91 delete iterator; 92 93 GraphicsEngine::leave2DMode(); 86 94 } -
orxonox/trunk/src/lib/graphics/render2D/render_2d.h
r4840 r4848 2 2 * @file render_2d.h 3 3 * @brief Definition of the 2D-rendering engine singleton Class 4 * @todo implement Layer-rendering 4 5 */ 5 6 … … 8 9 9 10 #include "base_object.h" 10 11 #include "element_2d.h" 11 12 // FORWARD DEFINITION 12 13 template <class T> class tList; 13 class Element2D;14 14 15 15 //! A default singleton class. … … 29 29 private: 30 30 Render2D(); 31 static Render2D* 31 static Render2D* singletonRef; //!< Reference to this class. 32 32 33 tList<Element2D>* 33 tList<Element2D>* element2DList; //!< List of all valid 2D-elements. 34 34 }; 35 35
Note: See TracChangeset
for help on using the changeset viewer.