Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Weather Class Reference

#include <Weather.h>

List of all members.

Public Types

enum  STATE {
  CLEAR, HIGH_CLOUDS, MODERATE_CLOUDS, OVERCAST,
  FOG, STORM, NUM_STATES
}

Public Member Functions

 Weather ()
virtual ~Weather ()
virtual void Update ()
STATE State () const
Text Description () const
double Period () const
double Chance (STATE s) const
double Ceiling () const
double Visibility () const
void SetPeriod (double p)
void SetChance (int n, double c)

Protected Member Functions

void NormalizeChances ()

Protected Attributes

STATE state
double period
double chances [NUM_STATES]
double ceiling
double visibility
STATE active_states [NUM_STATES]
double thresholds [NUM_STATES]

Detailed Description

Definition at line 23 of file Weather.h.


Member Enumeration Documentation

Enumerator:
CLEAR 
HIGH_CLOUDS 
MODERATE_CLOUDS 
OVERCAST 
FOG 
STORM 
NUM_STATES 

Definition at line 29 of file Weather.h.


Constructor & Destructor Documentation

Weather::Weather ( )

Definition at line 22 of file Weather.cpp.

Weather::~Weather ( )
virtual

Definition at line 37 of file Weather.cpp.


Member Function Documentation

double Weather::Ceiling ( ) const
inline

Definition at line 46 of file Weather.h.

double Weather::Chance ( STATE  s) const
inline

Definition at line 45 of file Weather.h.

Text Weather::Description ( ) const

Definition at line 146 of file Weather.cpp.

void Weather::NormalizeChances ( )
protected

Definition at line 55 of file Weather.cpp.

double Weather::Period ( ) const
inline

Definition at line 44 of file Weather.h.

void Weather::SetChance ( int  n,
double  c 
)

Definition at line 43 of file Weather.cpp.

void Weather::SetPeriod ( double  p)
inline

Definition at line 49 of file Weather.h.

STATE Weather::State ( ) const
inline

Definition at line 42 of file Weather.h.

void Weather::Update ( )
virtual

Definition at line 94 of file Weather.cpp.

double Weather::Visibility ( ) const
inline

Definition at line 47 of file Weather.h.


Member Data Documentation

STATE Weather::active_states[NUM_STATES]
protected

Definition at line 61 of file Weather.h.

double Weather::ceiling
protected

Definition at line 58 of file Weather.h.

double Weather::chances[NUM_STATES]
protected

Definition at line 57 of file Weather.h.

double Weather::period
protected

Definition at line 56 of file Weather.h.

STATE Weather::state
protected

Definition at line 55 of file Weather.h.

double Weather::thresholds[NUM_STATES]
protected

Definition at line 62 of file Weather.h.

double Weather::visibility
protected

Definition at line 59 of file Weather.h.


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