CloudyDay
 All Classes Functions Variables Enumerations
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
osgCloudyDay::CloudGenerator Class Reference

#include <CloudGenerator.h>

Inheritance diagram for osgCloudyDay::CloudGenerator:
osgCloudyDay::AltCumulusGenerator osgCloudyDay::AltStratusGenerator osgCloudyDay::CelluarAutomataGenerator osgCloudyDay::CloudCreatorWang osgCloudyDay::CloudVoxel osgCloudyDay::CumolonimbusGenerator osgCloudyDay::CumulusGenerator osgCloudyDay::DataCloud osgCloudyDay::NimbostratusGenerator osgCloudyDay::ObjCloud osgCloudyDay::StratoCumulusGenerator osgCloudyDay::StratusGenerator

List of all members.

Public Member Functions

 CloudGenerator (osg::Vec4 density)
virtual ~CloudGenerator (void)=0
WangCloudCreate ()
WangCloudCreate (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

WangCloudm_cloud
osg::ref_ptr< osg::Geode > dBoxes

Static Public Attributes

static Exportex = new Export()
static int numClouds = 0

Static Protected Member Functions

static void GenerateRandomNumber ()
static float GetRandomFloat ()

Protected Attributes

osg::ref_ptr< osg::Vec3Array > dBoxes_vertices
std::vector< unsigned short > dBoxes_indices
osg::ref_ptr< osg::Geometry > dBoxes_geometry
int m_category
osg::Vec3 m_middlepoint
osg::Vec4 m_density

Static Protected Attributes

static float * m_frands = 0
static int m_iterFloatRand = 0

Detailed Description

This abstract class is used to create a cloud.

Author:
Michael Beham

Constructor & Destructor Documentation

osgCloudyDay::CloudGenerator::CloudGenerator ( osg::Vec4  density)

Standard constructor

osgCloudyDay::CloudGenerator::~CloudGenerator ( void  )
pure virtual

Standard deconstructor


Member Function Documentation

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.

Parameters:
box_iterindex of the box
originorigin of the box
sizesnumber of sprites which should be created
cloud_sizesize of the box
jitter_sizesdefines the range of the jitter
buttomis true, if the box is at the buttom
sdefines the size of the sprite (this size is used for width and height)
min_max_scaledefines 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.

Parameters:
volumecontrol polygon
box_iterindex of the box
originorigin of the box
sizesnumber of sprites which should be created
cloud_sizesize of the box
jitter_sizesdefines the range of the jitter
buttomis true, if the box is at the buttom
sdefines the size of the sprite (this size is used for width and height)
min_max_scaledefines 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.

Parameters:
middlepointmiddlepoint of cloud layer
sizeboundingboxsize of cloud layer
numCloudsNumber of clouds
void osgCloudyDay::CloudGenerator::DecideInsideOutside ( )

Method sets a billboard to inside/outside

void osgCloudyDay::CloudGenerator::DoExport ( )
static

This method exports the clouds

void osgCloudyDay::CloudGenerator::EliminateRedudantSprites ( )

This method reject redundant sprites (sprites which are too close to other sprites).

void osgCloudyDay::CloudGenerator::GenerateRandomNumber ( )
staticprotected

Generate the random numbers

float osgCloudyDay::CloudGenerator::GetRandomFloat ( )
staticprotected

Returns a random number

Returns:
random number
virtual void osgCloudyDay::CloudGenerator::Initialize ( )
pure virtual

The documentation for this class was generated from the following files: