Rise
The Vieneo Province
Loading...
Searching...
No Matches
GridLightning::System Class Reference

#include <GridLightning.h>

Collaboration diagram for GridLightning::System:
[legend]

Classes

struct  Discharge

Public Member Functions

 System (uint32_t seed=0x42434c57u)
void Seed (uint32_t seed)
void Reset ()
void Pause ()
void SetCells (std::vector< Cell > next)
const Cell * Find (short u, short v) const
const Cell * Choose (double fraction) const
void Observe (const Vector3 &ground)
bool Update (double elapsed, const Vector3 &observer, int players, float snow, float turbulence, Event &event)
double Rate () const
double Mass () const
size_t CellCount () const
uint64_t RebuildCount () const

Private Member Functions

double Uniform ()
double Interval ()
void Rebuild (const Vector3 &observer)

Private Attributes

std::vector< Cell > cells
std::vector< double > cumulative
std::vector< Discharge > recent
std::mt19937 random
double time = 0
double rebuildAt = 0
double remaining = 1
double mass = 0
double baseRate = 0
double rate = 0
uint64_t rebuilds = 0

Detailed Description

Definition at line 35 of file GridLightning.h.

Constructor & Destructor Documentation

◆ System()

GridLightning::System::System ( uint32_t seed = 0x42434c57u)
inlineexplicit

Definition at line 89 of file GridLightning.h.

Here is the call graph for this function:

Member Function Documentation

◆ CellCount()

size_t GridLightning::System::CellCount ( ) const
inline

Definition at line 158 of file GridLightning.h.

◆ Choose()

const Cell * GridLightning::System::Choose ( double fraction) const
inline

Definition at line 121 of file GridLightning.h.

Here is the caller graph for this function:

◆ Find()

const Cell * GridLightning::System::Find ( short u,
short v ) const
inline

Definition at line 115 of file GridLightning.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Interval()

double GridLightning::System::Interval ( )
inlineprivate

Definition at line 45 of file GridLightning.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mass()

double GridLightning::System::Mass ( ) const
inline

Definition at line 157 of file GridLightning.h.

◆ Observe()

void GridLightning::System::Observe ( const Vector3 & ground)
inline

Definition at line 127 of file GridLightning.h.

Here is the caller graph for this function:

◆ Pause()

void GridLightning::System::Pause ( )
inline

Definition at line 96 of file GridLightning.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Rate()

double GridLightning::System::Rate ( ) const
inline

Definition at line 156 of file GridLightning.h.

◆ Rebuild()

void GridLightning::System::Rebuild ( const Vector3 & observer)
inlineprivate

Definition at line 46 of file GridLightning.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RebuildCount()

uint64_t GridLightning::System::RebuildCount ( ) const
inline

Definition at line 159 of file GridLightning.h.

◆ Reset()

void GridLightning::System::Reset ( )
inline

Definition at line 91 of file GridLightning.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Seed()

void GridLightning::System::Seed ( uint32_t seed)
inline

Definition at line 90 of file GridLightning.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetCells()

void GridLightning::System::SetCells ( std::vector< Cell > next)
inline

Definition at line 100 of file GridLightning.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Uniform()

double GridLightning::System::Uniform ( )
inlineprivate

Definition at line 44 of file GridLightning.h.

Here is the caller graph for this function:

◆ Update()

bool GridLightning::System::Update ( double elapsed,
const Vector3 & observer,
int players,
float snow,
float turbulence,
Event & event )
inline

Definition at line 132 of file GridLightning.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ baseRate

double GridLightning::System::baseRate = 0
private

Definition at line 42 of file GridLightning.h.

◆ cells

std::vector<Cell> GridLightning::System::cells
private

Definition at line 38 of file GridLightning.h.

◆ cumulative

std::vector<double> GridLightning::System::cumulative
private

Definition at line 39 of file GridLightning.h.

◆ mass

double GridLightning::System::mass = 0
private

Definition at line 42 of file GridLightning.h.

◆ random

std::mt19937 GridLightning::System::random
private

Definition at line 41 of file GridLightning.h.

◆ rate

double GridLightning::System::rate = 0
private

Definition at line 42 of file GridLightning.h.

◆ rebuildAt

double GridLightning::System::rebuildAt = 0
private

Definition at line 42 of file GridLightning.h.

◆ rebuilds

uint64_t GridLightning::System::rebuilds = 0
private

Definition at line 43 of file GridLightning.h.

◆ recent

std::vector<Discharge> GridLightning::System::recent
private

Definition at line 40 of file GridLightning.h.

◆ remaining

double GridLightning::System::remaining = 1
private

Definition at line 42 of file GridLightning.h.

◆ time

double GridLightning::System::time = 0
private

Definition at line 42 of file GridLightning.h.


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