Main Page | Class List | Directories | File List | Class Members | File Members

puff.h

Go to the documentation of this file.
00001 /*
00002  * Physically Based Simulation, SS 2005
00003  *
00004  * Markus Liechti (liechtim@student.ethz.ch)
00005  * Yoshimi Takano (yoshi@student.ethz.ch)
00006  * Stefan Wismer (swismer@student.ethz.ch)
00007  *
00008  * $Id: puff.h,v 1.6 2005/06/26 18:40:25 ytakano Exp $
00009  */
00010 
00013 #ifndef __puff_H__
00014 #define __puff_H__
00015 
00016 #include <list>
00017 #include "opengl.h"
00018 #include "particle.h"
00019 
00021 #define PUFF_PARTICLES_PER_LENGTH_UNIT 10
00022 
00024 #define PUFF_DAMPING 0.02
00025 
00027 #define PUFF_MASS_MEAN 0.01
00028 
00030 #define PUFF_MASS_STD 0.001
00031 
00033 #define PUFF_POS_STD 0.1
00034 
00036 #define PUFF_VEL_MEAN_X 0.0
00037 
00039 #define PUFF_VEL_MEAN_Y 2.0
00040 
00042 #define PUFF_VEL_STD 0.1
00043 
00045 #define PUFF_LIEFTIME_MEAN 0.5
00046 
00048 #define PUFF_LIEFTIME_STD 0.1
00049 
00051 #define PUFF_FORCE_MEAN_X 0.0
00052 
00054 #define PUFF_FORCE_MEAN_Y -0.2
00055 
00057 #define PUFF_FORCE_STD 0.001
00058 
00059 using namespace std;
00060 
00064 class Puff {
00065 private:
00066         list<Particle> particles;
00067         void setExternalForces();
00068         
00069 public:
00073         void clear();
00074 
00081         void createPuff(vector2 &start, vector2 &end);
00082 
00087         void doPhysics(component timestep);
00088 
00092         void draw();
00093 };
00094 
00095 #endif

Generated on Sun Jul 10 22:32:04 2005 for S12 by  doxygen 1.4.2