Triton
Visual simulation library for ocean rendering.
RandomNumberGenerator.h
Go to the documentation of this file.
1// Copyright (c) 2012-2013 Sundog Software LLC. All rights reserved worldwide.
2
3#ifndef TRITON_RANDOM_NUMBER_GENERATOR_H
4#define TRITON_RANDOM_NUMBER_GENERATOR_H
5
9#include "TritonCommon.h"
10
11#pragma pack(push)
12#pragma pack(8)
13
14namespace Triton
15{
21{
22public:
24 virtual ~RandomNumberGenerator() {}
25
31 virtual double TRITONAPI GetRandomDouble(double start, double end) const = 0;
32
38 virtual int TRITONAPI GetRandomInt(int start, int end) const = 0;
39
45 virtual void TRITONAPI SetRandomSeed(unsigned int seed) = 0;
46};
47}
48
49#pragma pack(pop)
50
51#endif
Common typedefs and defines used within Triton.
This base class for all Triton objects intercepts the new and delete operators, routing them through ...
Definition: MemAlloc.h:71
An interface for generating random numbers in Triton.
Definition: RandomNumberGenerator.h:21
virtual double TRITONAPI GetRandomDouble(double start, double end) const =0
Return an evenly distributed random double-precision number within a given range.
virtual void TRITONAPI SetRandomSeed(unsigned int seed)=0
Seeds the random number generator with a given value, to ensure consistent results.
virtual int TRITONAPI GetRandomInt(int start, int end) const =0
Return an evenly distributed random integer within a given range.