All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Namespaces | Classes | Enumerations | Functions | Variables
SkyX Namespace Reference

Namespaces

 VClouds
 

Classes

class  Controller
 Controller base class. More...
 

Enumerations

enum  LightingMode { LM_LDR = 0, LM_HDR = 1 }
 Lighting mode enumeration SkyX is designed for true HDR rendering, but there is a big number of applications which don't use HDR rendering, due to this fact a little exponential tone-mapping algoritm is applied to SkyX materials if LM_LDR is selected. More...
 

Functions

 ~SkyX ()
 Destructor. More...
 
class __declspec (dllimport) SkyX
 SkyX class Create simple and beautiful skies! More...
 
const Ogre::Real & _getTimeOffset () const
 Get time offset. More...
 
void create ()
 Create SkyX. More...
 
bool frameStarted (const Ogre::FrameEvent &evt)
 Frame started. More...
 
AtmosphereManager * getAtmosphereManager ()
 Get atmosphere manager. More...
 
Ogre::Camera * getCamera ()
 Get current rendering camera. More...
 
bool getCloudsEnabled ()
 
CloudsManager * getCloudsManager ()
 Get clouds manager. More...
 
ControllergetController () const
 Get current controller. More...
 
const Ogre::Vector2 & getEastDirection () const
 Get east direction. More...
 
bool getEnabled ()
 
GPUManager * getGPUManager ()
 Get GPU manager. More...
 
const Ogre::Real & getInfiniteCameraFarClipDistance () const
 Get infinite cmaera far clip distance. More...
 
const LightingModegetLightingMode () const
 Get lighting mode. More...
 
MeshManager * getMeshManager ()
 Get mesh manager. More...
 
Ogre::Vector3 getMoonDirection ()
 Get moon direction. More...
 
bool getMoonEnabled ()
 
MoonManager * getMoonManager ()
 Get moon manager. More...
 
Ogre::Real getMoonPhase ()
 Get moon phase. More...
 
const RenderQueueGroups & getRenderQueueGroups () const
 Get render queue groups. More...
 
Ogre::SceneManager * getSceneManager ()
 Get scene manager. More...
 
Ogre::Vector3 getSunDirection ()
 Get sun direction. More...
 
const Ogre::Vector3 & getTime () const
 Get time. More...
 
const Ogre::Real & getTimeMultiplier () const
 Get time multiplier. More...
 
VCloudsManager * getVCloudsManager ()
 Get volumetric clouds manager. More...
 
bool isCreated () const
 Is SkyX created? More...
 
const bool & isStarfieldEnabled () const
 Is the starfield enable? More...
 
const bool & isVisible () const
 Is SkyX visible? More...
 
void notifyCameraRender (Ogre::Camera *c)
 Notify camera render (to be invoked per camera and per frame) More...
 
void preViewportUpdate (const Ogre::RenderTargetViewportEvent &evt)
 Fired before update a render target viewport. More...
 
void remove ()
 Remove SkyX (free resources) More...
 
void setCloudsEnabled (bool _enabled)
 
void setController (Controller *c)
 Set controller. More...
 
void setEastDirection (const Ogre::Vector2 &ed)
 Set eastn direction. More...
 
void setEnabled (bool _enabled)
 
void setInfiniteCameraFarClipDistance (const Ogre::Real &d)
 Set infinite camera far clip distance. More...
 
void setLightingMode (const LightingMode &lm)
 Set lighting mode. More...
 
void setMoonEnabled (bool _enabled)
 
void setMoonPhase (const Ogre::Real &mp)
 Set moon phase. More...
 
void setRenderQueueGroups (const RenderQueueGroups &rqg)
 Set render queue groups. More...
 
void setStarfieldEnabled (const bool &Enabled)
 Set the starfield enabled/disabled. More...
 
void setTime (const Ogre::Vector3 &t)
 Set time. More...
 
void setTimeMultiplier (const Ogre::Real &TimeMultiplier)
 Set time multiplier. More...
 
void setVisible (const bool &visible)
 Set visible. More...
 
 SkyX (Ogre::SceneManager *sm, Controller *c)
 Contructor. More...
 
class __declspec(dllimport)
BasicController void 
update (const Ogre::Real &simDeltaTime)
 Basic controller class. More...
 

Variables

AtmosphereManager * mAtmosphereManager
 Atmosphere manager. More...
 
Ogre::Camera * mCamera
 Current rendering camera. More...
 
bool mCloudsEnabled
 True if clouds are enabled. More...
 
CloudsManager * mCloudsManager
 Clouds manager. More...
 
ControllermController
 Controller. More...
 
bool mCreated
 Is SkyX created? More...
 
Ogre::Vector2 mEastDirection
 East direction (in X,Z world coords) More...
 
bool mEnabled
 True if skyx is enabled. More...
 
GPUManager * mGPUManager
 GPU manager. More...
 
Ogre::Real mInfiniteCameraFarClipDistance
 Infinite camera far clip distance. More...
 
Ogre::Real mLastCameraFarClipDistance
 Last camera far clip distance. More...
 
Ogre::Vector3 mLastCameraPosition
 Last camera position. More...
 
LightingMode mLightingMode
 Lighting mode. More...
 
MeshManager * mMeshManager
 Mesh manager. More...
 
Ogre::Vector3 mMoonDirection
 Moon direction. More...
 
bool mMoonEnabled
 True if moon is enabled. More...
 
MoonManager * mMoonManager
 Moon manager. More...
 
Ogre::Real mMoonPhase
 Moon phase. More...
 
RenderQueueGroups mRenderQueueGroups
 Render queue groups. More...
 
Ogre::SceneManager * mSceneManager
 Scene manager. More...
 
bool mStarfield
 Enable starfield? More...
 
Ogre::Vector3 mSunDirection
 Sun direction. More...
 
Ogre::Vector3 mTime
 Time information: x = time in [0, 24]h range, y = sunrise hour in [0, 24]h range, z = sunset hour in [0, 24] range. More...
 
Ogre::Real mTimeMultiplier
 Time multiplier. More...
 
Ogre::Real mTimeOffset
 Time offset. More...
 
VCloudsManager * mVCloudsManager
 Volumetric clouds manager. More...
 
bool mVisible
 Is SkyX visible? More...
 
Ogre::uint8 skydome
 Skydome render queue group (Note: Moon = skydome_render_queue+1) More...
 
Ogre::uint8 vclouds
 VClouds render queue group. More...
 
Ogre::uint8 vcloudsLightnings
 VClouds lightnings render queue group. More...
 

Enumeration Type Documentation

Lighting mode enumeration SkyX is designed for true HDR rendering, but there is a big number of applications which don't use HDR rendering, due to this fact a little exponential tone-mapping algoritm is applied to SkyX materials if LM_LDR is selected.

(See: AtmosphereManager::Options::Exposure) Select LM_HDR if your app is designed for true HDR rendering. In HDR mode, we assume you're ussing a full linear rendering pipeline, so all textures are gamma corrected if needed.

Enumerator
LM_LDR 

Low dynamic range.

LM_HDR 

High dynamic range.

Function Documentation

SkyX::~SkyX ( )

Destructor.

class SkyX::__declspec ( dllimport  )

SkyX class Create simple and beautiful skies!

Remarks
How to update SkyX: Updating SkyX is a very easy task that can be done manually or automatically by using listeners. There're two update steps in SkyX: per-frame update and per-camera update, and the order is very important. The per-frame update must be performed at first: SkyX::update(...), after that and before each camera render operation SkyX::notifyCameraRender(...) must be invoked. Both updates can be automatically performed by using listeners: the Ogre::FrameListener is used for the per-frame udpate, and the Ogre::RenderTargetListener is used for the per-camera update. For more information have a look to sample projects.Render queue groupsConstructor
Parameters
sSkydome render queue group (Note: Moon = skydome_render_queue+1)
vcVClouds render queue group
vclVClouds lightnings render queue group

Atmosphere options

Inner atmosphere radius

Outer atmosphere radius

Height position, in [0, 1] range, 0=InnerRadius, 1=OuterRadius

Rayleigh multiplier

Mie multiplier

Sun intensity

WaveLength for RGB channels

Phase function

Exposure coeficient

Number of samples

Default constructor

Constructor

Parameters
_InnerRadiusInner atmosphere radius
_OuterRadiusOuter atmosphere radius
_HeightPositionHeight position, in [0, 1] range, 0=InnerRadius, 1=OuterRadius
_RayleighMultiplierRayleigh multiplier
_MieMultiplierMie multiplier
_SunIntensitySun intensity
_WaveLengthWave length for RGB channels
_GPhase function
_ExposureExposure
_NumerOfSamplesNumber of samples

Constructor

Parameters
sParent SkyX pointer

Destructor

Set options

Parameters
_OptionsNew options

Get current options

Returns
Current options

Get current atmosphere color at the given direction

Parameters
DirectionNormalised direction
Returns
Atmosphere color at the especified direction

Update atmoshpere

Parameters
NewOptionsUpdate only the differences between actual parameters and new ones.
ForceToUpdateAllForces to upload all current parameters to skyx material.
Remarks
Current options parameters are updated if needed.

Shader scale funtion

Parameters
cosCos
uScaleDepthScale Depth
Returns
Scale

SkyX parent pointer

Our options

Cloud layer options

Cloud layer height

Cloud layer scale

Wind direction

Time multiplier

Distance attenuation

Detail attenuation

Cloud layer height volume(For volumetric effects on the gpu)

Volumetric displacement(For volumetric effects on the gpu)

Default constructor

Constructor

Parameters
_HeightCloud layer height
_ScaleClouds scale
_WindDirectionClouds movement direction
_TimeMultiplierTime multiplier factor

Constructor

Parameters
_HeightCloud layer height
_ScaleClouds scale
_WindDirectionClouds movement direction
_TimeMultiplierTime multiplier factor
_DistanceAttenuationDistance attenuation
_DetailAttenuationDetail attenuation
_HeightVolumeHeight volume(For volumetric effects on the gpu)
_VolumetricDisplacementVolumetric displacement(For volumetric effects on the gpu)

Default onstructor

Parameters
sSkyX parent pointer

Constructor

Parameters
sSkyX parent pointer
oCloud layer options

Destructor

Set options

Parameters
oNew options

Get options

Returns
Cloud layer options

Set ambient gradient

Parameters
AmbientGradientAmbient color gradient

Get ambient color gradient

Returns
Ambient color gradient

Set sun gradient

Parameters
SunGradientSun color gradient

Get sun color gradient

Returns
Sun color gradient

Register layer

Parameters
CloudLayerPassPass where register the cloud layer

Unregister cloud pass

Update internal cloud pass parameters

Update cloud pass parameters

SkyX parent pointer

Cloud layer options

Cloud layer pass

Ambient and Sun color gradients

Constructor

Parameters
sSkyX parent pointer

Destructor

Update cloud layers

Add a cloud layer

Parameters
oCloud layer options
Returns
Cloud layer

Remove the specified cloud layer

Remove all cloud layers

Register all

Unregister cloud layer

Parameters
clCloud layer to be unregistered

Unregister all cloud layers

Get cloud layers

Returns
Cloud layers

SkyX parent pointer

Cloud layers std::vector

Cloud layers iterator

Color frame type definition ColorFrame.first: Colour value ColorFrame.second: Position in the gradient [0,1] range

Constructor

Destructor

Add color frame

Parameters
CFrameColor frame

Clear color gradient

Get color value

Parameters
pThe gradient point in [0,1] range
Returns
Color at the given gradient position

Check bounds

Returns
false if the Color gradient is mal-formed

Mal formed color gradient?

Color frame vector

Gpu program enum

Constructor

Parameters
sParent SkyX pointer

Destructor

Add ground pass (Use for atmospheric scattering effect on the terrain)

Parameters
GroundPassGround pass
AtmosphereRaidusAtmosphere radius (typically far carmera clip plane)
SBTScene blend type

Set gpu program int parameter

Parameters
GpuPGpu program type (Vertex/Fragment)
Nameparam name
Valuevalue
UpdateGroundPassestrue to update ground passes

Set gpu program Ogre::Real parameter

Parameters
GpuPGpu program type (Vertex/Fragment)
Nameparam name
Valuevalue
UpdateGroundPassestrue to update ground passes

Set gpu program Ogre::Vector2 parameter

Parameters
GpuPGpu program type (Vertex/Fragment)
Nameparam name
Valuevalue
UpdateGroundPassestrue to update ground passes

Set gpu program Ogre::Vector3 parameter

Parameters
GpuPGpu program type (Vertex/Fragment)
Nameparam name
Valuevalue
UpdateGroundPassestrue to update ground passes

Get skydome material name

Returns
Skydome material name

Get moon material name

Returns
Moon material name

Update fragment program materials

Remarks
Only for internal use

Notify skydome material changed

Remarks
Only for internal use

SkyX parent pointer

Ground pass vector

Set texture HW gamma correction

Parameters
nTexture name
gTrue to enable gamma correction, false to disable it

Skydome material

Vertex struct

Constructor

Parameters
sParent SkyX pointer

Destructor

Create our water mesh, geometry, entity, etc...

Remarks
Call it after setMaterialName()

Remove all resources

Update geometry

Parameters
camCamera

Get mesh

Returns
Mesh

Get sub mesh

Returns
Sub mesh

Get entity

Returns
Entity

Get material name

Returns
Material name

Set mesh material

Parameters
MaterialNameThe material name

Get hardware vertex buffer reference

Returns
Ogre::HardwareVertexBufferSharedPtr reference

Get hardware index buffer reference

Returns
Ogre::HardwareIndexBufferSharedPtr reference

Get the Ogre::SceneNode pointer where Hydrax mesh is attached

Returns
Ogre::SceneNode*

Is _createGeometry() called?

Returns
true if created() have been already called

Set geometry parameters

Parameters
StepsSphere number of steps
CirclesSpehere number of circes

Get number of steps

Returns
Number of steps

Get number of circles

Returns
Number of circles

Set under-horizon rendering params

