All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | List of all members
SkyX::VClouds::VClouds Class Reference

#include <VClouds.h>

Classes

struct  CameraData
 Camera data struct. More...
 
struct  GeometrySettings
 Geometry settings. More...
 
struct  RenderQueueGroups
 Render queue groups. More...
 

Public Member Functions

 VClouds (Ogre::SceneManager *sm)
 Simple constructor. More...
 
 ~VClouds ()
 Destructor. More...
 
std::vector< CameraData > & _getCamerasData ()
 Get cameras data. More...
 
void create ()
 Create. More...
 
void create (const GeometrySettings &gs)
 Create. More...
 
void create (const Ogre::Vector2 &Height, const float &Radius)
 Create. More...
 
const Ogre::Vector3 & getAmbientColor () const
 Get Ambient color. More...
 
const Ogre::Vector4 & getAmbientFactors () const
 Get ambient factors. More...
 
Ogre::Camera * getCamera ()
 Get current rendering camera. More...
 
const Ogre::Real & getCloudFieldScale () const
 Get cloud field scale. More...
 
DataManagergetDataManager ()
 Get data manager. More...
 
const Ogre::Vector2 & getDistanceFallingParams () const
 Get distance falling params. More...
 
GeometryManagergetGeometryManager ()
 Get geometry manager. More...
 
const GeometrySettingsgetGeometrySettings () const
 Get geometry settings. More...
 
const Ogre::Real & getGlobalOpacity () const
 Get global opacity. More...
 
LightningManagergetLightningManager ()
 Get lightning manager. More...
 
const Ogre::Vector4 & getLightResponse () const
 Get light response. More...
 
const Ogre::Real & getNoiseScale () const
 Get noise scale. More...
 
const RenderQueueGroupsgetRenderQueueGroups () const
 Get render queue groups. More...
 
Ogre::SceneManager * getSceneManager ()
 Get scene manager. More...
 
const Ogre::Vector3 & getSunColor () const
 Get sun color. More...
 
const Ogre::Vector3 & getSunDirection () const
 Get sun direction. More...
 
const Ogre::Vector2 & getWheater () const
 Get wheater. More...
 
const Ogre::Radian & getWindDirection () const
 Get wind direction. More...
 
const Ogre::Vector2 getWindDirectionV2 () const
 Get wind direction as a Vector2. More...
 
const float & getWindSpeed () const
 Get wind speed. More...
 
const bool & isCreated () const
 Has been create() already called? More...
 
const bool & isVisible () const
 Is VClouds visible? More...
 
void notifyCameraRender (Ogre::Camera *c, const Ogre::Real &timeSinceLastCameraFrame)
 Notify camera render, to be invoked per-camera and per-frame. More...
 
void registerCamera (Ogre::Camera *c)
 Register camera. More...
 
void remove ()
 Remove. More...
 
void setAmbientColor (const Ogre::Vector3 &AmbientColor)
 Set ambient color. More...
 
void setAmbientFactors (const Ogre::Vector4 &AmbientFactors)
 Set ambient factors. More...
 
void setCloudFieldScale (const Ogre::Real &CloudFieldScale)
 Set cloud field scale. More...
 
void setDistanceFallingParams (const Ogre::Vector2 &DistanceFallingParams)
 Set distance falling params. More...
 
void setEnabled (bool _enabled)
 Set enable. More...
 
void setGeometrySettings (const GeometrySettings &gs)
 Set geometry settings. More...
 
void setGlobalOpacity (const Ogre::Real &GlobalOpacity)
 Set global opacity. More...
 
void setLightResponse (const Ogre::Vector4 &LightResponse)
 Set light response. More...
 
void setNoiseScale (const Ogre::Real &NoiseScale)
 Set noise scale. More...
 
void setRenderQueueGroups (const RenderQueueGroups &rqg)
 Set render queue groups. More...
 
void setSunColor (const Ogre::Vector3 &SunColor)
 Set sun color. More...
 
void setSunDirection (const Ogre::Vector3 &SunDirection)
 Set sun direction. More...
 
void setVisible (const bool &visible)
 Set visible. More...
 
void setWheater (const float &Humidity, const float &AverageCloudsSize, const bool &DelayedResponse)
 Set wheater parameters Use this funtion to update the cloud field parameters, you'll get a smart and smooth transition from your old setting to your new ones. More...
 
void setWindDirection (const Ogre::Radian &WindDirection)
 Set wind direction. More...
 
void setWindSpeed (const float &WindSpeed)
 Set wind speed. More...
 
void unregisterCamera (Ogre::Camera *c)
 Unregister camera. More...
 
void update (const Ogre::Real &timeSinceLastFrame)
 Update, to be invoked per frame. More...
 

Constructor & Destructor Documentation

SkyX::VClouds::VClouds::VClouds ( Ogre::SceneManager *  sm)

Simple constructor.

Parameters
smScene manager
SkyX::VClouds::VClouds::~VClouds ( )

