Manages all the clouds in the scene.
More...
#include <CloudsManager.h>
Manages all the clouds in the scene.
CloudsManager::CloudsManager |
( |
| ) |
|
|
inline |
CloudsManager::~CloudsManager |
( |
| ) |
|
|
inline |
void CloudsManager::Delete |
( |
void |
| ) |
|
Deletes the cloud manager and all clouds associated with it.
void CloudsManager::LoadAndInitiate |
( |
void |
| ) |
|
Initializes and generates (loads from files) all the clouds and attributes associated with them (also saves them afterwards to disk if necessary).
int CloudsManager::LoadFromFile |
( |
void |
| ) |
|
Loads previously saved cloud files from the disk into the manager's std::vector. Files are loaded sequentially in ascending order. If the loading process of one of any them fails, all the following files are not loaded.
- Returns
- 0 if at least one cloud file was successfully loaded, false otherwise.
int CloudsManager::SaveToFile |
( |
void |
| ) |
|
Saves the clouds into filesystem, every cloud in a separate .txt file.
- Returns
- 0 if everything went well and all files were saved to the disk, -1 otherwise.
void CloudsManager::SetUVCoords |
( |
bool |
singleTexture = false | ) |
|
Set up the UV texture coordinates for all of the cloud particles.
- Parameters
-
singleTexture | Indicates whether the cloud texture cotains a single texture which is displayed on every particle or four different textures for different values of alpha channel (optional, default = false) |
void CloudsManager::Update |
( |
const osg::Vec3f & |
cameraPosition, |
|
|
const osg::Vec3f & |
cameraView, |
|
|
const osg::Vec3f & |
cameraUp |
|
) |
| |
Updates the status of all of the clouds and launches the realization of the update of impostors from the priority queue.
- Parameters
-
[in] | cameraPos | Position of the camera. |
[in] | cameraView | Direction in which the camera is looking. |
[in] | cameraUp | The 'Up' direction of the camera. |
std::vector<Cloud> CloudsManager::clouds |
The documentation for this class was generated from the following files: