source:
orxonox.OLD/branches/new_class_id/src/lib/graphics/render2D/render_2d.h
@
9715
Last change on this file since 9715 was 9715, checked in by bensch, 18 years ago | |
---|---|
File size: 976 bytes |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
[4839] | 2 | * @file render_2d.h |
3 | * @brief Definition of the 2D-rendering engine singleton Class | |
[5420] | 4 | */ |
[3655] | 5 | |
[4839] | 6 | #ifndef _RENDER_2D_H |
7 | #define _RENDER_2D_H | |
[3655] | 8 | |
9 | #include "base_object.h" | |
[4848] | 10 | #include "element_2d.h" |
[5405] | 11 | // FORWARD DECLARATION |
[3655] | 12 | |
13 | //! A default singleton class. | |
[9685] | 14 | class Render2D : public BaseObject |
15 | { | |
[9715] | 16 | ObjectListDeclaration(Render2D); |
[9685] | 17 | |
[5397] | 18 | friend class Element2D; |
[3655] | 19 | |
[9685] | 20 | public: |
21 | virtual ~Render2D(); | |
22 | /** @returns a Pointer to the only object of this Class */ | |
23 | inline static Render2D* getInstance() { if (!singletonRef) singletonRef = new Render2D(); return singletonRef; }; | |
[3655] | 24 | |
[9685] | 25 | void toggleNodesVisibility() { this->showNodes = !this->showNodes; }; |
[5417] | 26 | |
[9685] | 27 | void update(float dt); |
28 | void tick(float dt); | |
29 | void draw(E2D_LAYER from, E2D_LAYER to) const; | |
[4840] | 30 | |
[9685] | 31 | private: |
32 | Render2D(); | |
33 | static Render2D* singletonRef; //!< Reference to this class. | |
[5397] | 34 | |
[9685] | 35 | bool showNodes; //!< If the debug-Nodes should be visible |
36 | }; | |
[3655] | 37 | |
[4839] | 38 | #endif /* _RENDER_2D_H */ |
Note: See TracBrowser
for help on using the repository browser.