Base class for actors containing a random engine with a fixed seed. More...
#include <ActorWithRandomEngine.h>
Public Member Functions | |
AActorWithRandomEngine (const FObjectInitializer &ObjectInitializer) | |
URandomEngine * | GetRandomEngine () |
int32 | GetSeed () const |
void | SetSeed (int32 InSeed) |
Protected Member Functions | |
virtual void | OnConstruction (const FTransform &Transform) override |
Private Attributes | |
bool | bGenerateRandomSeed = false |
Set a random seed. More... | |
URandomEngine * | RandomEngine |
int32 | Seed = 123456789 |
Seed of the pseudo-random engine. More... | |
Base class for actors containing a random engine with a fixed seed.
Definition at line 17 of file ActorWithRandomEngine.h.
AActorWithRandomEngine::AActorWithRandomEngine | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 12 of file ActorWithRandomEngine.cpp.
References RandomEngine.
|
inline |
Definition at line 36 of file ActorWithRandomEngine.h.
|
inline |
Definition at line 42 of file ActorWithRandomEngine.h.
References URandomEngine::Seed().
|
overrideprotectedvirtual |
Definition at line 18 of file ActorWithRandomEngine.cpp.
References bGenerateRandomSeed, URandomEngine::GenerateRandomSeed(), RandomEngine, URandomEngine::Seed(), and Seed.
void AActorWithRandomEngine::SetSeed | ( | int32 | InSeed | ) |
Definition at line 40 of file ActorWithRandomEngine.cpp.
References RandomEngine, URandomEngine::Seed(), and Seed.
|
private |
Set a random seed.
Definition at line 54 of file ActorWithRandomEngine.h.
Referenced by OnConstruction().
|
private |
Definition at line 61 of file ActorWithRandomEngine.h.
Referenced by AActorWithRandomEngine(), OnConstruction(), and SetSeed().
|
private |
Seed of the pseudo-random engine.
Definition at line 58 of file ActorWithRandomEngine.h.
Referenced by OnConstruction(), and SetSeed().