Remarks
In an ideal situation, you only must see the avobe horizon sky due to the fact that the terrain/water must be 'infinite' and the under-horizont sky part is hide. But, infinite terrain/water is not always implemented in games and 3d apps in general, so... in order to get a good-looking sky, SkyX provides an approach to render realistic under-horizont sky.
Parameters
UnderHorizonCirclesNumber of circles of SkyX::MeshManager::mCircles reserved for the under-horizont geometry part, 0 means not under-horizon rendering
UnderHorizonFadingtrue/false to fade or not the under-horizon sky
UnderHorizonFadingExponentExponent of the fading, pow(vertex_angle, exp), 1=linear
UnderHorizonFadingMultiplierFading multiplier, opacity = saturate(pow(opacity,fading_exp)*fading_multiplier)

Get under-horizon circles

Returns
Under-horizon circles

Get under-horizon fading

Returns
Under-horizon fading

Get under-horizon exponent fading

Returns
under-horizon exponent fading

Get under-horizon fading multiplier

Returns
Under-horizon fading multiplier

Set radius multiplier

Parameters
RadiusMultiplierRadius multiplier
Remarks
Radius multiplier in [0,1] range Radius = CameraFarClipDistance * RadiusMultiplier

Get skydome radius

Parameters
cCamera
Returns
Skydome radius relative to the given camera

Create geometry

Main SkyX pointer

Has been create() already called?

Ogre::MeshPtr

Ogre::Submesh pointer

Ogre::Entity pointer

Vertex buffer

Vertices

Index buffer

Ogre::SceneNode pointer

Steps

Circles

Under-horizon rendering

Under-horizon fading

Under-horizon exponent fading (1=linear fading)

Under-horizon fading multiplier: opacity = saturate(pow(opacity,fading_exp)*fading_multiplier)

Radius multiplier

Material name

Constructor

Parameters
sParent SkyX pointer

Destructor

Create all resources

Remove all resources

Update moon phase

Parameters
phaseMoon phase in [-1,1] range, where -1 means fully covered Moon, 0 clear Moon and 1 fully covered Moon

Update geometry

Parameters
cCamera

Get moon billboard

Returns
Moon billboard

Get moon scene node

Returns
Moon scene node

Set moon size

Parameters
MoonSizeMoon size

Get moon size

Returns
Moon size

Set moon halo intensity

Parameters
MoonHaloIntensityMoon halo intensity

Get moon halo intensity

Returns
Moon halo intensity

Set moon halo strength

Parameters
MoonHaloStrengthMoon halo strength (linear/exponential fading)

Get moon halo strength

Returns
Moon halo strength (linear/exponential fading)

Is moon manager created?

Returns
true if yes, false if not

Update moon bounds

Parameters
cCamera

SkyX parent pointer

Moon billboard

Moon scene node

Is moon manager created?

Moon size

Moon halo intensity

Moon halo strength

Moon material

True if visible

Constructor

Parameters
sParent SkyX pointer

Destructor

Create all resources

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

Update

Parameters
timeSinceLastFrameTime since last frame

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)

Remove all resources

Set ambient gradient

Parameters
AmbientGradientAmbient color gradient

Get ambient color gradient

Returns
Ambient color gradient

Set sun gradient

Parameters
SunGradientSun color gradient

Get sun color gradient

Returns
Sun color gradient

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

Get height parameters

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

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

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

Get autoupdate

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

Set wind speed

Parameters
WindSpeedWind speed

Get wind speed

Returns
Wind speed

Get VClouds

Is moon manager created?

Returns
true if yes, false if not

Update wind speed config

Remarks
Only for internal use

Set light parameters

SkyX parent pointer

VClouds pointer

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

Wind speed

Autoupdate wind speed depending of skyx time multiplier?

Is vclouds manager created?

Current time since last frame

Ambient and Sun color gradients

Cloud layer options

Cloud layer height

Cloud layer scale

Wind direction

Time multiplier

Distance attenuation

Detail attenuation

Cloud layer height volume(For volumetric effects on the gpu)

Volumetric displacement(For volumetric effects on the gpu)

Default constructor

Constructor

Parameters
_HeightCloud layer height
_ScaleClouds scale
_WindDirectionClouds movement direction
_TimeMultiplierTime multiplier factor

Constructor

Parameters
_HeightCloud layer height
_ScaleClouds scale
_WindDirectionClouds movement direction
_TimeMultiplierTime multiplier factor
_DistanceAttenuationDistance attenuation
_DetailAttenuationDetail attenuation
_HeightVolumeHeight volume(For volumetric effects on the gpu)
_VolumetricDisplacementVolumetric displacement(For volumetric effects on the gpu)

Default onstructor

Parameters
sSkyX parent pointer

Constructor

Parameters
sSkyX parent pointer
oCloud layer options

Destructor

Set options

Parameters
oNew options

Get options

Returns
Cloud layer options

Set ambient gradient

Parameters
AmbientGradientAmbient color gradient

Get ambient color gradient

Returns
Ambient color gradient

Set sun gradient

Parameters
SunGradientSun color gradient

Get sun color gradient

Returns
Sun color gradient

Register layer

Parameters
CloudLayerPassPass where register the cloud layer

Unregister cloud pass

Update internal cloud pass parameters

Update cloud pass parameters

SkyX parent pointer

Cloud layer options

Cloud layer pass

Ambient and Sun color gradients

Constructor

Parameters
sSkyX parent pointer

Destructor

Update cloud layers

Add a cloud layer

Parameters
oCloud layer options
Returns
Cloud layer

Remove the specified cloud layer

Remove all cloud layers

Register all

Unregister cloud layer

Parameters
clCloud layer to be unregistered

Unregister all cloud layers

Get cloud layers

Returns
Cloud layers

SkyX parent pointer

Cloud layers std::vector

Cloud layers iterator

Color frame type definition ColorFrame.first: Colour value ColorFrame.second: Position in the gradient [0,1] range

Constructor

Destructor

Add color frame

Parameters
CFrameColor frame

Clear color gradient

Get color value

Parameters
pThe gradient point in [0,1] range
Returns
Color at the given gradient position

Check bounds

Returns
false if the Color gradient is mal-formed

Mal formed color gradient?

Color frame vector

Gpu program enum

Constructor

Parameters
sParent SkyX pointer

Destructor

Add ground pass (Use for atmospheric scattering effect on the terrain)

Parameters
GroundPassGround pass
AtmosphereRaidusAtmosphere radius (typically far carmera clip plane)
SBTScene blend type

Set gpu program int parameter

Parameters
GpuPGpu program type (Vertex/Fragment)
Nameparam name
Valuevalue
UpdateGroundPassestrue to update ground passes

Set gpu program Ogre::Real parameter

Parameters
GpuPGpu program type (Vertex/Fragment)
Nameparam name
Valuevalue
UpdateGroundPassestrue to update ground passes

Set gpu program Ogre::Vector2 parameter

Parameters
GpuPGpu program type (Vertex/Fragment)
Nameparam name
Valuevalue
UpdateGroundPassestrue to update ground passes

Set gpu program Ogre::Vector3 parameter

Parameters
GpuPGpu program type (Vertex/Fragment)
Nameparam name
Valuevalue
UpdateGroundPassestrue to update ground passes

Get skydome material name

Returns
Skydome material name

Get moon material name

Returns
Moon material name

Update fragment program materials

Remarks
Only for internal use

Notify skydome material changed

Remarks
Only for internal use

SkyX parent pointer

Ground pass vector

Set texture HW gamma correction

Parameters
nTexture name
gTrue to enable gamma correction, false to disable it

Skydome material

Vertex struct

Constructor

Parameters
sParent SkyX pointer

Destructor

Create our water mesh, geometry, entity, etc...

Remarks
Call it after setMaterialName()

Remove all resources

Update geometry

Parameters
camCamera

Get mesh

Returns
Mesh

Get sub mesh

Returns
Sub mesh

Get entity

Returns
Entity

Get material name

Returns
Material name

Set mesh material

Parameters
MaterialNameThe material name

Get hardware vertex buffer reference

Returns
Ogre::HardwareVertexBufferSharedPtr reference

Get hardware index buffer reference

Returns
Ogre::HardwareIndexBufferSharedPtr reference

Get the Ogre::SceneNode pointer where Hydrax mesh is attached

Returns
Ogre::SceneNode*

Is _createGeometry() called?

Returns
true if created() have been already called

Set geometry parameters

Parameters
StepsSphere number of steps
CirclesSpehere number of circes

Get number of steps

Returns
Number of steps

Get number of circles

Returns
Number of circles

Set under-horizon rendering params

Remarks
In an ideal situation, you only must see the avobe horizon sky due to the fact that the terrain/water must be 'infinite' and the under-horizont sky part is hide. But, infinite terrain/water is not always implemented in games and 3d apps in general, so... in order to get a good-looking sky, SkyX provides an approach to render realistic under-horizont sky.
Parameters
UnderHorizonCirclesNumber of circles of SkyX::MeshManager::mCircles reserved for the under-horizont geometry part, 0 means not under-horizon rendering
UnderHorizonFadingtrue/false to fade or not the under-horizon sky
UnderHorizonFadingExponentExponent of the fading, pow(vertex_angle, exp), 1=linear
UnderHorizonFadingMultiplierFading multiplier, opacity = saturate(pow(opacity,fading_exp)*fading_multiplier)

Get under-horizon circles

Returns
Under-horizon circles

Get under-horizon fading

Returns
Under-horizon fading

Get under-horizon exponent fading

Returns
under-horizon exponent fading

Get under-horizon fading multiplier

Returns
Under-horizon fading multiplier

Set radius multiplier

Parameters
RadiusMultiplierRadius multiplier
Remarks
Radius multiplier in [0,1] range Radius = CameraFarClipDistance * RadiusMultiplier

Get skydome radius

Parameters
cCamera
Returns
Skydome radius relative to the given camera

Create geometry

Main SkyX pointer

Has been create() already called?

