RigsofRods
Soft-body Physics Simulation
Public Member Functions | Private Member Functions | Private Attributes
SkyX::VCloudsManager Class Reference

#include <VCloudsManager.h>

+ Collaboration diagram for SkyX::VCloudsManager:

Public Member Functions

 VCloudsManager (SkyX *s)
 Constructor. More...
 
 ~VCloudsManager ()
 Destructor. More...
 
void create (const Ogre::Real &radius=-1)
 Create all resources. More...
 
void update (const Ogre::Real &timeSinceLastFrame)
 Update. More...
 
void notifyCameraRender (Ogre::Camera *c)
 Notify camera render, to be invoked per-camera and per-frame. More...
 
void remove ()
 Remove all resources. More...
 
void setAmbientGradient (const ColorGradient &AmbientGradient)
 Set ambient gradient. More...
 
const ColorGradientgetAmbientGradient () const
 Get ambient color gradient. More...
 
void setSunGradient (const ColorGradient &SunGradient)
 Set sun gradient. More...
 
const ColorGradientgetSunGradient () const
 Get sun color gradient. More...
 
void setHeight (const Ogre::Vector2 &Height)
 Set height parameters. More...
 
const Ogre::Vector2 & getHeight () const
 Get height parameters. More...
 
void setAutoupdate (const bool &Autoupdate)
 Autoupdate volumetric clouds wind depending of the SkyX time multiplier. More...
 
const bool & getAutoupdate () const
 Get autoupdate. More...
 
void setWindSpeed (const Ogre::Real &WindSpeed)
 Set wind speed. More...
 
const Ogre::Real & getWindSpeed () const
 Get wind speed. More...
 
VClouds::VCloudsgetVClouds ()
 Get VClouds. More...
 
const bool & isCreated () const
 Is moon manager created? More...
 
void _updateWindSpeedConfig ()
 Update wind speed config. More...
 

Private Member Functions

void _setLightParameters ()
 Set light parameters. More...
 

Private Attributes

ColorGradient mAmbientGradient
 Ambient and Sun color gradients. More...
 
ColorGradient mSunGradient
 
VClouds::VCloudsmVClouds
 VClouds pointer. More...
 
Ogre::Vector2 mHeight
 Height parameters, x = Cloud field y-coord start, y: Field height (both in world coordinates) More...
 
bool mAutoupdate
 Autoupdate wind speed depending of skyx time multiplier? More...
 
Ogre::Real mWindSpeed
 Wind speed. More...
 
bool mCreated
 Is vclouds manager created? More...
 
Ogre::Real mCurrentTimeSinceLastFrame
 Current time since last frame. More...
 
SkyXmSkyX
 SkyX parent pointer. More...
 

Detailed Description

Definition at line 36 of file VCloudsManager.h.

Constructor & Destructor Documentation

◆ VCloudsManager()

SkyX::VCloudsManager::VCloudsManager ( SkyX s)

Constructor.

Parameters
sParent SkyX pointer

Definition at line 30 of file VCloudsManager.cpp.

+ Here is the call graph for this function:

◆ ~VCloudsManager()

SkyX::VCloudsManager::~VCloudsManager ( )

Destructor.

Definition at line 64 of file VCloudsManager.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ _setLightParameters()

void SkyX::VCloudsManager::_setLightParameters ( )
private

Set light parameters.

Definition at line 128 of file VCloudsManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _updateWindSpeedConfig()

void SkyX::VCloudsManager::_updateWindSpeedConfig ( )

Update wind speed config.

Remarks
Only for internal use

Definition at line 146 of file VCloudsManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

void SkyX::VCloudsManager::create ( const Ogre::Real &  radius = -1)

Create all resources.

Parameters
radiusVolumetric cloud field radius, -1 to use current VClouds::mGeometrySettings::Radius

Definition at line 71 of file VCloudsManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAmbientGradient()

const ColorGradient& SkyX::VCloudsManager::getAmbientGradient ( ) const
inline

Get ambient color gradient.

Returns
Ambient color gradient

Definition at line 80 of file VCloudsManager.h.

◆ getAutoupdate()

const bool& SkyX::VCloudsManager::getAutoupdate ( ) const
inline

Get autoupdate.

Returns
true if you want to update volumetric clouds wind depending of the SkyX time multiplier

Definition at line 131 of file VCloudsManager.h.

◆ getHeight()

const Ogre::Vector2& SkyX::VCloudsManager::getHeight ( ) const
inline

Get height parameters.

Returns
Height: x = Cloud field y-coord start, y: Field height (both in world coordinates)

Definition at line 114 of file VCloudsManager.h.

◆ getSunGradient()

const ColorGradient& SkyX::VCloudsManager::getSunGradient ( ) const
inline

Get sun color gradient.

Returns
Sun color gradient

Definition at line 96 of file VCloudsManager.h.

◆ getVClouds()

VClouds::VClouds* SkyX::VCloudsManager::getVClouds ( )
inline

Get VClouds.

Definition at line 155 of file VCloudsManager.h.

+ Here is the caller graph for this function:

◆ getWindSpeed()

const Ogre::Real& SkyX::VCloudsManager::getWindSpeed ( ) const
inline

Get wind speed.

Returns
Wind speed

Definition at line 148 of file VCloudsManager.h.

◆ isCreated()

const bool& SkyX::VCloudsManager::isCreated ( ) const
inline

Is moon manager created?

Returns
true if yes, false if not

Definition at line 163 of file VCloudsManager.h.

+ Here is the caller graph for this function:

◆ notifyCameraRender()

void SkyX::VCloudsManager::notifyCameraRender ( Ogre::Camera *  c)

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

Parameters
cRendering camera
Remarks
The VClouds system needs the CAMERA time since last frame, so here we assume that all render targets are being updated one time per frame(in other words, all render targets are being updated at the same rate)

Definition at line 106 of file VCloudsManager.cpp.

+ Here is the call graph for this function:

◆ remove()

void SkyX::VCloudsManager::remove ( )

Remove all resources.

Definition at line 116 of file VCloudsManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAmbientGradient()

void SkyX::VCloudsManager::setAmbientGradient ( const ColorGradient AmbientGradient)
inline

Set ambient gradient.

Parameters
AmbientGradientAmbient color gradient

Definition at line 72 of file VCloudsManager.h.

◆ setAutoupdate()

void SkyX::VCloudsManager::setAutoupdate ( const bool &  Autoupdate)
inline

Autoupdate volumetric clouds wind depending of the SkyX time multiplier.

Remarks
You can use VClouds->setWindSpeed(..) for different winds speeds

Definition at line 122 of file VCloudsManager.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHeight()

void SkyX::VCloudsManager::setHeight ( const Ogre::Vector2 &  Height)
inline

Set height parameters.

Parameters
Heightx = Cloud field y-coord start, y: Field height (both in world coordinates)
Remarks
Call it before create(), for now... For autocalculated height based on the radius length set (-1,-1) as height params

Definition at line 106 of file VCloudsManager.h.

+ Here is the caller graph for this function:

◆ setSunGradient()

void SkyX::VCloudsManager::setSunGradient ( const ColorGradient SunGradient)
inline

Set sun gradient.

Parameters
SunGradientSun color gradient

Definition at line 88 of file VCloudsManager.h.

◆ setWindSpeed()

void SkyX::VCloudsManager::setWindSpeed ( const Ogre::Real &  WindSpeed)
inline

Set wind speed.

Parameters
WindSpeedWind speed

Definition at line 139 of file VCloudsManager.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

void SkyX::VCloudsManager::update ( const Ogre::Real &  timeSinceLastFrame)

Update.

Parameters
timeSinceLastFrameTime since last frame

Definition at line 92 of file VCloudsManager.cpp.

+ Here is the call graph for this function:

Field Documentation

◆ mAmbientGradient

ColorGradient SkyX::VCloudsManager::mAmbientGradient
private

Ambient and Sun color gradients.

Definition at line 179 of file VCloudsManager.h.

◆ mAutoupdate

bool SkyX::VCloudsManager::mAutoupdate
private

Autoupdate wind speed depending of skyx time multiplier?

Definition at line 189 of file VCloudsManager.h.

◆ mCreated

bool SkyX::VCloudsManager::mCreated
private

Is vclouds manager created?

Definition at line 194 of file VCloudsManager.h.

◆ mCurrentTimeSinceLastFrame

Ogre::Real SkyX::VCloudsManager::mCurrentTimeSinceLastFrame
private

Current time since last frame.

Definition at line 197 of file VCloudsManager.h.

◆ mHeight

Ogre::Vector2 SkyX::VCloudsManager::mHeight
private

Height parameters, x = Cloud field y-coord start, y: Field height (both in world coordinates)

Definition at line 186 of file VCloudsManager.h.

◆ mSkyX

SkyX* SkyX::VCloudsManager::mSkyX
private

SkyX parent pointer.

Definition at line 200 of file VCloudsManager.h.

◆ mSunGradient

ColorGradient SkyX::VCloudsManager::mSunGradient
private

Definition at line 180 of file VCloudsManager.h.

◆ mVClouds

VClouds::VClouds* SkyX::VCloudsManager::mVClouds
private

VClouds pointer.

Definition at line 183 of file VCloudsManager.h.

◆ mWindSpeed

Ogre::Real SkyX::VCloudsManager::mWindSpeed
private

Wind speed.

Definition at line 191 of file VCloudsManager.h.


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