Index: branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.cc
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.cc	(revision 7647)
+++ branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.cc	(revision 7649)
@@ -24,8 +24,10 @@
 #include "sprite_particles.h"
 #include "plane_emitter.h"
+#include "shell_command.h"
 
 #include "parser/tinyxml/tinyxml.h"
 
-//SHELL_COMMAND(activate, SnowEffect, activateSnow);
+SHELL_COMMAND(activate, SnowEffect, activateSnow);
+SHELL_COMMAND(deactivate, SnowEffect, deactivateSnow);
 
 using namespace std;
@@ -37,9 +39,9 @@
   this->setClassID(CL_SNOW_EFFECT, "SnowEffect");
 
+  this->init();
+  
   if (root != NULL)
     this->loadParams(root);
 
-  this->init();
-
   this->activate();
 }
@@ -57,9 +59,14 @@
   WeatherEffect::loadParams(root);
 
-//   LoadParam(root, "snow-mode", this, SnowEffect, setSnowMode);
-//   LoadParam(root, "snow-density", this, SnowEffect, setSnowDensity);
-//   LoadParam(root, "snow-color", this, SnowEffect, setSnowColor);
-
-
+   LoadParam(root, "numParticles", this, SnowEffect, numParticles);
+   LoadParam(root, "materialTexture", this, SnowEffect, materialTexture);
+   LoadParam(root, "lifeSpans", this, SnowEffect, lifeSpan);
+   LoadParam(root, "radius", this, SnowEffect, radius);
+   LoadParam(root, "mass", this, SnowEffect, mass);
+   LoadParam(root, "emissionRate", this, SnowEffect, emissionRate);
+   LoadParam(root, "emissionVelocity", this, SnowEffect, emissionVelocity);
+   LoadParam(root, "spread", this, SnowEffect, spread);
+   LoadParam(root, "size", this, SnowEffect, size);
+   LoadParam(root, "coord", this, SnowEffect, coord);
 }
 
@@ -67,4 +74,21 @@
 {
   this->emitter = new PlaneEmitter();
+  
+  // Default values
+  particles = 10000;
+  texture = "maps/snow_flake_01_32x32.png";
+  life = 8;
+  randomLife = 2;
+  snowRadius = 3.5;
+  randomRadius = 1;
+  snowMass = 1.0;
+  randomMass = 0.3;
+  rate = 900;
+  velocity = -200;
+  randomVelocity = 0;
+  angle = 0;
+  randomAngle = 0.3;
+  snowSize = Vector2D(1200, 1200);
+  snowCoord = Vector(100, 600, 200);
 }
 
@@ -75,13 +99,12 @@
   PRINTF(0)("Activating SnowEffect\n");
   
-  SnowEffect::snowParticles = new SpriteParticles(10000);
+  SnowEffect::snowParticles = new SpriteParticles(particles);
   SnowEffect::snowParticles->setName("SnowEffectTrailParticles");
-  SnowEffect::snowParticles->setMaterialTexture("maps/snow_flake_01_32x32.png");
-  //SnowEffect::snowParticles->setSize(1);
-  SnowEffect::snowParticles->setLifeSpan(8, 2);
-  SnowEffect::snowParticles->setRadius(0.0, 5.0, 10.0);
-  SnowEffect::snowParticles->setRadius(0.2, 5.0, 10);
-  SnowEffect::snowParticles->setRadius(1.0, 5.0, 10);
-  SnowEffect::snowParticles->setMass(0, 1.0, .3);
+  SnowEffect::snowParticles->setMaterialTexture(texture);
+  SnowEffect::snowParticles->setLifeSpan(life, randomLife);
+  SnowEffect::snowParticles->setRadius(0.0, snowRadius, randomRadius);
+  SnowEffect::snowParticles->setRadius(0.2, snowRadius, randomRadius);
+  SnowEffect::snowParticles->setRadius(1.0, snowRadius, randomRadius);
+  SnowEffect::snowParticles->setMass(0, snowMass, randomMass);
   SnowEffect::snowParticles->setColor(0,1, 1, 1,.5);
   SnowEffect::snowParticles->setColor(.5, .6, .6, .6, .2);
