Index: branches/atmospheric_engine/src/defs/class_id.h
===================================================================
--- branches/atmospheric_engine/src/defs/class_id.h	(revision 7503)
+++ branches/atmospheric_engine/src/defs/class_id.h	(revision 7504)
@@ -284,4 +284,5 @@
   CL_WEATHER_EFFECT             =    0x00a04000,
   CL_FOG_EFFECT                 =    0x00000a10,
+  CL_VOLFOG_EFFECT              =    0x00000a11,
   CL_LENSE_FLARE                =    0x00000a12,
   CL_EXPLOSION                  =    0x00000a20,
Index: branches/atmospheric_engine/src/lib/graphics/Makefile.am
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/Makefile.am	(revision 7503)
+++ branches/atmospheric_engine/src/lib/graphics/Makefile.am	(revision 7504)
@@ -21,4 +21,5 @@
 			   effects/sun_effect.cc \
 			   effects/fog_effect.cc \
+			   effects/volfog_effect.cc \
 			   effects/lense_flare.cc
 
@@ -42,4 +43,5 @@
 		 effects/sun_effect.h \
 		 effects/fog_effect.h \
+		 effects/volfog_effect.h \
 		 effects/lense_flare.h
 
Index: branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc	(revision 7504)
+++ branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc	(revision 7504)
@@ -0,0 +1,115 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: hdavid, amaechler
+*/
+
+#include "volfog_effect.h"
+
+#include "util/loading/load_param.h"
+#include "util/loading/factory.h"
+
+#include "glincl.h"
+
+#include "shell_command.h"
+/*SHELL_COMMAND(activateVolFog, VolFogEffect, VolFogEffect::activate)
+  ->setAlias("aVolFog");
+SHELL_COMMAND(deactivateVolFog, VolFogEffect, VolFogEffect::deactivate)
+  ->setAlias("dVolFog");*/
+
+using namespace std;
+
+CREATE_FACTORY(VolFogEffect, CL_VOLFOG_EFFECT);
+
+VolFogEffect::VolFogEffect(const TiXmlElement* root)
+{
+  this->setClassID(CL_VOLFOG_EFFECT, "VolFogEffect");
+
+  this->volfogMode = GL_LINEAR;
+  this->volfogDensity = 0.001f;
+  this->volfogStart = 10.0f;
+  this->volfogEnd = 1000.0f;
+
+  if (root != NULL)
+    this->loadParams(root);
+
+  this->activate();
+}
+
+
+
+VolFogEffect::~VolFogEffect()
+{
+  this->deactivate();
+}
+
+
+void VolFogEffect::loadParams(const TiXmlElement* root)
+{
+  WeatherEffect::loadParams(root);
+
+  LoadParam(root, "volfog-mode", this, VolFogEffect, setVolFogMode);
+  LoadParam(root, "volfog-density", this, VolFogEffect, setVolFogDensity);
+  LoadParam(root, "volfog-color", this, VolFogEffect, setVolFogColor);
+
+
+}
+
+bool VolFogEffect::init()
+{}
+
+
+
+bool VolFogEffect::activate()
+{
+  PRINTF(0)( "Enabling VolFog Effect, mode: %i, density: %f, start: %f, end: %f, color %f, %f, %f\n", this->volfogMode, this->volfogDensity,
+             this->volfogStart, this->volfogEnd, this->colorVector.x, this->colorVector.y, this->colorVector.z);
+
+  glEnable(GL_FOG);
+  {
+    //GLfloat volfogColor[4] = {0.7, 0.6, 0.6, 1.0};
+    GLfloat volfogColor[4] = { colorVector.x, colorVector.y, colorVector.z, 1.0};
+
+    glFogi(GL_FOG_MODE, this->volfogMode);
+    glFogfv(GL_FOG_COLOR, volfogColor);
+    glFogf(GL_FOG_DENSITY, this->volfogDensity);
+    glHint(GL_FOG_HINT, GL_DONT_CARE);
+    glFogf(GL_FOG_START, this->volfogStart);
+    glFogf(GL_FOG_END, this->volfogEnd);
+
+    //glVolFogi(GL_VOLFOG_COORDINATE_SOURCE, GL_VOLFOG_COORDINATE);
+  }
+  glClearColor(0.5, 0.5, 0.5, 1.0);
+}
+
+
+
+bool VolFogEffect::deactivate()
+{
+  PRINTF(0)("Deactivating VolFog Effect");
+	glDisable(GL_FOG);
+}
+
+
+
+GLint VolFogEffect::stringToVolFogMode(const std::string& mode)
+{
+  if(mode == "GL_LINEAR")
+    return GL_LINEAR;
+  else if(mode == "GL_EXP")
+    return GL_EXP;
+  else if(mode == "GL_EXP2" )
+    return GL_EXP2;
+  else
+    return -1;
+}
+
+
Index: branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc~
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc~	(revision 7504)
+++ branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc~	(revision 7504)
@@ -0,0 +1,115 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: hdavid, amaechler
+*/
+
+#include "volfog_effect.h"
+
+#include "util/loading/load_param.h"
+#include "util/loading/factory.h"
+
+#include "glincl.h"
+
+#include "shell_command.h"
+/*SHELL_COMMAND(activateVolFog, VolFogEffect, VolFogEffect::activate)
+  ->setAlias("aVolFog");
+SHELL_COMMAND(deactivateVolFog, VolFogEffect, VolFogEffect::deactivate)
+  ->setAlias("dVolFog");*/
+
+using namespace std;
+
+CREATE_FACTORY(VolFogEffect, CL_VOLFOG_EFFECT);
+
+VolFogEffect::VolFogEffect(const TiXmlElement* root)
+{
+  this->setClassID(CL_VOLFOG_EFFECT, "VolFogEffect");
+
+  this->volfogMode = GL_LINEAR;
+  this->volfogDensity = 0.001f;
+  this->volfogStart = 10.0f;
+  this->volfogEnd = 1000.0f;
+
+  if (root != NULL)
+    this->loadParams(root);
+
+  this->activate();
+}
+
+
+
+VolFogEffect::~VolFogEffect()
+{
+  this->deactivate();
+}
+
+
+void VolFogEffect::loadParams(const TiXmlElement* root)
+{
+  WeatherEffect::loadParams(root);
+
+  LoadParam(root, "volfog-mode", this, VolFogEffect, setVolFogMode);
+  LoadParam(root, "volfog-density", this, VolFogEffect, setVolFogDensity);
+  LoadParam(root, "volfog-color", this, VolFogEffect, setVolFogColor);
+
+
+}
+
+bool VolFogEffect::init()
+{}
+
+
+
+bool VolFogEffect::activate()
+{
+  PRINTF(0)( "Enabling VolFog Effect, mode: %i, density: %f, start: %f, end: %f, color %f, %f, %f\n", this->volfogMode, this->volfogDensity,
+             this->volfogStart, this->volfogEnd, this->colorVector.x, this->colorVector.y, this->colorVector.z);
+
+  glEnable(GL_FOG);
+  {
+    //GLfloat volfogColor[4] = {0.7, 0.6, 0.6, 1.0};
+    GLfloat volfogColor[4] = { colorVector.x, colorVector.y, colorVector.z, 1.0};
+
+    glVolFogi(GL_FOG_MODE, this->volfogMode);
+    glVolFogfv(GL_FOG_COLOR, volfogColor);
+    glVolFogf(GL_FOG_DENSITY, this->volfogDensity);
+    glHint(GL_FOG_HINT, GL_DONT_CARE);
+    glVolFogf(GL_FOG_START, this->volfogStart);
+    glVolFogf(GL_FOG_END, this->volfogEnd);
+
+    //glVolFogi(GL_VOLFOG_COORDINATE_SOURCE, GL_VOLFOG_COORDINATE);
+  }
+  glClearColor(0.5, 0.5, 0.5, 1.0);
+}
+
+
+
+bool VolFogEffect::deactivate()
+{
+  PRINTF(0)("Deactivating VolFog Effect");
+	glDisable(GL_FOG);
+}
+
+
+
+GLint VolFogEffect::stringToVolFogMode(const std::string& mode)
+{
+  if(mode == "GL_LINEAR")
+    return GL_LINEAR;
+  else if(mode == "GL_EXP")
+    return GL_EXP;
+  else if(mode == "GL_EXP2" )
+    return GL_EXP2;
+  else
+    return -1;
+}
+
+
Index: branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.h
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.h	(revision 7504)
+++ branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.h	(revision 7504)
@@ -0,0 +1,44 @@
+/**
+ * @file volfog_effect.h
+ */
+
+#ifndef _VOLFOG_EFFECT
+#define _VOLFOG_EFFECT
+
+#include "vector.h"
+
+#include "weather_effect.h"
+
+class VolFogEffect : public WeatherEffect
+{
+  public:
+    VolFogEffect(const TiXmlElement* root = NULL);
+    virtual ~VolFogEffect();
+
+    virtual void loadParams(const TiXmlElement* root);
+
+    virtual bool init();
+
+    virtual bool activate();
+    virtual bool deactivate();
+
+    inline void setVolFogMode(const std::string& mode) { this->volfogMode = this->stringToVolFogMode(mode); }
+    inline void setVolFogDensity(float density) { this->volfogDensity = density; }
+    inline void setVolFogRange(float start, float end) { this->volfogStart = start; this->volfogEnd = end; }
+    inline void setVolFogColor(float r, float g, float b) { this->colorVector = Vector(r, g, b); }
+
+
+  private:
+    GLint stringToVolFogMode(const std::string& mode);
+
+
+  private:
+    GLint                   volfogMode;
+    GLfloat                 volfogDensity;
+    GLfloat                 volfogStart;
+    GLfloat                 fogEnd;
+    Vector                  colorVector;
+};
+
+
+#endif  /* _VOLFOG_EFFECT */
Index: branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.h~
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.h~	(revision 7504)
+++ branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.h~	(revision 7504)
@@ -0,0 +1,44 @@
+/**
+ * @file fog_effect.h
+ */
+
+#ifndef _FOG_EFFECT
+#define _FOG_EFFECT
+
+#include "vector.h"
+
+#include "weather_effect.h"
+
+class FogEffect : public WeatherEffect
+{
+  public:
+    FogEffect(const TiXmlElement* root = NULL);
+    virtual ~FogEffect();
+
+    virtual void loadParams(const TiXmlElement* root);
+
+    virtual bool init();
+
+    virtual bool activate();
+    virtual bool deactivate();
+
+    inline void setFogMode(const std::string& mode) { this->fogMode = this->stringToFogMode(mode); }
+    inline void setFogDensity(float density) { this->fogDensity = density; }
+    inline void setFogRange(float start, float end) { this->fogStart = start; this->fogEnd = end; }
+    inline void setFogColor(float r, float g, float b) { this->colorVector = Vector(r, g, b); }
+
+
+  private:
+    GLint stringToFogMode(const std::string& mode);
+
+
+  private:
+    GLint                   fogMode;
+    GLfloat                 fogDensity;
+    GLfloat                 fogStart;
+    GLfloat                 fogEnd;
+    Vector                  colorVector;
+};
+
+
+#endif  /* _FOG_EFFECT */
