Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/graphics/render2D/render_2d.cc @ 4840

Last change on this file since 4840 was 4840, checked in by bensch, 19 years ago

orxonox/trunk: more definitions for element2D

File size: 1.4 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: ...
13   co-programmer: ...
14*/
15
16//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
17
18#include "render_2d.h"
19
20#include "graphics_engine.h"
21#include "class_list.h"
22#include "list.h"
23#include "element_2d.h"
24
25using namespace std;
26
27
28
29/**
30 * standard constructor
31 */
32Render2D::Render2D ()
33{
34   this->setClassID(CL_RENDER_2D, "Render2D");
35   this->setName("Render2D");
36
37   this->element2DList = new tList<Element2D>();
38}
39
40/**
41 *  the singleton reference to this class
42 */
43Render2D* Render2D::singletonRef = NULL;
44
45/**
46 * standard deconstructor
47 */
48Render2D::~Render2D ()
49{
50  delete this->element2DList;
51
52  Render2D::singletonRef = NULL;
53}
54
55
56/**
57 * registers a 2D-element to the 2D-Renderer
58 * @param element2D the element to registers
59 */
60void Render2D::registerElement2D(Element2D* element2D)
61{
62  this->element2DList->add(element2D);
63}
64
65/**
66 * unregisters a 2D-element from the 2D-Renderer
67 * @param element2D The element to unregister
68 */
69void Render2D::unregisterElement2D(Element2D* element2D)
70{
71  this->element2DList->remove(element2D);
72}
Note: See TracBrowser for help on using the repository browser.