Destructor.

Member Function Documentation

std::vector<CameraData>& SkyX::VClouds::VClouds::_getCamerasData ( )
inline

Get cameras data.

Returns
Cameras data
Remarks
Only for internal use
void SkyX::VClouds::VClouds::create ( )

Create.

void SkyX::VClouds::VClouds::create ( const GeometrySettings gs)

Create.

Parameters
gsGeometry settings
void SkyX::VClouds::VClouds::create ( const Ogre::Vector2 &  Height,
const float &  Radius 
)

Create.

Parameters
Heightx = Cloud field y-coord start, y: Field height (both in world coordinates)
RadiusRadius
const Ogre::Vector3& SkyX::VClouds::VClouds::getAmbientColor ( ) const
inline

Get Ambient color.

Returns
Ambient color
const Ogre::Vector4& SkyX::VClouds::VClouds::getAmbientFactors ( ) const
inline

Get ambient factors.

Returns
Ambient factors
Ogre::Camera* SkyX::VClouds::VClouds::getCamera ( )
inline

Get current rendering camera.

Returns
Current rendering camera

References SkyX::mCamera.

const Ogre::Real& SkyX::VClouds::VClouds::getCloudFieldScale ( ) const
inline

Get cloud field scale.

Returns
Cloud field scale
DataManager* SkyX::VClouds::VClouds::getDataManager ( )
inline

Get data manager.

Returns
Data manager
const Ogre::Vector2& SkyX::VClouds::VClouds::getDistanceFallingParams ( ) const
inline

Get distance falling params.

Returns
DistanceFallingParams.x = Distance falling factor (How much the cloud field geometry falls with the distance) Remember that the geometry falling is relative to the distance(height) between the camera and the cloud field. Typical range is [0, ~2] 0 = no falling DistanceFallingParams.y = Max falling (in world coords), useful when , i.e., you've water and you want to go in. That param will allow you to avoid the cloud field geometry falls into the ocean. -1 means not max falling. (default)
Remarks
See GoemetryBlock::_setVertexData(...) for more info
GeometryManager* SkyX::VClouds::VClouds::getGeometryManager ( )
inline

Get geometry manager.

Returns
Geometry manager
const GeometrySettings& SkyX::VClouds::VClouds::getGeometrySettings ( ) const
inline

Get geometry settings.

Returns
Geometry settings
const Ogre::Real& SkyX::VClouds::VClouds::getGlobalOpacity ( ) const
inline

Get global opacity.

Returns
Global opacity
LightningManager* SkyX::VClouds::VClouds::getLightningManager ( )
inline

Get lightning manager.

Returns
Lightning manager
const Ogre::Vector4& SkyX::VClouds::VClouds::getLightResponse ( ) const
inline

Get light response.

Returns
Light response
const Ogre::Real& SkyX::VClouds::VClouds::getNoiseScale ( ) const
inline

Get noise scale.

Returns
Noise scale
const RenderQueueGroups& SkyX::VClouds::VClouds::getRenderQueueGroups ( ) const
inline

Get render queue groups.

Returns
Current render queue groups

References SkyX::mRenderQueueGroups.

Ogre::SceneManager* SkyX::VClouds::VClouds::getSceneManager ( )
inline

Get scene manager.

Returns
Ogre::SceneManager pointer

References SkyX::mSceneManager.

const Ogre::Vector3& SkyX::VClouds::VClouds::getSunColor ( ) const
inline

Get sun color.

Returns
Sun color
const Ogre::Vector3& SkyX::VClouds::VClouds::getSunDirection ( ) const
inline

Get sun direction.

Returns
Sun direction

References SkyX::mSunDirection.

const Ogre::Vector2& SkyX::VClouds::VClouds::getWheater ( ) const
inline

Get wheater.

Returns
Wheater parameters: x = Humidity, y = Average clouds size, both un [0,1] range
const Ogre::Radian& SkyX::VClouds::VClouds::getWindDirection ( ) const
inline

Get wind direction.

Returns
Wind direction
const Ogre::Vector2 SkyX::VClouds::VClouds::getWindDirectionV2 ( ) const
inline

Get wind direction as a Vector2.

Returns
Wind direction
const float& SkyX::VClouds::VClouds::getWindSpeed ( ) const
inline

Get wind speed.

Returns
Wind speed
const bool& SkyX::VClouds::VClouds::isCreated ( ) const
inline

Has been create() already called?

Returns
true if created() have been already called, false if not

References SkyX::mCreated.

const bool& SkyX::VClouds::VClouds::isVisible ( ) const
inline

Is VClouds visible?

Returns
true if VClouds is visible, false otherwise

References SkyX::mVisible.

void SkyX::VClouds::VClouds::notifyCameraRender ( Ogre::Camera *  c,
const Ogre::Real &  timeSinceLastCameraFrame 
)

Notify camera render, to be invoked per-camera and per-frame.

