|
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
24 #ifndef _SkyX_VClouds_VClouds_H_
25 #define _SkyX_VClouds_VClouds_H_
27 #include "Prerequisites.h"
33 namespace SkyX {
namespace VClouds{
47 inline RenderQueueGroups(
const Ogre::uint8& vc,
const Ogre::uint8& vclu,
const Ogre::uint8& vclo)
97 const Ogre::Radian& _Alpha = Ogre::Degree(12),
const Ogre::Radian& _Beta = Ogre::Degree(40),
98 const int& _NumberOfBlocks = 12,
const int& _Na = 10,
const int& _Nb = 8,
const int& _Nc = 6)
103 ,
Na(_Na),
Nb(_Nb),
Nc(_Nc)
147 VClouds(Ogre::SceneManager *sm);
166 void create(
const Ogre::Vector2& Height,
const float& Radius);
175 void update(
const Ogre::Real& timeSinceLastFrame);
433 void setWheater(
const float& Humidity,
const float& AverageCloudsSize,
const bool& DelayedResponse);
const Ogre::Real & getNoiseScale() const
Get noise scale.
Ogre::Vector2 Height
Height: x = Altitude over the camera, y: Field height (both in world coordinates)
void setNoiseScale(const Ogre::Real &NoiseScale)
Set noise scale.
const Ogre::Vector4 & getLightResponse() const
Get light response.
void registerCamera(Ogre::Camera *c)
Register camera.
Ogre::Vector3 mAmbientColor
Ambient color.
std::vector< CameraData > mCamerasData
Cameras data.
int NumberOfBlocks
Number of blocks.
void update(const Ogre::Real &timeSinceLastFrame)
Update, to be invoked per frame.
const RenderQueueGroups & getRenderQueueGroups() const
Get render queue groups.
Ogre::uint8 vclouds
VClouds render queue group.
Ogre::Radian mWindDirection
Wind direction.
Ogre::Radian Alpha
Angles.
GeometrySettings mGeometrySettings
Geometry settings.
void setLightResponse(const Ogre::Vector4 &LightResponse)
Set light response.
Ogre::MaterialPtr mVolCloudsLightningMaterial
Vol. clouds + lightning material.
std::vector< CameraData > & _getCamerasData()
Get cameras data.
const Ogre::Real & getCloudFieldScale() const
Get cloud field scale.
Ogre::Vector2 mWheater
Wheater parameters: x = Humidity, y = Average clouds size, both un [0,1] range.
float mNoiseScale
Noise scale.
CameraData(Ogre::Camera *c)
Constructor.
const Ogre::Vector3 & getSunColor() const
Get sun color.
RenderQueueGroups(const Ogre::uint8 &vc, const Ogre::uint8 &vclu, const Ogre::uint8 &vclo)
Constructor.
void setDistanceFallingParams(const Ogre::Vector2 &DistanceFallingParams)
Set distance falling params.
CameraData()
Default constructor.
bool mCreated
Has been create(...) already called?
void setRenderQueueGroups(const RenderQueueGroups &rqg)
Set render queue groups.
void setGeometrySettings(const GeometrySettings &gs)
Set geometry settings.
bool mDelayedResponse
Delayed response (This param is stored to allow the user call setWheater(...) before create() )
RenderQueueGroups mRenderQueueGroups
Render queue groups.
GeometryManager * mGeometryManager
Geometry manager.
const Ogre::Radian & getWindDirection() const
Get wind direction.
Ogre::SceneManager * mSceneManager
Ogre::SceneManager pointer.
const bool & isVisible() const
Is VClouds visible?
LightningManager * getLightningManager()
Get lightning manager.
void notifyCameraRender(Ogre::Camera *c, const Ogre::Real &timeSinceLastCameraFrame)
Notify camera render, to be invoked per-camera and per-frame.
void setWindSpeed(const float &WindSpeed)
Set wind speed.
Ogre::Vector4 mAmbientFactors
Ambient factors x - constant, y - linear, z - cuadratic, w - cubic.
const Ogre::Vector2 & getWheater() const
Get wheater.
const Ogre::Vector3 & getSunDirection() const
Get sun direction.
Ogre::Vector3 mSunColor
Sun color.
LightningManager * mLightningManager
Lightning manager.
const Ogre::Vector3 & getAmbientColor() const
Get Ambient color.
Ogre::MaterialPtr mVolCloudsMaterial
Vol. clouds material.
bool mVisible
Is VClouds visible?
const GeometrySettings & getGeometrySettings() const
Get geometry settings.
Ogre::Vector4 mLightResponse
Light response: x - Sun light power y - Sun beta multiplier z - Ambient color multiplier w - Distance...
void setSunColor(const Ogre::Vector3 &SunColor)
Set sun color.
void setVisible(const bool &visible)
Set visible.
GeometrySettings()
Default constructor.
const Ogre::Vector2 & getDistanceFallingParams() const
Get distance falling params.
const Ogre::Real & getGlobalOpacity() const
Get global opacity.
VClouds(Ogre::SceneManager *sm)
Simple constructor.
Ogre::Vector3 lastPosition
Last camera position.
Ogre::Vector2 cameraOffset
Camera offset.
int Na
Number of slices per geometry zone.
Ogre::Vector2 mDistanceFallingParams
Geometry distance falling params.
GeometryManager * getGeometryManager()
Get geometry manager.
void setAmbientFactors(const Ogre::Vector4 &AmbientFactors)
Set ambient factors.
void setCloudFieldScale(const Ogre::Real &CloudFieldScale)
Set cloud field scale.
GeometrySettings(const Ogre::Vector2 &_Height, const float &_Radius, const Ogre::Radian &_Alpha=Ogre::Degree(12), const Ogre::Radian &_Beta=Ogre::Degree(40), const int &_NumberOfBlocks=12, const int &_Na=10, const int &_Nb=8, const int &_Nc=6)
Constructor.
Ogre::uint8 vcloudsLightningsOver
VClouds lightnings render queue group (when the camera is over the cloud field)
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 ...
float mWindSpeed
Wind speed.
Ogre::Camera * getCamera()
Get current rendering camera.
Ogre::Vector3 geometryDisplacement
Geometry displacement.
void setSunDirection(const Ogre::Vector3 &SunDirection)
Set sun direction.
Ogre::Camera * mCamera
Current rendering camera.
void setGlobalOpacity(const Ogre::Real &GlobalOpacity)
Set global opacity.
DataManager * getDataManager()
Get data manager.
DataManager * mDataManager
Data manager.
const Ogre::Vector4 & getAmbientFactors() const
Get ambient factors.
void setWindDirection(const Ogre::Radian &WindDirection)
Set wind direction.
const float & getWindSpeed() const
Get wind speed.
const Ogre::Vector2 getWindDirectionV2() const
Get wind direction as a Vector2.
void unregisterCamera(Ogre::Camera *c)
Unregister camera.
Ogre::SceneManager * getSceneManager()
Get scene manager.
Ogre::Vector3 mSunDirection
Sun direction.
Ogre::uint8 vcloudsLightningsUnder
VClouds lightnings render queue group (when the camera is under the cloud field)
float mGlobalOpacity
Global opacity.
Ogre::Camera * camera
Camera.
float mCloudFieldScale
Cloud field scale.
void setAmbientColor(const Ogre::Vector3 &AmbientColor)
Set ambient color.
const bool & isCreated() const
Has been create() already called?