Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4839 in orxonox.OLD for orxonox/trunk/src/lib/graphics


Ignore:
Timestamp:
Jul 12, 2005, 1:54:38 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: render2D-class definition

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  
    1616//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
    1717
    18 #include "element_2D.h"
     18#include "element_2d.h"
    1919
    2020using namespace std;
     
    2929   this->setClassID(CL_ELEMENT_2D, "Element2D");
    3030
    31    /* If you make a new class, what is most probably the case when you write this file
    32       don't forget to:
    33        1. Add the new file new_class.cc to the ./src/Makefile.am
    34        2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS
    35 
    36       Advanced Topics:
    37       - if you want to let your object be managed via the ObjectManager make sure to read
    38         the object_manager.h header comments. You will use this most certanly only if you
    39         make many objects of your class, like a weapon bullet.
    40    */
    4131}
    42 
    4332
    4433/**
  • orxonox/trunk/src/lib/graphics/render2D/element_2d.h

    r4838 r4839  
    11/*!
    2  * @file element_2D.h
     2 * @file element_2d.h
    33 * @brief Definition of the 2D elements rendered on top through the GraphicsEngine
    44*/
     
    1111// FORWARD DECLARATION
    1212
     13//!< An enumerator defining the Depth of a 2D-element.
     14typedef 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
    1322//! A class for ...
    1423class Element2D : public BaseObject {
     
    2029
    2130 private:
     31   bool               bDraw;
     32   int                position2D[2];    //!< X-coord, Y-Coord
     33   E2DDepth           depth;
    2234
    2335};
    2436
     37
    2538#endif /* _ELEMENT_2D_H */
  • orxonox/trunk/src/lib/graphics/render2D/render_2d.cc

    r4838 r4839  
    1616//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
    1717
    18 #include "proto_singleton.h"
     18#include "render_2d.h"
    1919
    2020using namespace std;
     21
    2122
    2223
     
    2425 * standard constructor
    2526 */
    26 ProtoSingleton::ProtoSingleton ()
     27Render2D::Render2D ()
    2728{
    28    this->setClassName("ProtoSingleton");
    29    this->setClassID(CL_PROTO_ID, "ProtoSingleton");
     29   this->setClassID(CL_RENDER_2D, "Render2D");
     30   this->setName("Render2D");
    3031
    31    /* If you make a new class, what is most probably the case when you write this file
    32       don't forget to:
    33        1. Add the new file new_class.cc to the ./src/Makefile.am
    34        2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS
    35 
    36       Advanced Topics:
    37       - if you want to let your object be managed via the ObjectManager make sure to read
    38         the object_manager.h header comments. You will use this most certanly only if you
    39         make many objects of your class, like a weapon bullet.
    40    */
    4132}
    4233
     
    4435 *  the singleton reference to this class
    4536 */
    46 ProtoSingleton* ProtoSingleton::singletonRef = NULL;
     37Render2D* Render2D::singletonRef = NULL;
    4738
    4839/**
    4940   @brief standard deconstructor
    5041 */
    51 ProtoSingleton::~ProtoSingleton ()
     42Render2D::~Render2D ()
    5243{
    53   ProtoSingleton::singletonRef = NULL;
     44  Render2D::singletonRef = NULL;
    5445}
  • orxonox/trunk/src/lib/graphics/render2D/render_2d.h

    r4838 r4839  
    11/*!
    2  * @file proto_singleton.h
    3  * @brief Definition of the ... singleton Class
     2 * @file render_2d.h
     3 * @brief Definition of the 2D-rendering engine singleton Class
    44*/
    55
    6 #ifndef _PROTO_SINGLETON_H
    7 #define _PROTO_SINGLETON_H
     6#ifndef _RENDER_2D_H
     7#define _RENDER_2D_H
    88
    99#include "base_object.h"
     
    1212
    1313//! A default singleton class.
    14 class ProtoSingleton : public BaseObject {
     14class Render2D : public BaseObject {
    1515
    1616 public:
    17   virtual ~ProtoSingleton(void);
     17  virtual ~Render2D(void);
    1818  /** @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; };
    2020
    2121 private:
    22   ProtoSingleton(void);
    23   static ProtoSingleton* singletonRef;
     22  Render2D(void);
     23  static Render2D* singletonRef;
    2424};
    2525
    26 #endif /* _PROTO_SINGLETON_H */
     26#endif /* _RENDER_2D_H */
Note: See TracChangeset for help on using the changeset viewer.