#include <CloudGenerator.h>
Public Member Functions | |
| CloudGenerator (osg::Vec4 density) | |
| virtual | ~CloudGenerator (void)=0 |
| WangCloud * | Create () |
| WangCloud * | Create (osg::Vec3 middlepoint) |
| virtual void | Initialize ()=0 |
| void | DecideInsideOutside () |
| void | AddCloudBox (int box_iter, osg::Vec3 origin, osg::Vec3 sizes, osg::Vec3 cloud_size, osg::Vec3 jitter_sizes, bool buttom, float s, osg::Vec4 min_max_scale, osg::Vec4 density=osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f)) |
| void | AddCloudBox (CloudCreateVolume *volume, int box_iter, osg::Vec3 origin, osg::Vec3 sizes, osg::Vec3 cloud_size, osg::Vec3 jitter_sizes, bool buttom, osg::Vec4 density=osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f)) |
| void | EliminateRedudantSprites () |
| void | AddBox (osg::ref_ptr< osg::Vec3Array > box_triangles, osg::Vec3 posHelper, osg::Vec3 size) |
Static Public Member Functions | |
| static void | DoExport () |
Public Attributes | |
| WangCloud * | m_cloud |
| osg::ref_ptr< osg::Geode > | dBoxes |
Static Public Attributes | |
| static Export * | ex = new Export() |
| static int | numClouds = 0 |
Static Protected Member Functions | |
| static void | GenerateRandomNumber () |
| static float | GetRandomFloat () |
Static Protected Attributes | |
| static float * | m_frands = 0 |
| static int | m_iterFloatRand = 0 |
This abstract class is used to create a cloud.
| osgCloudyDay::CloudGenerator::CloudGenerator | ( | osg::Vec4 | density | ) |
Standard constructor
|
pure virtual |
Standard deconstructor
| void osgCloudyDay::CloudGenerator::AddBox | ( | osg::ref_ptr< osg::Vec3Array > | box_triangles, |
| osg::Vec3 | posHelper, | ||
| osg::Vec3 | size | ||
| ) |
This method creates a box, which is used for debugging and creating of a cloud
| void osgCloudyDay::CloudGenerator::AddCloudBox | ( | int | box_iter, |
| osg::Vec3 | origin, | ||
| osg::Vec3 | sizes, | ||
| osg::Vec3 | cloud_size, | ||
| osg::Vec3 | jitter_sizes, | ||
| bool | buttom, | ||
| float | s, | ||
| osg::Vec4 | min_max_scale, | ||
| osg::Vec4 | density = osg::Vec4(1.0f,1.0f,1.0f,1.0f) |
||
| ) |
This method creates the sprites within the specified box.
| box_iter | index of the box |
| origin | origin of the box |
| sizes | number of sprites which should be created |
| cloud_size | size of the box |
| jitter_sizes | defines the range of the jitter |
| buttom | is true, if the box is at the buttom |
| s | defines the size of the sprite (this size is used for width and height) |
| min_max_scale | defines the minium size maximum size |
| void osgCloudyDay::CloudGenerator::AddCloudBox | ( | CloudCreateVolume * | volume, |
| int | box_iter, | ||
| osg::Vec3 | origin, | ||
| osg::Vec3 | sizes, | ||
| osg::Vec3 | cloud_size, | ||
| osg::Vec3 | jitter_sizes, | ||
| bool | buttom, | ||
| osg::Vec4 | density = osg::Vec4(1.0f,1.0f,1.0f,1.0f) |
||
| ) |
This method creates the sprites within the specified box.
| volume | control polygon |
| box_iter | index of the box |
| origin | origin of the box |
| sizes | number of sprites which should be created |
| cloud_size | size of the box |
| jitter_sizes | defines the range of the jitter |
| buttom | is true, if the box is at the buttom |
| s | defines the size of the sprite (this size is used for width and height) |
| min_max_scale | defines the minium size maximum size |
| osgCloudyDay::WangCloud * osgCloudyDay::CloudGenerator::Create | ( | ) |
This method creates a cloud.
| osgCloudyDay::WangCloud * osgCloudyDay::CloudGenerator::Create | ( | osg::Vec3 | middlepoint | ) |
This method creates a cloud.
| middlepoint | middlepoint of cloud layer |
| size | boundingboxsize of cloud layer |
| numClouds | Number of clouds |
| void osgCloudyDay::CloudGenerator::DecideInsideOutside | ( | ) |
Method sets a billboard to inside/outside
|
static |
This method exports the clouds
| void osgCloudyDay::CloudGenerator::EliminateRedudantSprites | ( | ) |
This method reject redundant sprites (sprites which are too close to other sprites).
|
staticprotected |
Generate the random numbers
|
staticprotected |
Returns a random number
|
pure virtual |
This method specifies the boxes and uses AddBox to define the Sprites
Implemented in osgCloudyDay::CloudCreatorWang, osgCloudyDay::CelluarAutomataGenerator, osgCloudyDay::CumulusGenerator, osgCloudyDay::CloudVoxel, osgCloudyDay::ObjCloud, osgCloudyDay::CumolonimbusGenerator, osgCloudyDay::AltCumulusGenerator, osgCloudyDay::AltStratusGenerator, osgCloudyDay::NimbostratusGenerator, osgCloudyDay::StratoCumulusGenerator, osgCloudyDay::StratusGenerator, and osgCloudyDay::DataCloud.
1.8.1.1