Ogre::MeshPtr

Ogre::Submesh pointer

Ogre::Entity pointer

Vertex buffer

Vertices

Index buffer

Ogre::SceneNode pointer

Steps

Circles

Under-horizon rendering

Under-horizon fading

Under-horizon exponent fading (1=linear fading)

Under-horizon fading multiplier: opacity = saturate(pow(opacity,fading_exp)*fading_multiplier)

Radius multiplier

Material name

Constructor

Parameters
sParent SkyX pointer

Destructor

Create all resources

Remove all resources

Update moon phase

Parameters
phaseMoon phase in [-1,1] range, where -1 means fully covered Moon, 0 clear Moon and 1 fully covered Moon

Update geometry

Parameters
cCamera

Get moon billboard

Returns
Moon billboard

Get moon scene node

Returns
Moon scene node

Set moon size

Parameters
MoonSizeMoon size

Get moon size

Returns
Moon size

Set moon halo intensity

Parameters
MoonHaloIntensityMoon halo intensity

Get moon halo intensity

Returns
Moon halo intensity

Set moon halo strength

Parameters
MoonHaloStrengthMoon halo strength (linear/exponential fading)

Get moon halo strength

Returns
Moon halo strength (linear/exponential fading)

Is moon manager created?

Returns
true if yes, false if not

Update moon bounds

Parameters
cCamera

SkyX parent pointer

Moon billboard

Moon scene node

Is moon manager created?

Moon size

Moon halo intensity

Moon halo strength

Moon material

True if visible

Constructor

Parameters
sParent SkyX pointer

Destructor

Create all resources

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

Update

Parameters
timeSinceLastFrameTime since last frame

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)

Remove all resources

Set ambient gradient

Parameters
AmbientGradientAmbient color gradient

Get ambient color gradient

Returns
Ambient color gradient

Set sun gradient

Parameters
SunGradientSun color gradient

Get sun color gradient

Returns
Sun color gradient

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

Get height parameters

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

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

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

Get autoupdate

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

Set wind speed

Parameters
WindSpeedWind speed

Get wind speed

Returns
Wind speed

Get VClouds

Is moon manager created?

Returns
true if yes, false if not

Update wind speed config

Remarks
Only for internal use

Set light parameters

SkyX parent pointer

VClouds pointer

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

Wind speed

Autoupdate wind speed depending of skyx time multiplier?

Is vclouds manager created?

Current time since last frame

Ambient and Sun color gradients

References SkyX().

const Ogre::Real& SkyX::_getTimeOffset ( ) const
inline

Get time offset.

Returns
Time offset
Remarks
Only for internal use

References mTimeOffset.

void SkyX::create ( )

Create SkyX.

bool SkyX::frameStarted ( const Ogre::FrameEvent &  evt)

Frame started.

Parameters
evtFrame event
AtmosphereManager* SkyX::getAtmosphereManager ( )
inline

Get atmosphere manager.

Returns
Atmosphere manager pointer

References mAtmosphereManager.

Ogre::Camera* SkyX::getCamera ( )
inline

Get current rendering camera.

Returns
Current rendering camera

References mCamera.

bool SkyX::getCloudsEnabled ( )
inline

References mCloudsEnabled.

CloudsManager* SkyX::getCloudsManager ( )
inline

Get clouds manager.

Returns
Clouds manager

References mCloudsManager.

Controller* SkyX::getController ( ) const
inline

Get current controller.

Returns
Current controller

References mController.

const Ogre::Vector2& SkyX::getEastDirection ( ) const
inline

Get east direction.

Returns
Current east direction, in X,Y world coords

References mEastDirection.

bool SkyX::getEnabled ( )
inline

References mEnabled.

GPUManager* SkyX::getGPUManager ( )
inline

Get GPU manager.

Returns
Atmosphere manager pointer

References mGPUManager.

const Ogre::Real& SkyX::getInfiniteCameraFarClipDistance ( ) const
inline

Get infinite cmaera far clip distance.

Returns
Infinite camera far clip distance

References mInfiniteCameraFarClipDistance.

const LightingMode& SkyX::getLightingMode ( ) const
inline

Get lighting mode.

Returns
Lighting mode

References mLightingMode.

MeshManager* SkyX::getMeshManager ( )
inline

Get mesh manager.

Returns
Mesh manager pointer

References mMeshManager.

Ogre::Vector3 SkyX::getMoonDirection ( )
inline

Get moon direction.

Returns
Moon direction, Earth-to-Moon direction

References mMoonDirection.

bool SkyX::getMoonEnabled ( )
inline

References mMoonEnabled.

MoonManager* SkyX::getMoonManager ( )
inline

Get moon manager.

Returns
Moon manager

References mMoonManager.

Ogre::Real SkyX::getMoonPhase ( )
inline

Get moon phase.

Returns
Moon phase in [-1,1] range, where -1 means fully covered Moon, 0 clear Moon and 1 fully covered Moon

