Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

SCA_RandomNumberGenerator.h

Go to the documentation of this file.
00001 
00008 
00009 #ifndef __KX_RANDOMNUMBERGENERATOR
00010 #define __KX_RANDOMNUMBERGENERATOR
00011 
00012 
00013 class SCA_RandomNumberGenerator {
00014 
00016         long m_seed;
00017 
00018         /* A bit silly.. The N parameter is a define in the .cpp file */
00020         /* unsigned long mt[N]; */
00021         unsigned long mt[624];
00022 
00024         int mti; /* initialised in the cpp file */
00025 
00027         void SetStartVector(void);
00028  public:
00029         SCA_RandomNumberGenerator(long seed);
00030         ~SCA_RandomNumberGenerator();
00031         unsigned long Draw();
00032         float DrawFloat();
00033         long GetSeed();
00034         void SetSeed(long newseed);
00035 };
00036 
00037 #endif /* __KX_RANDOMNUMBERGENERATOR */

Generated at Thu Feb 1 13:03:11 2001 for Ketsji Game Engine by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000