Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/current_cd/src/lib/graphics/effects/graphics_effect.cc @ 6911

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

orxonox/trunk: Emitter is emitting correctly

File size: 1.6 KB
Line 
1
2
3/*
4   orxonox - the future of 3D-vertical-scrollers
5
6   Copyright (C) 2004 orx
7
8   This program is free software; you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation; either version 2, or (at your option)
11   any later version.
12
13### File Specific:
14   main-programmer: Patrick Boenzli
15*/
16
17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS
18
19
20#include "graphics_effect.h"
21
22#include "graphics_engine.h"
23#include "load_param.h"
24
25
26using namespace std;
27
28
29
30/**
31 * @param root The XML-element to load the GraphicsEffect from
32
33  @todo what to do, if no GraphicsEffect-Slots are open anymore ???
34 */
35GraphicsEffect::GraphicsEffect(const TiXmlElement* root)
36{
37  this->bActivated = false;
38
39  this->bActivated = GraphicsEngine::getInstance()->loadGraphicsEffect(this);
40
41  if (root != NULL)
42    this->loadParams(root);
43}
44
45
46/**
47 *  destroys a GraphicsEffect
48 */
49GraphicsEffect::~GraphicsEffect()
50{
51  if( this->bActivated)
52    GraphicsEngine::getInstance()->unloadGraphicsEffect(this);
53}
54
55
56/**
57 * @param root The XML-element to load the GraphicsEffect from
58 */
59void GraphicsEffect::loadParams(const TiXmlElement* root)
60{
61  BaseObject::loadParams(root);
62
63//   LoadParam(root, "diffuse-color", this, GraphicsEffect, setDiffuseColor)
64//       .describe("sets the diffuse color of the GraphicsEffect (red [0-1], green [0-1], blue [0-1])");
65
66}
67
68
69/**
70 *  initializes the graphics effect
71 */
72bool GraphicsEffect::init()
73{}
74
75
76
77/**
78 * draws the effect, if needed
79 */
80void GraphicsEffect::draw() const
81{}
82
83
84
85/**
86 * ticks the effect if there is any time dependancy
87 */
88void GraphicsEffect::tick(float dt)
89{}
Note: See TracBrowser for help on using the repository browser.