@@ -92,8 +115,9 @@
   
  // this->updateNode(0);
-  this->emitter->setEmissionRate(900);
-  this->emitter->setEmissionVelocity(150, 50);
-  this->emitter->setSpread(0, .3);
-  this->emitter->setSize(1200, 1200);
+  this->emitter->setRelCoor(snowCoord);
+  this->emitter->setEmissionRate(rate);
+  this->emitter->setEmissionVelocity(velocity, randomVelocity);
+  this->emitter->setSpread(angle, randomAngle);
+  this->emitter->setSize(snowSize);
 }
 
@@ -106,4 +130,14 @@
 }
 
+void SnowEffect::activateSnow()
+{
+  this->activate();
+}
+
+void SnowEffect::deactivateSnow()
+{
+  this->deactivate();
+}
+
 void SnowEffect::draw() const
 {
@@ -113,2 +147,57 @@
 {
 }
+
+void SnowEffect::numParticles(int n)
+{
+  this->particles = n;
+}
+
+void SnowEffect::materialTexture(const std::string& texture)
+{
+  this->texture = texture;
+}
+
+void SnowEffect::lifeSpan(float lifeSpan, float randomLifeSpan)
+{
+  this->life = lifeSpan;
+  this->randomLife = randomLifeSpan;
+}
+
+void SnowEffect::radius(float radius, float randomRadius)
+{
+  this->snowRadius = radius;
+  this->randomRadius = randomRadius;
+}
+
+void SnowEffect::mass(float mass, float randomMass)
+{
+  this->snowMass = mass;
+  this->randomMass = randomMass;
+}
+
+void SnowEffect::emissionRate(float emissionRate)
+{
+  this->rate = emissionRate;
+}
+
+void SnowEffect::emissionVelocity(float velocity, float randomVelocity)
+{
+  this->velocity = velocity;
+  this->randomVelocity = randomVelocity;
+}
+
+void SnowEffect::spread(float angle, float randomAngle)
+{
+  this->angle = angle;
+  this->randomAngle = randomAngle;
+}
+
+void SnowEffect::size(float sizeX, float sizeY)
+{
+  this->snowSize = Vector2D(sizeX, sizeY);
+}
+
+void SnowEffect::coord( float coorX, float coorY, float coorZ)
+{
+  this->snowCoord = Vector(coorX, coorY, coorZ);
+}
Index: branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.h
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.h	(revision 7647)
+++ branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.h	(revision 7649)
@@ -31,17 +31,31 @@
     virtual void draw() const;
     virtual void tick(float dt);
+
+    void activateSnow();
+    void deactivateSnow();
     
-    void activateSnow();
+  private:
+    void numParticles(int n);
+    void materialTexture(const std::string& texture);
+    void lifeSpan(float lifeSpan, float randomLifeSpan);
+    void radius(float radius, float randomRadius);
+    void mass(float mass, float randomMass);
+    void emissionRate(float emissionRate);
+    void emissionVelocity(float velocity, float randomVelocity);
+    void spread(float angle, float randomAngle);
+    void size(float sizeX, float sizeY);
+    void coord(float xCoor, float yCoor, float zCoor);
+    
+    int particles;
+    std::string texture;
+    float life, randomLife;
+    float snowRadius, randomRadius;
+    float snowMass, randomMass;
+    float rate;
+    float velocity, randomVelocity;
+    float angle, randomAngle;
+    Vector snowCoord;
+    Vector2D snowSize;
 
-//     inline void setSnowMode(const std::string& mode) { this->snowMode = this->stringToSnowMode(mode); }
-//     inline void setSnowDensity(float density) { this->snowDensity = density; }
-//     inline void setSnowRange(float start, float end) { this->snowStart = start; this->snowEnd = end; }
-//     inline void setSnowColor(float r, float g, float b) { this->colorVector = Vector(r, g, b); }
-  private:
-//     GLint                    snowMode;
-//     GLfloat                 snowDensity;
-//     GLfloat                 snowStart;
-//     GLfloat                 snowEnd;
-//     Vector                  colorVector;
     static SpriteParticles* snowParticles;
     
