A class factory for CloudLayer objects.
More...
#include <CloudLayerFactory.h>
A class factory for CloudLayer objects.
Call CloudLayerFactory::Create to instantiate a CloudLayer object, which may then be configured, seeded, and submitted to the AtmosphericConditions. CloudLayer is a virtual base class, so this is the only mechanism for creating specific cloud layer types.
◆ Create()
Instantiate a CloudLayer for a given cloud type.
May only be called after the Atmosphere object has been initialized with Atmosphere::Initialize(), or at least pre-initialized with Atmosphere::PreInit().
Currently supported CloudTypes include:
- CloudTypes::CIRROCUMULUS - High planar cloud puffs.
- CloudTypes::CIRRUS_FIBRATUS - High, wispy cirrus clouds.
- CloudTypes::STRATUS - Low clouds represented as a slab.
- CloudTypes::CUMULONIMBUS_CAPPILATUS - A large thunderhead with lightning and rain.
- CloudTypes::CUMULUS_MEDIOCRIS - Small, puffy clouds. Use sparingly.
- CloudTypes::CUMULUS_CONGESTUS - Larger cumulus clouds with flattened bottoms, optimized for performance.
- CloudTypes::CUMULUS_CONGESTUS_HI_RES - Larger cumulus clouds with flattened bottoms, optimized for appearance.
- CloudTypes::TOWERING_CUMULUS - Large cumulus clouds with strong vertical growth - basically cumulus congestus clouds growing into cumulonimbus.
- CloudTypes::STRATOCUMULUS - Low, dense, puffy clouds with some sun breaks between them. Implemented with GPU ray-casting, which can stress fill rate.
- CloudTypes::STRATOCUMULUS_PARTICLES - EXPERIMENTAL. Low, dense, puffy clouds with some sun breaks between them. Implemented with billboard particles.
- CloudTypes::SANDSTORM - A "haboob" cloud of dust intended to be positioned at ground level.
- Parameters
-
layerType | The type of cloud deck to create, must be of the CloudTypes enumeration. |
atmosphere | The atmosphere to which this cloud layer belongs to. |
- Returns
- A pointer to a new CloudLayer for the specified type, or NULL if the Atmosphere has not yet been initialized.
◆ Serialize()
static bool SILVERLINING_API SilverLining::CloudLayerFactory::Serialize |
( |
CloudLayer * |
layer, |
|
|
std::ostream & |
stream, |
|
|
void * |
data = 0 |
|
) |
| |
|
static |
Flattens a cloud layer to a stream buffer.
- Parameters
-
◆ Unserialize()
static CloudLayer *SILVERLINING_API SilverLining::CloudLayerFactory::Unserialize |
( |
const Atmosphere & |
atm, |
|
|
std::istream & |
stream, |
|
|
void * |
data = 0 |
|
) |
| |
|
static |
Restores a cloud layer from a stream buffer written with Serialize()
- Parameters
-
The documentation for this class was generated from the following file: