00001
00022
00023
00024
00025
00026 #ifndef __SYNFIG_RANDOM_H
00027 #define __SYNFIG_RANDOM_H
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #define POOL_SIZE (256)
00039 class RandomNoise
00040 {
00041 int seed_;
00042 public:
00043
00044 void set_seed(int x);
00045 int get_seed()const { return seed_; }
00046
00047 enum SmoothType
00048 {
00049 SMOOTH_DEFAULT = 0,
00050 SMOOTH_LINEAR = 1,
00051 SMOOTH_COSINE = 2,
00052 SMOOTH_SPLINE = 3,
00053 SMOOTH_CUBIC = 4,
00054 SMOOTH_FAST_SPLINE = 5,
00055 };
00056
00057 float operator()(int subseed,int x,int y=0, int t=0)const;
00058 float operator()(SmoothType smooth,int subseed,float x,float y=0,float t=0,int loop=0)const;
00059 };
00060
00061
00062
00063 #endif