CloudyDay
 All Classes Functions Variables Enumerations
Public Member Functions | Protected Member Functions | Protected Attributes
osgCloudyDay::CelluarAutomataGenerator Class Reference
Inheritance diagram for osgCloudyDay::CelluarAutomataGenerator:
osgCloudyDay::CloudGenerator

List of all members.

Public Member Functions

 CelluarAutomataGenerator (unsigned int width, unsigned int depth, unsigned int height, int type, osg::Vec4 color)
 ~CelluarAutomataGenerator (void)
void Perform (void)
void Update (void)
- Public Member Functions inherited from osgCloudyDay::CloudGenerator
 CloudGenerator (osg::Vec4 density)
virtual ~CloudGenerator (void)=0
WangCloudCreate ()
WangCloudCreate (osg::Vec3 middlepoint)
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)

Protected Member Functions

void Initialize ()
void AddEllipsoide (osg::Vec3 radius, osg::Vec3 position, float lifetime)
float GetCellDensity (int i, int j, int k)
float GetPointDensity (osg::Vec3 Point)

Protected Attributes

int m_type
- Protected Attributes inherited from osgCloudyDay::CloudGenerator
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

Additional Inherited Members

- Static Public Member Functions inherited from osgCloudyDay::CloudGenerator
static void DoExport ()
- Public Attributes inherited from osgCloudyDay::CloudGenerator
WangCloudm_cloud
osg::ref_ptr< osg::Geode > dBoxes
- Static Public Attributes inherited from osgCloudyDay::CloudGenerator
static Exportex = new Export()
static int numClouds = 0
- Static Protected Member Functions inherited from osgCloudyDay::CloudGenerator
static void GenerateRandomNumber ()
static float GetRandomFloat ()
- Static Protected Attributes inherited from osgCloudyDay::CloudGenerator
static float * m_frands = 0
static int m_iterFloatRand = 0

Constructor & Destructor Documentation

osgCloudyDay::CelluarAutomataGenerator::CelluarAutomataGenerator ( unsigned int  width,
unsigned int  depth,
unsigned int  height,
int  type,
osg::Vec4  color 
)

Constructor

Parameters:
widthwidth of the simulation space
depthdepth of the simulation space
heightheight of the simulation space
typecloud type
colorcolor of the cloud
osgCloudyDay::CelluarAutomataGenerator::~CelluarAutomataGenerator ( void  )

Deconstructor


Member Function Documentation

void osgCloudyDay::CelluarAutomataGenerator::AddEllipsoide ( osg::Vec3  radius,
osg::Vec3  position,
float  lifetime 
)
protected

Method adds an ellipsoid

Parameters:
radiusradius of th ellipsoid
positionposition of the ellipsoid
lifetimelifetime of the ellipsoid
float osgCloudyDay::CelluarAutomataGenerator::GetCellDensity ( int  i,
int  j,
int  k 
)
protected

Returns the density of a cell

Parameters:
ix-coordinate of the cell
jy-coordinate of the cell
kz-coordinate of the cell
Returns:
density value
float osgCloudyDay::CelluarAutomataGenerator::GetPointDensity ( osg::Vec3  Point)
protected

Returns the point density of the cloud at a specific position

Parameters:
Pointposition of the cloud
Returns:
density value
void osgCloudyDay::CelluarAutomataGenerator::Initialize ( )
protectedvirtual

Initialize creates the boxes and sprites which are needed to create a Cumulus cloud.

Implements osgCloudyDay::CloudGenerator.

void osgCloudyDay::CelluarAutomataGenerator::Perform ( void  )

Method simulates the cloud

void osgCloudyDay::CelluarAutomataGenerator::Update ( void  )

Method sets the cloud to render it


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