References mMoonPhase.

const RenderQueueGroups& SkyX::getRenderQueueGroups ( ) const
inline

Get render queue groups.

Returns
Current render queue groups

References mRenderQueueGroups.

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

Get scene manager.

Returns
Ogre scene manager

References mSceneManager.

Ogre::Vector3 SkyX::getSunDirection ( )
inline

Get sun direction.

Returns
Sun direction, the Earth-to-Sun direction

References mSunDirection.

const Ogre::Vector3& SkyX::getTime ( ) const
inline

Get time.

Returns
Current time, where x = time in [0, 24]h range, y = sunrise hour in [0, 24]h range, z = sunset hour in [0, 24] range

References mTime.

const Ogre::Real& SkyX::getTimeMultiplier ( ) const
inline

Get time multiplier.

Returns
Time multiplier

References mTimeMultiplier.

VCloudsManager* SkyX::getVCloudsManager ( )
inline

Get volumetric clouds manager.

Returns
Volumetric clouds manager

References mVCloudsManager.

bool SkyX::isCreated ( ) const
inline

Is SkyX created?

Returns
true if yes, false if not

References mCreated.

const bool& SkyX::isStarfieldEnabled ( ) const
inline

Is the starfield enable?

Returns
true if the starfield is enabled, false if it isn't

References mStarfield.

const bool& SkyX::isVisible ( ) const
inline

Is SkyX visible?

Returns
true if SkyX is visible, false otherwise

References mVisible.

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

Notify camera render (to be invoked per camera and per frame)

Parameters
cCamera
Remarks
Invoke this method manually before the camera render operation Per-camera updates must be performed after the per-frame update through SkyX::update(...) Also it's possible to use listeners, making all this process transparent, just register SkyX in your render target through Ogre::RenderTarget::addListener(...)
void SkyX::preViewportUpdate ( const Ogre::RenderTargetViewportEvent &  evt)

Fired before update a render target viewport.

Parameters
evtRender target viewport event
void SkyX::remove ( )

Remove SkyX (free resources)

void SkyX::setCloudsEnabled ( bool  _enabled)

References mCloudsEnabled, and mVCloudsManager.

Referenced by setEnabled().

void SkyX::setController ( Controller *  c)
inline

Set controller.

Parameters
cController

References SkyX::Controller::getDeleteBySkyX(), and mController.

void SkyX::setEastDirection ( const Ogre::Vector2 &  ed)
inline

Set eastn direction.

Parameters
edEast direction, in X,Y world coords (must be normalized)

References mEastDirection, and update().

void SkyX::setEnabled ( bool  _enabled)
void SkyX::setInfiniteCameraFarClipDistance ( const Ogre::Real &  d)
inline

Set infinite camera far clip distance.

Parameters
dInfinite camera far clip distance
Remarks
SkyX needs a finite camera far clip distance in order to builds its geometry. Since Ogre allows infinite far clip camera distances (camearFarClipDistance = 0) you'll need to manually provide a far clip distance if you're using an infinite camera far clip distance.

References mInfiniteCameraFarClipDistance.

void SkyX::setLightingMode ( const LightingMode &  lm)

Set lighting mode.

Parameters
lmLighting mode
Remarks
SkyX is designed for true HDR rendering, but there're a lot of applications that doesn't use HDR rendering, due to this a little exponential tone-mapping algoritm is applied to SkyX materials if LM_LDR is selected. (See: AtmosphereManager::Options::Exposure) Select LM_HDR if your app is designed for true HDR rendering. In HDR mode, we assume you're ussing a full linear rendering pipeline, so all textures are gamma corrected if needed.
void SkyX::setMoonEnabled ( bool  _enabled)

References mMoonEnabled, and mMoonManager.

Referenced by setEnabled().

void SkyX::setMoonPhase ( const Ogre::Real &  mp)
inline

Set moon phase.

Parameters
mpMoon phase in [-1,1] range, where -1 means fully covered Moon, 0 clear Moon and 1 fully covered Moon

References mMoonPhase.

void SkyX::setRenderQueueGroups ( const RenderQueueGroups &  rqg)

Set render queue groups.

Parameters
rqgRender queue groups
void SkyX::setStarfieldEnabled ( const bool &  Enabled)

Set the starfield enabled/disabled.

Parameters
Enabledtrue for starfield, false for not
void SkyX::setTime ( const Ogre::Vector3 &  t)
inline

Set time.

Parameters
tTime, where x = time in [0, 24]h range, y = sunrise hour in [0, 24]h range, z = sunset hour in [0, 24] range

References mTime, and update().

void SkyX::setTimeMultiplier ( const Ogre::Real &  TimeMultiplier)
inline

Set time multiplier.

Parameters
TimeMultiplierTime multiplier
Remarks
The time multiplier can be a negative number, 0 will disable auto-updating For setting a custom time of day, check: AtmosphereManager::Options::Time

