| 
                Last change
                  on this file since 4844 was
                  4840,
                  checked in by bensch, 20 years ago
           | 
        
        
          | 
               
orxonox/trunk: more definitions for element2D 
 
           | 
        
        | 
            File size:
            871 bytes
           | 
      
      
        
  | Line |   | 
|---|
| 1 | /*! | 
|---|
| 2 |  * @file render_2d.h | 
|---|
| 3 |  * @brief Definition of the 2D-rendering engine singleton Class | 
|---|
| 4 | */ | 
|---|
| 5 |  | 
|---|
| 6 | #ifndef _RENDER_2D_H | 
|---|
| 7 | #define _RENDER_2D_H | 
|---|
| 8 |  | 
|---|
| 9 | #include "base_object.h" | 
|---|
| 10 |  | 
|---|
| 11 | // FORWARD DEFINITION | 
|---|
| 12 | template <class T> class tList; | 
|---|
| 13 | class Element2D; | 
|---|
| 14 |  | 
|---|
| 15 | //! A default singleton class. | 
|---|
| 16 | class Render2D : public BaseObject { | 
|---|
| 17 |  | 
|---|
| 18 |  public: | 
|---|
| 19 |   virtual ~Render2D(); | 
|---|
| 20 |   /** @returns a Pointer to the only object of this Class */ | 
|---|
| 21 |   inline static Render2D* getInstance() { if (!singletonRef) singletonRef = new Render2D();  return singletonRef; }; | 
|---|
| 22 |  | 
|---|
| 23 |  | 
|---|
| 24 |   void draw() const; | 
|---|
| 25 |  | 
|---|
| 26 |   void registerElement2D(Element2D* element2D); | 
|---|
| 27 |   void unregisterElement2D(Element2D* element2D); | 
|---|
| 28 |  | 
|---|
| 29 |  private: | 
|---|
| 30 |   Render2D(); | 
|---|
| 31 |   static Render2D*               singletonRef;           //!< Reference to this class. | 
|---|
| 32 |  | 
|---|
| 33 |   tList<Element2D>*              element2DList;          //!< List of all valid 2D-elements. | 
|---|
| 34 | }; | 
|---|
| 35 |  | 
|---|
| 36 | #endif /* _RENDER_2D_H */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.