Parameters
cRendering camera
timeSinceLastCameraFrameTime since last CAMERA frame
void SkyX::VClouds::VClouds::registerCamera ( Ogre::Camera *  c)

Register camera.

Parameters
cCamera
Remarks
If a rendering camera is used(in notifyCameraRender(...)) without having registered it before, all will work as expected but a warning will be logged since the user should manually unregister the camera one time it'll be remove
void SkyX::VClouds::VClouds::remove ( )

Remove.

void SkyX::VClouds::VClouds::setAmbientColor ( const Ogre::Vector3 &  AmbientColor)

Set ambient color.

Parameters
AmbientColorAmbient color
void SkyX::VClouds::VClouds::setAmbientFactors ( const Ogre::Vector4 &  AmbientFactors)

Set ambient factors.

Parameters
AmbientFactorsx - constant, y - linear, z - cuadratic, w - cubic
void SkyX::VClouds::VClouds::setCloudFieldScale ( const Ogre::Real &  CloudFieldScale)
inline

Set cloud field scale.

Parameters
CloudFieldScaleCloud field scale
void SkyX::VClouds::VClouds::setDistanceFallingParams ( const Ogre::Vector2 &  DistanceFallingParams)
inline

Set distance falling params.

Parameters
DistanceFallingParamsDistanceFallingParams.x = Distance falling factor (How much the cloud field geometry falls with the distance) Remember that the geometry falling is relative to the distance(height) between the camera and the cloud field. Typical range is [0, ~2] 0 = no falling DistanceFallingParams.y = Max falling (in world coords), useful when , i.e., you've water and you want to go in. That param will allow you to avoid the cloud field geometry falls into the ocean. -1 means not max falling. (default)
Remarks
See GoemetryBlock::_setVertexData(...) for more info
void SkyX::VClouds::VClouds::setEnabled ( bool  _enabled)

Set enable.

Parameters
_enabledtrue to set VClouds to be enabled, false to hide it
void SkyX::VClouds::VClouds::setGeometrySettings ( const GeometrySettings gs)
inline

Set geometry settings.

Parameters
GeometrySettingsGeometry settings
Remarks
Set geometry settings before call create(...)
void SkyX::VClouds::VClouds::setGlobalOpacity ( const Ogre::Real &  GlobalOpacity)
inline

Set global opacity.

Parameters
GlobalOpacityGlobal opacity: [0,1] range 0->Transparent cloud field
void SkyX::VClouds::VClouds::setLightResponse ( const Ogre::Vector4 &  LightResponse)

Set light response.

Parameters
LightResponsex - Sun light power y - Sun beta multiplier z - Ambient color multiplier w - Distance attenuation
void SkyX::VClouds::VClouds::setNoiseScale ( const Ogre::Real &  NoiseScale)
inline

Set noise scale.

Parameters
NoiseScaleNoise scale
void SkyX::VClouds::VClouds::setRenderQueueGroups ( const RenderQueueGroups rqg)

Set render queue groups.

Parameters
rqgRender queue groups
void SkyX::VClouds::VClouds::setSunColor ( const Ogre::Vector3 &  SunColor)

Set sun color.

Parameters
SunColorSun color
void SkyX::VClouds::VClouds::setSunDirection ( const Ogre::Vector3 &  SunDirection)
inline

Set sun direction.

Parameters
SunDirectionSun direction

References SkyX::mSunDirection.

void SkyX::VClouds::VClouds::setVisible ( const bool &  visible)

Set visible.

Parameters
visibletrue to set VClouds visible, false to hide it
void SkyX::VClouds::VClouds::setWheater ( const float &  Humidity,
const float &  AverageCloudsSize,
const bool &  DelayedResponse 
)

Set wheater parameters Use this funtion to update the cloud field parameters, you'll get a smart and smooth transition from your old setting to your new ones.

Parameters
HumidityHumidity, in other words: the percentage of clouds in [0,1] range.
AverageCloudsSizeAverage clouds size, for example: if previous wheater clouds size parameter was very different from new one(i.e: more little) only the old biggest clouds are going to be keept and the little ones are going to be replaced
DelayedResponsefalse to change wheather conditions over several updates, true to change it at the moment
void SkyX::VClouds::VClouds::setWindDirection ( const Ogre::Radian &  WindDirection)
inline

Set wind direction.

Parameters
WindDirectionWind direction
void SkyX::VClouds::VClouds::setWindSpeed ( const float &  WindSpeed)
inline

Set wind speed.

Parameters
WindSpeedWind speed
void SkyX::VClouds::VClouds::unregisterCamera ( Ogre::Camera *  c)

Unregister camera.

Parameters
cCamera
Remarks
After having used a camera (i.e. before removing the camera), the user should manually unregister it
void SkyX::VClouds::VClouds::update ( const Ogre::Real &  timeSinceLastFrame)

Update, to be invoked per frame.

Parameters
timeSinceLastFrameTime since last frame

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