References mTimeMultiplier, and mVCloudsManager.

void SkyX::setVisible ( const bool &  visible)

Set visible.

Parameters
visibletrue to set SkyX visible, false to hide it
SkyX::SkyX ( Ogre::SceneManager *  sm,
Controller *  c 
)

Contructor.

Parameters
smOgre Scene manager
cSkyX controller

Referenced by __declspec().

void SkyX::update ( const Ogre::Real &  simDeltaTime)

Basic controller class.

Update (to be invoked per frame)

Constructor

Parameters
deleteBySkyXtrue to automatically destroy the controller by SkyX, false otherwiseUpdate controller
simDeltaTimeSimulation delta time (It's not the time since last frame, it's the delta simulation time, one time the time since last frame has been multiplied by the time multiplier)
timeSinceLastFrameTime elapsed since last frame
Remarks
Invoke this function only one time per frame. Per-frame update must be performed before per-camera updates through SkyX::notifyCameraRender(...) Also it's possible to use listeners, making all this process transparent, just register SkyX in ogre root through Ogre::Root::addFrameListener(...)

Referenced by gazebo::sensors::ForceTorqueSensor::ConnectUpdate(), gazebo::sensors::SonarSensor::ConnectUpdate(), gazebo::sensors::ForceTorqueSensor::DisconnectUpdate(), gazebo::sensors::SonarSensor::DisconnectUpdate(), setEastDirection(), and setTime().

Variable Documentation

AtmosphereManager* SkyX::mAtmosphereManager

Atmosphere manager.

Referenced by getAtmosphereManager().

Ogre::Camera* SkyX::mCamera

Current rendering camera.

Referenced by getCamera(), and SkyX::VClouds::VClouds::getCamera().

bool SkyX::mCloudsEnabled

True if clouds are enabled.

Referenced by getCloudsEnabled(), and setCloudsEnabled().

CloudsManager* SkyX::mCloudsManager

Clouds manager.

Referenced by getCloudsManager().

Controller* SkyX::mController
bool SkyX::mCreated
Ogre::Vector2 SkyX::mEastDirection

East direction (in X,Z world coords)

Referenced by getEastDirection(), and setEastDirection().

bool SkyX::mEnabled

True if skyx is enabled.

Referenced by getEnabled(), SkyX::VClouds::LightningManager::isEnabled(), and setEnabled().

GPUManager* SkyX::mGPUManager

GPU manager.

Referenced by getGPUManager().

Ogre::Real SkyX::mInfiniteCameraFarClipDistance

Infinite camera far clip distance.

Referenced by getInfiniteCameraFarClipDistance(), and setInfiniteCameraFarClipDistance().

Ogre::Real SkyX::mLastCameraFarClipDistance

Last camera far clip distance.

Ogre::Vector3 SkyX::mLastCameraPosition

Last camera position.

LightingMode SkyX::mLightingMode

Lighting mode.

Referenced by getLightingMode().

MeshManager* SkyX::mMeshManager

Mesh manager.

Referenced by getMeshManager().

Ogre::Vector3 SkyX::mMoonDirection

Moon direction.

Referenced by getMoonDirection().

bool SkyX::mMoonEnabled

True if moon is enabled.

Referenced by getMoonEnabled(), and setMoonEnabled().

MoonManager* SkyX::mMoonManager

Moon manager.

Referenced by getMoonManager(), and setMoonEnabled().

Ogre::Real SkyX::mMoonPhase

Moon phase.

Referenced by getMoonPhase(), and setMoonPhase().

RenderQueueGroups SkyX::mRenderQueueGroups
Ogre::SceneManager* SkyX::mSceneManager
bool SkyX::mStarfield

Enable starfield?

Referenced by isStarfieldEnabled().

Ogre::Vector3 SkyX::mSunDirection
Ogre::Vector3 SkyX::mTime

Time information: x = time in [0, 24]h range, y = sunrise hour in [0, 24]h range, z = sunset hour in [0, 24] range.

Referenced by getTime(), and setTime().

Ogre::Real SkyX::mTimeMultiplier

Time multiplier.

Referenced by getTimeMultiplier(), and setTimeMultiplier().

Ogre::Real SkyX::mTimeOffset

Time offset.

Referenced by _getTimeOffset().

VCloudsManager* SkyX::mVCloudsManager

Volumetric clouds manager.

Referenced by getVCloudsManager(), setCloudsEnabled(), and setTimeMultiplier().

bool SkyX::mVisible

Is SkyX visible?

Referenced by isVisible(), and SkyX::VClouds::VClouds::isVisible().

Ogre::uint8 SkyX::skydome

Skydome render queue group (Note: Moon = skydome_render_queue+1)

Ogre::uint8 SkyX::vclouds

VClouds render queue group.

Ogre::uint8 SkyX::vcloudsLightnings

VClouds lightnings render queue group.