diff options
| author | Bryan Galdrikian <[email protected]> | 2017-02-21 12:07:59 -0800 |
|---|---|---|
| committer | Bryan Galdrikian <[email protected]> | 2017-02-21 12:07:59 -0800 |
| commit | 446ce137c6823ba9eff273bdafdaf266287c7c98 (patch) | |
| tree | d20aab3e2ed08d7b3ca71c2f40db6a93ea00c459 /NvBlast/tools/AuthoringTool/src/SimpleRandomGenerator.h | |
| download | blast-1.0.0-beta.tar.xz blast-1.0.0-beta.zip | |
first commitv1.0.0-beta
Diffstat (limited to 'NvBlast/tools/AuthoringTool/src/SimpleRandomGenerator.h')
| -rw-r--r-- | NvBlast/tools/AuthoringTool/src/SimpleRandomGenerator.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/NvBlast/tools/AuthoringTool/src/SimpleRandomGenerator.h b/NvBlast/tools/AuthoringTool/src/SimpleRandomGenerator.h new file mode 100644 index 0000000..63e2d45 --- /dev/null +++ b/NvBlast/tools/AuthoringTool/src/SimpleRandomGenerator.h @@ -0,0 +1,27 @@ +#pragma once +#include "NvBlastExtAuthoringTypes.h" + + +class SimpleRandomGenerator : public Nv::Blast::RandomGeneratorBase +{ +public: + SimpleRandomGenerator() { + remember = false; + }; + + virtual float getRandomValue() + { + float r = (float)rand(); + r = r / RAND_MAX; + return r; + } + virtual void seed(int32_t seed) + { + srand(seed); + } + + virtual ~SimpleRandomGenerator() {}; + +private: + bool remember; +};
\ No newline at end of file |