vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GenClouds.h File Reference
#include "cloud.h"

Go to the source code of this file.

Classes

struct  CloudVoxel
 Represents a cloud voxel used for cloud generation. More...
 

Functions

void InitCloudGrowth (int ellips_a, int ellips_b, int ellips_c)
 
bool f_act (unsigned int i, unsigned int j, unsigned int k)
 
void GrowthSimulation (int timeSteps)
 
float weightedSum (unsigned int i, unsigned int j, unsigned int k)
 
void CreateCloudFromVoxels (Cloud &cloud, const osg::Vec3f &cloudPos, float scale)
 

Detailed Description

Author
Jakub Kroupal (original Atmospheric plug-in)
Rastislav Tisovcik (revised Clouds ability)
Version
2.0
Date
2008 (Atmospheric), January 2011 (Clouds)

Function Documentation

void CreateCloudFromVoxels ( Cloud cloud,
const osg::Vec3f &  cloudPos,
float  scale 
)

Converts the voxel space into the final cloud

Parameters
[in]cloudInstance of a cloud which is used to store the data from the voxel space
[in]cloudPosPosition of the cloud in the scene
[in]scaleScale of the cloud
bool f_act ( unsigned int  i,
unsigned int  j,
unsigned int  k 
)

Function computing the active value of the given cell as described in the thesis (p.3, formula 2.4)

Parameters
[in]iX-coordinate of the voxel in the cloud
[in]jY-coordinate of the voxel in the cloud
[in]kZ-coordinate of the voxel in the cloud
void GrowthSimulation ( int  timeSteps)

Simulates the growth of the cloud

Parameters
timeStepsNumber of steps the generation process should take
void InitCloudGrowth ( int  ellips_a,
int  ellips_b,
int  ellips_c 
)

Initializes the growth simulation of the cloud

Parameters
[in]ellips_aSize of the half-axis a of the ellipsoid
[in]ellips_bSize of the half-axis b of the ellipsoid
[in]ellips_cSize of the half-axis c of the ellipsoid
float weightedSum ( unsigned int  i,
unsigned int  j,
unsigned int  k 
)

Computes the weighted sum of the cloud cell and cells related to it.

Parameters
[in]iX coordinate of the cloud cell in the voxel space
[in]jY coordinate of the cloud cell in the voxel space
[in]kZ coordinate of the cloud cell in the voxel space
Returns
Weighted sum of the cloud cell and cells related to it.