paysages3d/src/system/RandomGenerator.h

35 lines
560 B
C
Raw Normal View History

2013-11-03 14:46:39 +00:00
#ifndef RANDOMGENERATOR_H
#define RANDOMGENERATOR_H
#include "system_global.h"
2013-11-19 11:16:33 +00:00
2013-11-03 14:46:39 +00:00
namespace paysages {
namespace system {
class SYSTEMSHARED_EXPORT RandomGenerator {
public:
typedef unsigned long Seed;
class RandomGeneratorPrivate;
public:
RandomGenerator(Seed seed = 0);
~RandomGenerator();
2013-11-03 14:46:39 +00:00
inline Seed getSeed() const {
return seed;
2013-11-03 14:46:39 +00:00
}
/**
* Generate a 0.0-1.0 random double value.
*/
double genDouble();
private:
Seed seed;
RandomGeneratorPrivate *data;
2013-11-03 14:46:39 +00:00
};
}
}
#endif // RANDOMGENERATOR_H