dtCore::CloudPlane Class Reference

This class can be used to simulate cloud cover it derives from EnvEffect. More...

#include <cloudplane.h>

Inheritance diagram for dtCore::CloudPlane:

dtCore::EnvEffect dtCore::DeltaDrawable dtCore::Base

List of all members.

Public Member Functions

 CloudPlane (int octaves, float cutoff, int frequency, float amp, float persistence, float density, int texSize, float height, const std::string &name="CloudPlane", const std::string &textureFilePath="")
 Constructor: These params initialize the noise function for a detailed description see dtUtil::Fractal.
 CloudPlane (float height, const std::string &name, const std::string &textureFilePath)
virtual void Repaint (const osg::Vec3 &skyColor, const osg::Vec3 &fogColor, double sunAngle, double sunAzimuth, double visibility)
 Must override this to supply the repainting routine.
float GetHeight ()
 
Returns:
height of skyplane

bool SaveTexture (const std::string &textureFilePath)
 Save generated texture to file.
bool LoadTexture (const std::string &textureFilePath)
 Load generated texture from file.
void SetColor (const osg::Vec4 &)
 Sets the color of the Cloud Plane.
osg::Vec4 GetColor () const
 Returns the color of the clouds.
void SetWind (float x, float y)
osg::Vec2 GetWind () const

Protected Member Functions

virtual ~CloudPlane ()


Detailed Description

This class can be used to simulate cloud cover it derives from EnvEffect.

Constructor & Destructor Documentation

CloudPlane::CloudPlane ( int  octaves,
float  cutoff,
int  frequency,
float  amp,
float  persistence,
float  density,
int  texSize,
float  height,
const std::string &  name = "CloudPlane",
const std::string &  textureFilePath = "" 
)

Constructor: These params initialize the noise function for a detailed description see dtUtil::Fractal.

See also:
dtUtil::Fractal

CloudPlane::CloudPlane ( float  height,
const std::string &  name,
const std::string &  textureFilePath 
)

CloudPlane::~CloudPlane (  )  [protected, virtual]


Member Function Documentation

void CloudPlane::Repaint ( const osg::Vec3 &  skyColor,
const osg::Vec3 &  fogColor,
double  sunAngle,
double  sunAzimuth,
double  visibility 
) [virtual]

Must override this to supply the repainting routine.

Implements dtCore::EnvEffect.

float dtCore::CloudPlane::GetHeight (  )  [inline]

Returns:
height of skyplane

bool CloudPlane::SaveTexture ( const std::string &  textureFilePath  ) 

Save generated texture to file.

Returns:
success of save

bool CloudPlane::LoadTexture ( const std::string &  textureFilePath  ) 

Load generated texture from file.

Returns:
success of load

void CloudPlane::SetColor ( const osg::Vec4 &  newColor  ) 

Sets the color of the Cloud Plane.

osg::Vec4 CloudPlane::GetColor (  )  const

Returns the color of the clouds.

Returns:
current cloud color

void CloudPlane::SetWind ( float  x,
float  y 
)

osg::Vec2 dtCore::CloudPlane::GetWind (  )  const [inline]


http://www.delta3d.org
2.0.0 generated 14 Feb 2008