- Timestamp:
- Apr 26, 2006, 3:52:46 PM (19 years ago)
- Location:
- branches/atmospheric_engine/src
- Files:
-
- 6 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/defs/class_id.h
r7256 r7379 286 286 287 287 288 //CL_ATMOSPHERIC_ENGINE = 0x , 289 //CL_SUN_EFFECTS = 0x , 290 //CL_WEATHER_EFFECTS = 0x , 291 288 292 // Particles 289 293 CL_PARTICLE_SYSTEM = 0x00a02000, -
branches/atmospheric_engine/src/lib/graphics/Makefile.am
r7165 r7379 17 17 \ 18 18 effects/graphics_effect.cc \ 19 effects/atmospheric_engine.cc \ 20 effects/weather_effects.cc \ 21 effects/sun_effects.cc \ 19 22 effects/fog_effect.cc \ 20 23 effects/lense_flare.cc … … 35 38 \ 36 39 effects/graphics_effect.h \ 40 effects/atmospheric_engine.h \ 41 effects/weather_effects.h \ 42 effects/sun_effects.h \ 37 43 effects/fog_effect.h \ 38 44 effects/lense_flare.h -
branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.cc
r7221 r7379 1 2 3 1 /* 4 2 orxonox - the future of 3D-vertical-scrollers … … 12 10 13 11 ### File Specific: 14 main-programmer: Patrick Boenzli12 main-programmer: hdavid, amaechler 15 13 */ 16 17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS18 14 19 15 #include "fog_effect.h" … … 31 27 32 28 33 /** 34 * default constructor 35 * @param root The XML-element to load the FogEffect from 36 */ 37 FogEffect::FogEffect(const TiXmlElement* root) 29 FogEffect::FogEffect(const TiXmlElement* root) 38 30 { 39 this->setClassID(CL_FOG_EFFECT, "FogEffect");40 31 //this->setClassID(CL_FOG_EFFECT, "FogEffect"); 32 /* 41 33 this->fogMode = GL_LINEAR; 42 34 this->fogDensity = 0.001f; 43 35 this->fogStart = 10.0f; 44 36 this->fogEnd = 1000.0f; 45 37 */ 46 38 if (root != NULL) 47 39 this->loadParams(root); … … 51 43 52 44 53 /** 54 * destroys a FogEffect 55 */ 45 56 46 FogEffect::~FogEffect() 57 47 { … … 60 50 61 51 62 /**63 * @param root The XML-element to load the FogEffect from64 */65 52 void FogEffect::loadParams(const TiXmlElement* root) 66 53 { 67 GraphicsEffect::loadParams(root);54 WeatherEffects::loadParams(root); 68 55 56 /* 57 LoadParam(root, "fog-mode", this, FogEffect, setFogMode); 69 58 70 LoadParam(root, "fog-mode", this, FogEffect, setFogMode) 71 .describe("sets the the fog mode {GL_LINEAR, GL_EXP, GL_EXP2}"); 59 LoadParam(root, "fog-density", this, FogEffect, setFogDensity); 72 60 73 LoadParam(root, "fog-density", this, FogEffect, setFogDensity) 74 .describe("sets the the fog density of the exponentionl functions"); 61 LoadParam(root, "fog-color", this, FogEffect, setFogColor);*/ 75 62 76 LoadParam(root, " fog-color", this, FogEffect, setFogColor)77 .describe("sets the fog color"); 63 LoadParam(root, "test", this, FogEffect, setTest); 64 78 65 79 66 } 80 67 68 void FogEffect::setTest(int test) 69 { 70 PRINTF(0)("\n\ntest: %i\n\n", test); 71 } 81 72 82 /**83 * initializes the fog effect84 */85 73 bool FogEffect::init() 86 74 {} 87 75 88 76 89 /** 90 * activates the fog effect 91 */ 77 92 78 bool FogEffect::activate() 93 { 79 {/* 94 80 PRINTF(0)( "Enabling Fog Effect, mode: %i, density: %f, start: %f, end: %f, color %f, %f, %f\n", this->fogMode, this->fogDensity, 95 81 this->fogStart, this->fogEnd, this->colorVector.x, this->colorVector.y, this->colorVector.z); … … 109 95 //glFogi(GL_FOG_COORDINATE_SOURCE, GL_FOG_COORDINATE); 110 96 } 111 glClearColor(0.5, 0.5, 0.5, 1.0); 97 glClearColor(0.5, 0.5, 0.5, 1.0);*/ 112 98 } 113 99 114 100 115 /** 116 * deactivates the fog effect 117 */ 101 118 102 bool FogEffect::deactivate() 119 103 { 120 glDisable(GL_FOG);104 //glDisable(GL_FOG); 121 105 } 122 106 123 107 124 /** 125 * converts a gl mode char to a GLint 126 * @param mode the mode character 127 */ 108 /* 128 109 GLint FogEffect::stringToFogMode(const std::string& mode) 129 110 { … … 137 118 return -1; 138 119 } 120 */ 139 121 -
branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.h
r7221 r7379 1 1 /** 2 2 * @file fog_effect.h 3 * atmospheric fog4 3 */ 5 4 … … 7 6 #define _FOG_EFFECT 8 7 9 #include "vector.h" 10 #include "graphics_effect.h" 8 #include "weather_effects.h" 11 9 12 class TiXmlElement; 13 14 //! A class that handles FogEffects. The FogEffectManager operates on this. 15 class FogEffect : public GraphicsEffect 10 class FogEffect : public WeatherEffects 16 11 { 17 12 public: … … 26 21 virtual bool deactivate(); 27 22 28 inline void setFogMode(const std::string& mode) { this->fogMode = this->stringToFogMode(mode); } 23 24 void setTest(int test); 25 26 /*inline void setFogMode(const std::string& mode) { this->fogMode = this->stringToFogMode(mode); } 29 27 inline void setFogDensity(float density) { this->fogDensity = density; } 30 28 inline void setFogRange(float start, float end) { this->fogStart = start; this->fogEnd = end; } 31 29 inline void setFogColor(float r, float g, float b) { this->colorVector = Vector(r, g, b); } 30 */ 31 32 private: 33 //GLint stringToFogMode(const std::string& mode); 32 34 33 35 34 36 private: 35 GLint stringToFogMode(const std::string& mode); 36 37 38 private: 39 GLint fogMode; 37 /* GLint fogMode; 40 38 GLfloat fogDensity; 41 39 GLfloat fogStart; 42 40 GLfloat fogEnd; 43 Vector colorVector; 41 Vector colorVector;*/ 44 42 }; 45 43 46 44 47 #endif /* _FOG_EFFECT */45 #endif /* _FOG_EFFECT */ -
branches/atmospheric_engine/src/story_entities/game_world_data.cc
r7370 r7379 45 45 46 46 #include "graphics_engine.h" 47 #include "effects/atmospheric_engine.h" 47 48 #include "event_handler.h" 48 49 #include "sound_engine.h" … … 322 323 LoadParamXML(root, "LightManager", LightManager::getInstance(), LightManager, loadParams); 323 324 LoadParamXML(root, "GraphicsEngine", GraphicsEngine::getInstance(), GraphicsEngine, loadParams); 325 LoadParamXML(root, "AtmosphericEngine", AtmosphericEngine::getInstance(), AtmosphericEngine, loadParams); 324 326 325 327 LoadParam(root, "Music", this, GameWorldData, setSoundTrack);
Note: See TracChangeset
for help on using the changeset viewer.