Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/atmospheric_engine/src/lib/graphics/effects/atmospheric_engine.cc @ 7381

Last change on this file since 7381 was 7381, checked in by hdavid, 18 years ago

branches/atmospheric_engine: renamed classes to WeatherEffect and SunEffect

File size: 2.2 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: Andreas Maechler, David Hasenfratz
13   co-programmer: ...
14*/
15
16#include "atmospheric_engine.h"
17
18#include "util/loading/resource_manager.h"
19
20#include "effects/fog_effect.h"
21
22#include "util/loading/load_param.h"
23#include "util/loading/factory.h"
24#include "class_list.h"
25
26
27using namespace std;
28
29
30
31/**
32 * @param root The XML-element to load the AtmosphericEngine from
33 */
34AtmosphericEngine::AtmosphericEngine()
35{
36  //this->setClassID(CL_ATMOSPHERIC_ENGINE, "AtmosphericEngine");
37  this->bActivated = false;
38}
39
40/**
41 *  The Pointer to this AtmosphericEngine
42*/
43AtmosphericEngine* AtmosphericEngine::singletonRef = NULL;
44
45
46/**
47 *  destroys a AtmosphericEngine
48 */
49AtmosphericEngine::~AtmosphericEngine()
50{
51  AtmosphericEngine::singletonRef = NULL;
52}
53
54
55/**
56 * @param root The XML-element to load the AtmosphericEngine from
57 */
58void AtmosphericEngine::loadParams(const TiXmlElement* root)
59{
60  LoadParamXML(root, "WeatherEffect", this, AtmosphericEngine, loadWeatherEffect);
61  LoadParamXML(root, "SunEffect", this, AtmosphericEngine, loadSunEffect);
62}
63
64/**
65 * @param root The XML-element to load WeatherEffects from
66 */
67void AtmosphericEngine::loadWeatherEffect(const TiXmlElement* root)
68{
69  LOAD_PARAM_START_CYCLE(root, element);
70  {
71    PRINTF(4)("element is: %s\n", element->Value());
72    Factory::fabricate(element);
73  }
74  LOAD_PARAM_END_CYCLE(element);
75}
76
77/**
78 * @param root The XML-element to load SunEffects from
79 */
80void AtmosphericEngine::loadSunEffect(const TiXmlElement* root)
81{
82  LOAD_PARAM_START_CYCLE(root, element);
83  {
84    PRINTF(4)("element is: %s\n", element->Value());
85    Factory::fabricate(element);
86  }
87  LOAD_PARAM_END_CYCLE(element);
88}
89
90
91/**
92 *  initializes the graphics effect
93 */
94bool AtmosphericEngine::init()
95{}
96
97
98
99/**
100 * draws the effect, if needed
101 */
102void AtmosphericEngine::draw() const
103{}
104
105
106
107/**
108 * ticks the effect if there is any time dependancy
109 */
110void AtmosphericEngine::tick(float dt)
111{}
Note: See TracBrowser for help on using the repository browser.