vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Cloud Class Reference

#include <Cloud.h>

Classes

class  ParticleAwayComparison
 

Public Member Functions

 Cloud ()
 
void CalculateBoundingBox (void)
 
void ComputeUpRightVectors ()
 
void LightCloud (void)
 
void RegularUpdate ()
 
void InitCloudGeometry (osg::ref_ptr< osg::Geometry > cloudGeometry)
 
void UpdateCloudLotRocScale ()
 
void UpdateCloudColor ()
 
void UpdateCloud ()
 
void Delete (void)
 
void SetLastCam (osg::Vec3f last_cam)
 

Static Public Member Functions

static void SetSunLight (SunLight &sun)
 
static void GenerateLightTexture (void)
 
static void DestroyLightTexture (void)
 
static bool AddToQueue (Cloud *cloudToUpdate)
 
static void RealizeQueue (void)
 
static void SetTranslateErrorTolerance (float tolerance)
 
static void SetMaxCloudUpdates (unsigned int max)
 
static void SetSceneInfo (const CloudSceneInfo &info)
 
static void SetCloudParticleTexture (osg::ref_ptr< osg::Texture2D > newCloudParticleTexture)
 
static void SetCamera (const osg::Vec3f &newCameraPosition, const osg::Vec3f &newCameraView, const osg::Vec3f &newCameraUp)
 
static void SetViewMatrix (const osg::Matrix &newViewMatrix)
 

Public Attributes

AABoundingBox boundingBox
 
std::vector< CloudParticlecloudParticle
 
class Cloud::ParticleAwayComparison SortAway
 

Detailed Description

Represents a cloud and all data and functionality associated with it.

Constructor & Destructor Documentation

Cloud::Cloud ( )
inline

Member Function Documentation

bool Cloud::AddToQueue ( Cloud cloudToUpdate)
static

Adds the cloud to the update queue.

Parameters
cloudCloud to be added to the update queue.
Returns
TRUE if the cloud has been added to the queue, FALSE if the cloud had already been in the queue.
void Cloud::CalculateBoundingBox ( void  )

Computes the bounding box (bounding sphere, actually) of the cloud.

void Cloud::ComputeUpRightVectors ( )
Deprecated:
Should be rewritten in OSG. Computes the new Up and Right vectors based on the curent view - used in the update of cloud particle rotations.
void Cloud::Delete ( void  )

Deletes all the data associated with the cloud.

void Cloud::DestroyLightTexture ( void  )
static

Destroys the temporary texture used for the computation of lighting.

void Cloud::GenerateLightTexture ( void  )
static

Generates a temporary texture which is used for light computation. Based on the function used by Harris et al. (www.markmark.net/SkyWorks/)

void Cloud::InitCloudGeometry ( osg::ref_ptr< osg::Geometry >  cloudGeometry)

Initializes the geometry of the cloud, its vertices and color and texture coordinates.

Parameters
cloudGeometryGeometry of the cloud which is used to create the cloud in it.
void Cloud::LightCloud ( void  )
Deprecated:
Should be rewritten in OSG. Computes the lighting of the cloud.
void Cloud::RealizeQueue ( void  )
static

Realizes the cloud update queue.

void Cloud::RegularUpdate ( )

Regular update of the cloud which is being called once per frame.

void Cloud::SetCamera ( const osg::Vec3f &  newCameraPosition,
const osg::Vec3f &  newCameraView,
const osg::Vec3f &  newCameraUp 
)
static

Updates the camera data.

Parameters
newCameraPositionCurrent position vector of the camera.
newCameraViewCurrent view vector of the camera.
newCameraUpCurrent up vector of the camera.
static void Cloud::SetCloudParticleTexture ( osg::ref_ptr< osg::Texture2D >  newCloudParticleTexture)
inlinestatic
void Cloud::SetLastCam ( osg::Vec3f  last_cam)
inline
static void Cloud::SetMaxCloudUpdates ( unsigned int  max)
inlinestatic
static void Cloud::SetSceneInfo ( const CloudSceneInfo info)
inlinestatic
static void Cloud::SetSunLight ( SunLight sun)
inlinestatic
static void Cloud::SetTranslateErrorTolerance ( float  tolerance)
inlinestatic
static void Cloud::SetViewMatrix ( const osg::Matrix &  newViewMatrix)
inlinestatic
void Cloud::UpdateCloud ( )

Updates the vertices and color of the cloud.

void Cloud::UpdateCloudColor ( )

Updates the color of the cloud.

void Cloud::UpdateCloudLotRocScale ( )

Updates the vertices of the cloud.

Member Data Documentation

AABoundingBox Cloud::boundingBox
std::vector<CloudParticle> Cloud::cloudParticle
class Cloud::ParticleAwayComparison Cloud::SortAway

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