![]() |
vrecko
virtual reality framework
|
#include <iostream>#include <cstdlib>#include <vreckoAP/Nature/Clouds/GenClouds.h>#include <vreckoAP/Nature/Clouds/math_aux.h>Macros | |
| #define | NX 100 |
| #define | NY 100 |
| #define | NZ 100 |
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) |
Variables | |
| CloudVoxel | voxel_space [NX][NY][NZ] |
| int | ellipsoid_2a = 0 |
| int | ellipsoid_2b = 0 |
| int | ellipsoid_2c = 0 |
| #define NX 100 |
| #define NY 100 |
| #define NZ 100 |
| void CreateCloudFromVoxels | ( | Cloud & | cloud, |
| const osg::Vec3f & | cloudPos, | ||
| float | scale | ||
| ) |
Converts the voxel space into the final cloud
| [in] | cloud | Instance of a cloud which is used to store the data from the voxel space |
| [in] | cloudPos | Position of the cloud in the scene |
| [in] | scale | Scale 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)
| [in] | i | X-coordinate of the voxel in the cloud |
| [in] | j | Y-coordinate of the voxel in the cloud |
| [in] | k | Z-coordinate of the voxel in the cloud |
| void GrowthSimulation | ( | int | timeSteps | ) |
Simulates the growth of the cloud
| timeSteps | Number 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
| [in] | ellips_a | Size of the half-axis a of the ellipsoid |
| [in] | ellips_b | Size of the half-axis b of the ellipsoid |
| [in] | ellips_c | Size 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.
| [in] | i | X coordinate of the cloud cell in the voxel space |
| [in] | j | Y coordinate of the cloud cell in the voxel space |
| [in] | k | Z coordinate of the cloud cell in the voxel space |
| int ellipsoid_2a = 0 |
| int ellipsoid_2b = 0 |
| int ellipsoid_2c = 0 |
| CloudVoxel voxel_space[NX][NY][NZ] |