CARLA
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
AActorWithRandomEngine Class Reference

Base class for actors containing a random engine with a fixed seed. More...

#include <ActorWithRandomEngine.h>

+ Inheritance diagram for AActorWithRandomEngine:
+ Collaboration diagram for AActorWithRandomEngine:

Public Member Functions

 AActorWithRandomEngine (const FObjectInitializer &ObjectInitializer)
 
URandomEngineGetRandomEngine ()
 
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...
 
URandomEngineRandomEngine
 
int32 Seed = 123456789
 Seed of the pseudo-random engine. More...
 

Detailed Description

Base class for actors containing a random engine with a fixed seed.

Definition at line 17 of file ActorWithRandomEngine.h.

Constructor & Destructor Documentation

◆ AActorWithRandomEngine()

AActorWithRandomEngine::AActorWithRandomEngine ( const FObjectInitializer &  ObjectInitializer)

Definition at line 12 of file ActorWithRandomEngine.cpp.

References RandomEngine.

Member Function Documentation

◆ GetRandomEngine()

URandomEngine* AActorWithRandomEngine::GetRandomEngine ( )
inline

Definition at line 36 of file ActorWithRandomEngine.h.

◆ GetSeed()

int32 AActorWithRandomEngine::GetSeed ( ) const
inline

Definition at line 42 of file ActorWithRandomEngine.h.

References URandomEngine::Seed().

+ Here is the call graph for this function:

◆ OnConstruction()

void AActorWithRandomEngine::OnConstruction ( const FTransform &  Transform)
overrideprotectedvirtual

Definition at line 18 of file ActorWithRandomEngine.cpp.

References bGenerateRandomSeed, URandomEngine::GenerateRandomSeed(), RandomEngine, URandomEngine::Seed(), and Seed.

+ Here is the call graph for this function:

◆ SetSeed()

void AActorWithRandomEngine::SetSeed ( int32  InSeed)

Definition at line 40 of file ActorWithRandomEngine.cpp.

References RandomEngine, URandomEngine::Seed(), and Seed.

+ Here is the call graph for this function:

Member Data Documentation

◆ bGenerateRandomSeed

bool AActorWithRandomEngine::bGenerateRandomSeed = false
private

Set a random seed.

Definition at line 54 of file ActorWithRandomEngine.h.

Referenced by OnConstruction().

◆ RandomEngine

URandomEngine* AActorWithRandomEngine::RandomEngine
private

Definition at line 61 of file ActorWithRandomEngine.h.

Referenced by AActorWithRandomEngine(), OnConstruction(), and SetSeed().

◆ Seed

int32 AActorWithRandomEngine::Seed = 123456789
private

Seed of the pseudo-random engine.

Definition at line 58 of file ActorWithRandomEngine.h.

Referenced by OnConstruction(), and SetSeed().


The documentation for this class was generated from the following files: