#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... | |
DataManager * | getDataManager () |
Get data manager. More... | |
const Ogre::Vector2 & | getDistanceFallingParams () const |
Get distance falling params. More... | |
GeometryManager * | getGeometryManager () |
Get geometry manager. More... | |
const GeometrySettings & | getGeometrySettings () const |
Get geometry settings. More... | |
const Ogre::Real & | getGlobalOpacity () const |
Get global opacity. More... | |
LightningManager * | getLightningManager () |
Get lightning manager. More... | |
const Ogre::Vector4 & | getLightResponse () const |
Get light response. More... | |
const Ogre::Real & | getNoiseScale () const |
Get noise scale. More... | |
const RenderQueueGroups & | getRenderQueueGroups () 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... | |
SkyX::VClouds::VClouds::VClouds | ( | Ogre::SceneManager * | sm | ) |
Simple constructor.
sm | Scene manager |
SkyX::VClouds::VClouds::~VClouds | ( | ) |
Destructor.
|
inline |
Get cameras data.
void SkyX::VClouds::VClouds::create | ( | ) |
Create.
void SkyX::VClouds::VClouds::create | ( | const GeometrySettings & | gs | ) |
Create.
gs | Geometry settings |
void SkyX::VClouds::VClouds::create | ( | const Ogre::Vector2 & | Height, |
const float & | Radius | ||
) |
Create.
Height | x = Cloud field y-coord start, y: Field height (both in world coordinates) |
Radius | Radius |
|
inline |
Get Ambient color.
|
inline |
Get ambient factors.
|
inline |
|
inline |
Get cloud field scale.
|
inline |
Get data manager.
|
inline |
Get distance falling params.
|
inline |
Get geometry manager.
|
inline |
Get geometry settings.
|
inline |
Get global opacity.
|
inline |
Get lightning manager.
|
inline |
Get light response.
|
inline |
Get noise scale.
|
inline |
|
inline |
|
inline |
Get sun color.
|
inline |
|
inline |
Get wheater.
|
inline |
Get wind direction.
|
inline |
Get wind direction as a Vector2.
|
inline |
Get wind speed.
|
inline |
Has been create() already called?
References SkyX::mCreated.
|
inline |
void SkyX::VClouds::VClouds::notifyCameraRender | ( | Ogre::Camera * | c, |
const Ogre::Real & | timeSinceLastCameraFrame | ||
) |
Notify camera render, to be invoked per-camera and per-frame.
c | Rendering camera |
timeSinceLastCameraFrame | Time since last CAMERA frame |
void SkyX::VClouds::VClouds::registerCamera | ( | Ogre::Camera * | c | ) |
Register camera.
c | Camera |
void SkyX::VClouds::VClouds::remove | ( | ) |
Remove.
void SkyX::VClouds::VClouds::setAmbientColor | ( | const Ogre::Vector3 & | AmbientColor | ) |
Set ambient color.
AmbientColor | Ambient color |
void SkyX::VClouds::VClouds::setAmbientFactors | ( | const Ogre::Vector4 & | AmbientFactors | ) |
Set ambient factors.
AmbientFactors | x - constant, y - linear, z - cuadratic, w - cubic |
|
inline |
Set cloud field scale.
CloudFieldScale | Cloud field scale |
|
inline |
Set distance falling params.
DistanceFallingParams | 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) |
void SkyX::VClouds::VClouds::setEnabled | ( | bool | _enabled | ) |
Set enable.
_enabled | true to set VClouds to be enabled, false to hide it |
|
inline |
Set geometry settings.
GeometrySettings | Geometry settings |
|
inline |
Set global opacity.
GlobalOpacity | Global opacity: [0,1] range 0->Transparent cloud field |
void SkyX::VClouds::VClouds::setLightResponse | ( | const Ogre::Vector4 & | LightResponse | ) |
Set light response.
LightResponse | x - Sun light power y - Sun beta multiplier z - Ambient color multiplier w - Distance attenuation |
|
inline |
Set noise scale.
NoiseScale | Noise scale |
void SkyX::VClouds::VClouds::setRenderQueueGroups | ( | const RenderQueueGroups & | rqg | ) |
Set render queue groups.
rqg | Render queue groups |
void SkyX::VClouds::VClouds::setSunColor | ( | const Ogre::Vector3 & | SunColor | ) |
Set sun color.
SunColor | Sun color |
|
inline |
void SkyX::VClouds::VClouds::setVisible | ( | const bool & | visible | ) |
Set visible.
visible | true 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.
Humidity | Humidity, in other words: the percentage of clouds in [0,1] range. |
AverageCloudsSize | Average 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 |
DelayedResponse | false to change wheather conditions over several updates, true to change it at the moment |
|
inline |
Set wind direction.
WindDirection | Wind direction |
|
inline |
Set wind speed.
WindSpeed | Wind speed |
void SkyX::VClouds::VClouds::unregisterCamera | ( | Ogre::Camera * | c | ) |
Unregister camera.
c | Camera |
void SkyX::VClouds::VClouds::update | ( | const Ogre::Real & | timeSinceLastFrame | ) |
Update, to be invoked per frame.
timeSinceLastFrame | Time since last frame |