]> git.lizzy.rs Git - irrlicht.git/blob - include/IRandomizer.h
a0c073017575781f3600e26e833e0745ad14647a
[irrlicht.git] / include / IRandomizer.h
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt\r
2 // This file is part of the "Irrlicht Engine".\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h\r
4 \r
5 #ifndef __I_RANDOMIZER_H_INCLUDED__\r
6 #define __I_RANDOMIZER_H_INCLUDED__\r
7 \r
8 #include "IReferenceCounted.h"\r
9 \r
10 namespace irr\r
11 {\r
12 \r
13 //! Interface for generating random numbers\r
14 class IRandomizer : public virtual IReferenceCounted\r
15 {\r
16 public:\r
17         //! resets the randomizer\r
18         /** \param value Initialization value (seed) */\r
19         virtual void reset(s32 value=0x0f0f0f0f) =0;\r
20 \r
21         //! generates a pseudo random number in the range 0..randMax()\r
22         virtual s32 rand() const =0;\r
23 \r
24         //! generates a pseudo random number in the range 0..1\r
25         virtual f32 frand() const =0;\r
26 \r
27         //! get maxmimum number generated by rand()\r
28         virtual s32 randMax() const =0;\r
29 };\r
30 \r
31 } // end namespace irr\r
32 \r
33 #endif\r