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

#include <Cloud2D.h>

Inheritance diagram for osgCloudyDay::Cloud2D:
osgCloudyDay::AltStratus osgCloudyDay::Cirrus osgCloudyDay::CirrusCumulus osgCloudyDay::CirrusStratus osgCloudyDay::PerlinNoiseCloud

List of all members.

Public Member Functions

 Cloud2D ()
 ~Cloud2D ()
void Cloud2D::SetGeometry ()
void Cloud2D::SetGeometry (osg::Vec3 position, osg::Vec2 size)
void Cloud2D::Create (osg::Geode *geode, osg::Image *perlinImg)
void Create (osg::Geode *geode, osg::Image *perlinImg, osg::Image *perlinNormalImg)
void Create (osg::Geode *geode, osg::Image *perlinImg, osg::Image *perlinNormalImg, osg::Image *perlinHeightImg)
osg::Image * CreateNormalMap (osg::Image *img)
virtual void SetupGeometry (osg::Vec3 position, osg::Vec2 size, osg::Vec3Array *vertices, osg::Vec2Array *tcoords, osg::UIntArray *indices)=0

Public Attributes

osg::Geometry * geom
osg::Geode * geode
osg::Node * terrain_obj
bool m_tesselation

Protected Attributes

osg::Vec3Array * coords
osg::Vec2Array * tcoords
osg::UIntArray * indices

Detailed Description

Parent class to create a 2D cloud Provides methods, which are needed to create a 2D cloud (like normal map creation


Constructor & Destructor Documentation

osgCloudyDay::Cloud2D::Cloud2D ( void  )

Constructor to crate 2D clouds

osgCloudyDay::Cloud2D::~Cloud2D ( void  )

Deconstructor


Member Function Documentation

void osgCloudyDay::Cloud2D::Cloud2D::Create ( osg::Geode *  geode,
osg::Image *  perlinImg 
)

Create the 2D cloud

Parameters:
geodegeode of the 2D cloud
perlinImgtexture of the 2D cloud
void osgCloudyDay::Cloud2D::Cloud2D::SetGeometry ( )

Setup the geometry to render

void osgCloudyDay::Cloud2D::Cloud2D::SetGeometry ( osg::Vec3  position,
osg::Vec2  size 
)

Setup the geometry to render

Parameters:
positionposition of the 2D cloud
sizesize of the 2D cloud
void osgCloudyDay::Cloud2D::Create ( osg::Geode *  geode,
osg::Image *  perlinImg,
osg::Image *  perlinNormalImg 
)

Create the 2D cloud

Parameters:
geodegeode of the 2D cloud
perlinImgtexture of the 2D cloud
perlinNormalImgnormal of the 2D cloud
void osgCloudyDay::Cloud2D::Create ( osg::Geode *  geode,
osg::Image *  perlinImg,
osg::Image *  perlinNormalImg,
osg::Image *  perlinHeightImg 
)

Create textures

Parameters:
geodegeode of the 2D cloud
perlinImgtexture of the 2D cloud
perlinNormalImgnormal of the 2D cloud
perlinHeightImgheight texture of the 2D cloud
osg::Image * osgCloudyDay::Cloud2D::CreateNormalMap ( osg::Image *  img)

Method to creat the Normal map using a Sobel filter

Parameters:
imgtexture
Returns:
normal texture
virtual void osgCloudyDay::Cloud2D::SetupGeometry ( osg::Vec3  position,
osg::Vec2  size,
osg::Vec3Array *  vertices,
osg::Vec2Array *  tcoords,
osg::UIntArray *  indices 
)
pure virtual

Creates the geometry to render the 2D cloud

Parameters:
positionposition of the 2D cloud
sizesize of the 2D cloud
verticesvertices array
tcoordstexture coordinates array
indicesindices array

Implemented in osgCloudyDay::PerlinNoiseCloud, osgCloudyDay::CirrusCumulus, osgCloudyDay::Cirrus, osgCloudyDay::CirrusStratus, and osgCloudyDay::AltStratus.


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