Changeset 4839 in orxonox.OLD for orxonox/trunk/src/lib/graphics
- Timestamp:
- Jul 12, 2005, 1:54:38 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/graphics/render2D
- Files:
-
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/render2D/element_2d.cc
r4838 r4839 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 17 17 18 #include "element_2 D.h"18 #include "element_2d.h" 19 19 20 20 using namespace std; … … 29 29 this->setClassID(CL_ELEMENT_2D, "Element2D"); 30 30 31 /* If you make a new class, what is most probably the case when you write this file32 don't forget to:33 1. Add the new file new_class.cc to the ./src/Makefile.am34 2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS35 36 Advanced Topics:37 - if you want to let your object be managed via the ObjectManager make sure to read38 the object_manager.h header comments. You will use this most certanly only if you39 make many objects of your class, like a weapon bullet.40 */41 31 } 42 43 32 44 33 /** -
orxonox/trunk/src/lib/graphics/render2D/element_2d.h
r4838 r4839 1 1 /*! 2 * @file element_2 D.h2 * @file element_2d.h 3 3 * @brief Definition of the 2D elements rendered on top through the GraphicsEngine 4 4 */ … … 11 11 // FORWARD DECLARATION 12 12 13 //!< An enumerator defining the Depth of a 2D-element. 14 typedef enum 15 { 16 E2D_TOP, //!< Will be rendered on top of everything else 17 E2D_MEDIUM, //!< Will be rendered on the medium Layer. 18 E2D_BOTTOM, //!< Will be rendered on the bottom Layer 19 E2D_BELOW_ALL //!< Will be rendered below the 3D-scene. @todo make this work. 20 }E2DDepth; 21 13 22 //! A class for ... 14 23 class Element2D : public BaseObject { … … 20 29 21 30 private: 31 bool bDraw; 32 int position2D[2]; //!< X-coord, Y-Coord 33 E2DDepth depth; 22 34 23 35 }; 24 36 37 25 38 #endif /* _ELEMENT_2D_H */ -
orxonox/trunk/src/lib/graphics/render2D/render_2d.cc
r4838 r4839 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 17 17 18 #include " proto_singleton.h"18 #include "render_2d.h" 19 19 20 20 using namespace std; 21 21 22 22 23 … … 24 25 * standard constructor 25 26 */ 26 ProtoSingleton::ProtoSingleton()27 Render2D::Render2D () 27 28 { 28 this->setClass Name("ProtoSingleton");29 this->set ClassID(CL_PROTO_ID, "ProtoSingleton");29 this->setClassID(CL_RENDER_2D, "Render2D"); 30 this->setName("Render2D"); 30 31 31 /* If you make a new class, what is most probably the case when you write this file32 don't forget to:33 1. Add the new file new_class.cc to the ./src/Makefile.am34 2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS35 36 Advanced Topics:37 - if you want to let your object be managed via the ObjectManager make sure to read38 the object_manager.h header comments. You will use this most certanly only if you39 make many objects of your class, like a weapon bullet.40 */41 32 } 42 33 … … 44 35 * the singleton reference to this class 45 36 */ 46 ProtoSingleton* ProtoSingleton::singletonRef = NULL;37 Render2D* Render2D::singletonRef = NULL; 47 38 48 39 /** 49 40 @brief standard deconstructor 50 41 */ 51 ProtoSingleton::~ProtoSingleton()42 Render2D::~Render2D () 52 43 { 53 ProtoSingleton::singletonRef = NULL;44 Render2D::singletonRef = NULL; 54 45 } -
orxonox/trunk/src/lib/graphics/render2D/render_2d.h
r4838 r4839 1 1 /*! 2 * @file proto_singleton.h3 * @brief Definition of the ...singleton Class2 * @file render_2d.h 3 * @brief Definition of the 2D-rendering engine singleton Class 4 4 */ 5 5 6 #ifndef _ PROTO_SINGLETON_H7 #define _ PROTO_SINGLETON_H6 #ifndef _RENDER_2D_H 7 #define _RENDER_2D_H 8 8 9 9 #include "base_object.h" … … 12 12 13 13 //! A default singleton class. 14 class ProtoSingleton: public BaseObject {14 class Render2D : public BaseObject { 15 15 16 16 public: 17 virtual ~ ProtoSingleton(void);17 virtual ~Render2D(void); 18 18 /** @returns a Pointer to the only object of this Class */ 19 inline static ProtoSingleton* getInstance(void) { if (!singletonRef) singletonRef = new ProtoSingleton(); return singletonRef; };19 inline static Render2D* getInstance(void) { if (!singletonRef) singletonRef = new Render2D(); return singletonRef; }; 20 20 21 21 private: 22 ProtoSingleton(void);23 static ProtoSingleton* singletonRef;22 Render2D(void); 23 static Render2D* singletonRef; 24 24 }; 25 25 26 #endif /* _ PROTO_SINGLETON_H */26 #endif /* _RENDER_2D_H */
Note: See TracChangeset
for help on using the changeset viewer.