RigsofRods
Soft-body Physics Simulation
|
#include <VClouds.h>
Data Structures | |
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... | |
void | create () |
Create. More... | |
void | create (const GeometrySettings &gs) |
Create. More... | |
void | create (const Ogre::Vector2 &Height, const float &Radius) |
Create. More... | |
void | remove () |
Remove. More... | |
void | update (const Ogre::Real &timeSinceLastFrame) |
Update, to be invoked per frame. 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 | unregisterCamera (Ogre::Camera *c) |
Unregister camera. More... | |
const bool & | isCreated () const |
Has been create() already called? More... | |
void | setGeometrySettings (const GeometrySettings &gs) |
Set geometry settings. More... | |
const GeometrySettings & | getGeometrySettings () const |
Get geometry settings. More... | |
void | setDistanceFallingParams (const Ogre::Vector2 &DistanceFallingParams) |
Set distance falling params. More... | |
const Ogre::Vector2 & | getDistanceFallingParams () const |
Get distance falling params. More... | |
void | setRenderQueueGroups (const RenderQueueGroups &rqg) |
Set render queue groups. More... | |
const RenderQueueGroups & | getRenderQueueGroups () const |
Get render queue groups. More... | |
void | setWindDirection (const Ogre::Radian &WindDirection) |
Set wind direction. More... | |
const Ogre::Radian & | getWindDirection () const |
Get wind direction. More... | |
const Ogre::Vector2 | getWindDirectionV2 () const |
Get wind direction as a Vector2. More... | |
void | setWindSpeed (const float &WindSpeed) |
Set wind speed. More... | |
const float & | getWindSpeed () const |
Get wind speed. More... | |
void | setSunDirection (const Ogre::Vector3 &SunDirection) |
Set sun direction. More... | |
const Ogre::Vector3 & | getSunDirection () const |
Get sun direction. More... | |
void | setSunColor (const Ogre::Vector3 &SunColor) |
Set sun color. More... | |
const Ogre::Vector3 & | getSunColor () const |
Get sun color. More... | |
void | setAmbientColor (const Ogre::Vector3 &AmbientColor) |
Set ambient color. More... | |
const Ogre::Vector3 & | getAmbientColor () const |
Get Ambient color. More... | |
void | setLightResponse (const Ogre::Vector4 &LightResponse) |
Set light response. More... | |
const Ogre::Vector4 & | getLightResponse () const |
Get light response. More... | |
void | setAmbientFactors (const Ogre::Vector4 &AmbientFactors) |
Set ambient factors. More... | |
const Ogre::Vector4 & | getAmbientFactors () const |
Get ambient factors. More... | |
void | setGlobalOpacity (const Ogre::Real &GlobalOpacity) |
Set global opacity. More... | |
const Ogre::Real & | getGlobalOpacity () const |
Get global opacity. More... | |
void | setCloudFieldScale (const Ogre::Real &CloudFieldScale) |
Set cloud field scale. More... | |
const Ogre::Real & | getCloudFieldScale () const |
Get cloud field scale. More... | |
void | setNoiseScale (const Ogre::Real &NoiseScale) |
Set noise scale. More... | |
const Ogre::Real & | getNoiseScale () const |
Get noise scale. 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... | |
const Ogre::Vector2 & | getWheater () const |
Get wheater. More... | |
void | setVisible (const bool &visible) |
Set visible. More... | |
const bool & | isVisible () const |
Is VClouds visible? More... | |
Ogre::SceneManager * | getSceneManager () |
Get scene manager. More... | |
Ogre::Camera * | getCamera () |
Get current rendering camera. More... | |
DataManager * | getDataManager () |
Get data manager. More... | |
GeometryManager * | getGeometryManager () |
Get geometry manager. More... | |
LightningManager * | getLightningManager () |
Get lightning manager. More... | |
std::vector< CameraData > & | _getCamerasData () |
Get cameras data. More... | |
Private Attributes | |
bool | mCreated |
Has been create(...) already called? More... | |
GeometrySettings | mGeometrySettings |
Geometry settings. More... | |
Ogre::Vector2 | mDistanceFallingParams |
Geometry distance falling params. More... | |
RenderQueueGroups | mRenderQueueGroups |
Render queue groups. More... | |
Ogre::Radian | mWindDirection |
Wind direction. More... | |
float | mWindSpeed |
Wind speed. More... | |
Ogre::Vector2 | mWheater |
Wheater parameters: x = Humidity, y = Average clouds size, both un [0,1] range. More... | |
bool | mDelayedResponse |
Delayed response (This param is stored to allow the user call setWheater(...) before create() ) More... | |
Ogre::Vector3 | mSunDirection |
Sun direction. More... | |
Ogre::Vector3 | mSunColor |
Sun color. More... | |
Ogre::Vector3 | mAmbientColor |
Ambient color. More... | |
Ogre::Vector4 | mLightResponse |
Light response: x - Sun light power y - Sun beta multiplier z - Ambient color multiplier w - Distance attenuation. More... | |
Ogre::Vector4 | mAmbientFactors |
Ambient factors x - constant, y - linear, z - cuadratic, w - cubic. More... | |
float | mGlobalOpacity |
Global opacity. More... | |
float | mCloudFieldScale |
Cloud field scale. More... | |
float | mNoiseScale |
Noise scale. More... | |
bool | mVisible |
Is VClouds visible? More... | |
DataManager * | mDataManager |
Data manager. More... | |
GeometryManager * | mGeometryManager |
Geometry manager. More... | |
LightningManager * | mLightningManager |
Lightning manager. More... | |
Ogre::SceneManager * | mSceneManager |
Ogre::SceneManager pointer. More... | |
Ogre::Camera * | mCamera |
Current rendering camera. More... | |
Ogre::MaterialPtr | mVolCloudsMaterial |
Vol. clouds material. More... | |
Ogre::MaterialPtr | mVolCloudsLightningMaterial |
Vol. clouds + lightning material. More... | |
std::vector< CameraData > | mCamerasData |
Cameras data. More... | |
SkyX::VClouds::VClouds::VClouds | ( | Ogre::SceneManager * | sm | ) |
SkyX::VClouds::VClouds::~VClouds | ( | ) |
|
inline |
void SkyX::VClouds::VClouds::create | ( | ) |
Create.
Definition at line 68 of file VClouds.cpp.
void SkyX::VClouds::VClouds::create | ( | const GeometrySettings & | gs | ) |
Create.
gs | Geometry settings |
Definition at line 110 of file VClouds.cpp.
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 |
Definition at line 118 of file VClouds.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get distance falling params.
Definition at line 247 of file VClouds.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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 |
Definition at line 174 of file VClouds.cpp.
void SkyX::VClouds::VClouds::registerCamera | ( | Ogre::Camera * | c | ) |
Register camera.
c | Camera |
Definition at line 207 of file VClouds.cpp.
void SkyX::VClouds::VClouds::remove | ( | ) |
Remove.
Definition at line 127 of file VClouds.cpp.
void SkyX::VClouds::VClouds::setAmbientColor | ( | const Ogre::Vector3 & | AmbientColor | ) |
Set ambient color.
AmbientColor | Ambient color |
Definition at line 272 of file VClouds.cpp.
void SkyX::VClouds::VClouds::setAmbientFactors | ( | const Ogre::Vector4 & | AmbientFactors | ) |
Set ambient factors.
AmbientFactors | x - constant, y - linear, z - cuadratic, w - cubic |
Definition at line 302 of file VClouds.cpp.
|
inline |
|
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) |
|
inline |
Set geometry settings.
GeometrySettings | Geometry settings |
|
inline |
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 |
Definition at line 287 of file VClouds.cpp.
|
inline |
void SkyX::VClouds::VClouds::setRenderQueueGroups | ( | const RenderQueueGroups & | rqg | ) |
Set render queue groups.
rqg | Render queue groups |
Definition at line 245 of file VClouds.cpp.
void SkyX::VClouds::VClouds::setSunColor | ( | const Ogre::Vector3 & | SunColor | ) |
Set sun color.
SunColor | Sun color |
Definition at line 257 of file VClouds.cpp.
|
inline |
void SkyX::VClouds::VClouds::setVisible | ( | const bool & | visible | ) |
Set visible.
visible | true to set VClouds visible, false to hide it |
Definition at line 232 of file VClouds.cpp.
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 |
Definition at line 317 of file VClouds.cpp.
|
inline |
|
inline |
void SkyX::VClouds::VClouds::unregisterCamera | ( | Ogre::Camera * | c | ) |
Unregister camera.
c | Camera |
Definition at line 220 of file VClouds.cpp.
void SkyX::VClouds::VClouds::update | ( | const Ogre::Real & | timeSinceLastFrame | ) |
Update, to be invoked per frame.
timeSinceLastFrame | Time since last frame |
Definition at line 147 of file VClouds.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |