aboutsummaryrefslogtreecommitdiff
path: root/tools/AuthoringTool/src/SimpleRandomGenerator.h
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2017-02-24 09:32:20 -0800
committerBryan Galdrikian <[email protected]>2017-02-24 09:32:20 -0800
commite1bf674c16e3c8472b29574159c789cd3f0c64e0 (patch)
tree9f0cfce09c71a2c27ff19589fcad6cd83504477c /tools/AuthoringTool/src/SimpleRandomGenerator.h
parentfirst commit (diff)
downloadblast-e1bf674c16e3c8472b29574159c789cd3f0c64e0.tar.xz
blast-e1bf674c16e3c8472b29574159c789cd3f0c64e0.zip
Updating to [email protected] and [email protected] with a new directory structure.
NvBlast folder is gone, files have been moved to top level directory. README is changed to reflect this.
Diffstat (limited to 'tools/AuthoringTool/src/SimpleRandomGenerator.h')
-rw-r--r--tools/AuthoringTool/src/SimpleRandomGenerator.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/AuthoringTool/src/SimpleRandomGenerator.h b/tools/AuthoringTool/src/SimpleRandomGenerator.h
new file mode 100644
index 0000000..63e2d45
--- /dev/null
+++ b/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