00001
00002
00003
00004
00005
00006 #ifndef FOG_H
00007 #define FOG_H
00008
00009 #include<DynamicObject.h>
00010 #include<ObjectFile.h>
00011 #include<Color4.h>
00012
00013 #include<real.h>
00014
00017 class Fog : public DynamicObject
00018 {
00019 DYNAMIC_OBJECT;
00020 public:
00021 typedef enum Type {
00022 Linear,
00023 Exp,
00024 Exp2,
00025 };
00026 Fog();
00027
00028 real getEnd() { return end; }
00029 void apply(Color4 &c, real z);
00030 real fogValue(real z);
00031
00032
00033 void parseSymbol(Token &t, ObjectFile &file);
00034 void writeParams(ostream &stream);
00035
00036 protected:
00037 static const real End= 1.0e5;
00038
00039
00040 void createSymbols();
00041
00042 Color4 color;
00043 real start;
00044 real end;
00045 real density;
00046 Type type;
00047
00048 private:
00049 typedef DynamicObject super;
00050 };
00051 #endif