![]() |
VR-Forces 4.6.1 Class Documentation
|
An OSG implementation of the sky. More...

Classes | |
| class | CloudLayer |
Public Member Functions | |
| DtOsgSkyObject (DtDe &, DtUniqueID id) | |
| CTOR. | |
| virtual | ~DtOsgSkyObject () |
| DTOR. | |
| virtual void | setLocation (const DtVector &location) |
| Set the location of the viewer where the sky is to be recalculated. | |
| virtual const DtVector & | location () const |
| Get the location of the viewer where the sky is to be recalculated. | |
| virtual void | addCloudLayer (int deckType, const DtVector &location, const DtVector &bounds, double density, bool infinite, bool relative) |
| Add new cloud layer. | |
| virtual bool | cloudLayer (int index, int &deckType, DtVector &location, DtVector &bounds, double &density, bool &infinite, bool &relative) const |
| Get the information of a cloud layer. | |
| virtual int | cloudLayerCount () const |
| Get the number of cloud layers. | |
| virtual void | removeCloudLayer (int index) |
| Remove a cloud layer. | |
| virtual void | removeCloudLayers () |
| Remove all cloud layers. | |
| virtual void | sendCloudLayers () |
| Send cloud layers to the scene-graph. | |
| virtual void | setCloudLayerEnabled (int index, bool enabled) |
| Enable/disable a cloud layer. | |
| virtual float | getSunAlpha () const |
| Retrieves the visibility of the sun disc, which will be affected by fog. | |
| virtual void | setDrawSunAndMoonIntoEnvMap (bool draw) |
| Sets whether the sun and moon are rendered into the environment map. | |
| virtual void | setCloudLayerPosition (int index, double xCoord, double yCoord) |
| Move a cloud layer to a new position. | |
| virtual void | setWindDirection (float radians) |
| Set wind direction blowing from in radians from north. | |
| virtual float | windDirection () const |
| Get wind direction blowing from in radians from north. | |
| virtual float | windDirectionInDegrees () const |
| Get wind direction blowing from in degrees from north. | |
| void | setGenerateCubeMaps (bool enabled) |
| Toggles automatic generation of cube maps from the sky. | |
| GLuint | getCubeMap (const osg::ref_ptr< osg::Camera > camera, const osg::State &state) const |
| Retrieve the OpenGL texture ID for a cube map generated from the local sky for a given camera. | |
| GLuint | getPrimaryCubeMap () const |
| Retrieve the OpenGL texture ID for a cube map generated from the local sky for general use. | |
| void | setFogOverride (osg::ref_ptr< osg::Camera > camera, const osg::Vec4f &fogColor, float fogDensity) |
| Override fog settings. | |
| void | clearFogOverride (osg::ref_ptr< osg::Camera > camera) |
| Clear any fog override previously set. | |
| void | clearFogOverrideForAllCameras (void) |
| void | setHorizonColor (const osg::Vec4f &horizonColor) |
| Set the color at and below the horizon. | |
| void | clearHorizonColor () |
| Clear use of a fixed horizon color. | |
| void | updatePrecipitation () |
| Update the precipitation in the scene-graph. | |
| DtSilverliningGroup * | getDtSilverlining () |
| get Silverlining's Date and Time in the GMT timezone | |
| void | enableLighting (osg::ref_ptr< osg::Camera > camera, bool enable) |
| bool | shouldActivateRaindrops () const |
| check precipitation bools to see whether to draw the rain post effect | |
| void | setAboveWater (bool value) |
| needed for god ray generation | |
| bool | aboveWater () |
| virtual void | setAirTurbidity (float turbidity) |
| virtual float | airTurbidity () const |
| virtual void | setAmbientAirTemperature (float temperature) |
| virtual float | ambientAirTemperature () const |
| virtual void | setVisibleDistance (float distance) |
| virtual float | visibleDistance () const |
| virtual void | setFogHeight (float meters) |
| virtual float | fogHeight () const |
| virtual void | setFogColor (const DtVector &color) |
| virtual const osg::Vec4 & | fogColor () const |
| virtual void | setFogThresholdDistance (float distance) |
| virtual float | fogThresholdDistance () const |
| virtual void | setPrecipitationEnabled (bool enabled) |
| virtual bool | precipitationEnabled () const |
| virtual void | setPrecipitationVisibilityEffectsEnabled (bool enabled) |
| virtual bool | precipitationVisibilityEffectsEnabled () const |
| virtual void | setPrecipitationType (int type) |
| virtual int | precipitationType () const |
| virtual void | setPrecipitationIntensity (float intensity) |
| virtual float | precipitationIntensity () const |
| virtual void | setWindSpeed (float metersPerSecond) |
| virtual float | windSpeed () const |
| virtual void | setMinimumWindAltitude (float alt) |
| virtual float | minimumWindAltitude () const |
| virtual void | setMaximumWindAltitude (float alt) |
| virtual float | maximumWindAltitude () const |
| virtual void | setLensFlare (bool enabled) |
| virtual bool | lensFlare () const |
| virtual void | setCrepuscularRays (bool enabled) |
| virtual bool | crepuscularRays () const |
| virtual void | setRainSplashEffect () |
Public Member Functions inherited from makVrv::DtSkyObject | |
| DtSkyObject (DtDe &de, DtUniqueID id) | |
| CTOR. | |
| virtual | ~DtSkyObject () |
| DTOR. | |
| virtual void | setDateAndTime (unsigned short year, unsigned char month, unsigned char day, unsigned char hour, unsigned char minutes, double seconds, bool observeDaylightSavings) |
| Set the date and time to show the sky. | |
| void | setAmbientLightValue (float ambientLightValue) |
| This is set by the SilverLining group; it can be accessed only by getting the skyObject through the skyObjectAgent. | |
| float | ambientLightValue () const |
| void | setIsDay (bool isDay) |
| This is set by the SilverLining group; it can be accessed only by getting the skyObject through the skyObjectAgent. | |
| bool | isDay () const |
Protected Types | |
| typedef std::vector< CloudLayer > | CloudLayerList |
Protected Member Functions | |
| void | updatePrecipitationOSG () |
| void | updatePrecipitationSilverLining () |
| void | on_coordinateSystemChanged (const std::string &type) |
| void | applyCurrentSettings () |
Protected Attributes | |
| DtDe & | myDe |
| DtSignalConnectionManager | mySignals |
| osg::ref_ptr< DtSilverliningGroup > | mySilverliningGroup |
| DtVector | myLocation |
| CloudLayerList | myCloudLayerList |
| osg::ref_ptr < osgParticle::PrecipitationEffect > | myPrecipitationEffect |
| bool | myPrecipitationEnabled |
| int | myPrecipitationEffectType |
| float | myPrecipitationIntensity |
| float | myAirTurbidity |
| float | myAirTemperature |
| float | myVisibleDistance |
| float | myFogHeight |
| osg::Vec4f | myFogColor |
| float | myFogThreshold |
| float | myWindSpeed |
| float | myWindDirection |
| float | myWindAltMinimum |
| float | myWindAltMaximum |
| bool | myLensFlareEnabled |
| bool | myCrepuscularRaysEnabled |
| bool | myVisibilitySaved |
| float | mySavedVisibility |
| bool | myAboveWater |
| bool | myPrecipitationVisibilityEffects |
| osg::ref_ptr< osg::TextureCubeMap > | myDefaultCubeMap |
Protected Attributes inherited from makVrv::DtSkyObject | |
| float | myAmbientLightValue |
| bool | myIsDay |
| DtSkyObjectSignaler & | mySignaler |
Additional Inherited Members | |
Public Types inherited from makVrv::DtSkyObject | |
| enum | PrecipitationType { None = 0, Rain = 1, SnowWet = 2, SnowDry = 3, Sleet = 4 } |
| Precipitation types. More... | |
Static Public Attributes inherited from makVrv::DtSkyObject | |
| static const float | DefaultDayLightLevel |
| Value for daylight visibility. | |
| static const float | DefaultFogVisibilityLevel |
| Value for fog visibility - standard definition (1000 m.) | |
An OSG implementation of the sky.
|
protected |
| makVrv::DtOsgSkyObject::DtOsgSkyObject | ( | DtDe & | , |
| DtUniqueID | id | ||
| ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Set the location of the viewer where the sky is to be recalculated.
| [in] | location | is the local coordinate from which to generate the sky. Typically it is the observer location. |
Reimplemented from makVrv::DtSkyObject.
|
virtual |
Get the location of the viewer where the sky is to be recalculated.
|
virtual |
Add new cloud layer.
| [in] | deckType | the type of clouds to add. |
| [in] | location | the position of clouds. |
| [in] | bounds | the boundary of clouds. |
| [in] | density | the density of clouds. |
| [in] | infinite | a flag defining if the cloud layer is infinite. |
| [in] | relative | a flag indicating if the position is relative to the observer. |
Reimplemented from makVrv::DtSkyObject.
|
virtual |
Get the information of a cloud layer.
| [in] | index | is the index of the cloud layer. |
| [in] | deckType | the type of clouds to add. |
| [in] | location | the position of clouds. |
| [in] | bounds | the boundary of clouds. |
| [in] | density | the density of clouds. |
| [in] | infinite | a flag defining if the cloud layer is infinite. |
| [in] | relative | a flag defining if the position is relative to the camera. |
| true | if cloud layer was found and returned data is valid. |
| false | otherwise. |
|
virtual |
Get the number of cloud layers.
Reimplemented from makVrv::DtSkyObject.
|
virtual |
Remove a cloud layer.
Implements makVrv::DtSkyObject.
|
virtual |
Remove all cloud layers.
Implements makVrv::DtSkyObject.
|
virtual |
Send cloud layers to the scene-graph.
Enable/disable a cloud layer.
Implements makVrv::DtSkyObject.
|
virtual |
Retrieves the visibility of the sun disc, which will be affected by fog.
|
virtual |
Sets whether the sun and moon are rendered into the environment map.
|
virtual |
Set / Get the air turbidity (haziness/pollution)
Implements makVrv::DtSkyObject.
|
virtual |
|
virtual |
Set / Get the ambient air temperature
Implements makVrv::DtSkyObject.
|
virtual |
|
virtual |
Set / Get the visible distance.
Implements makVrv::DtSkyObject.
|
virtual |
|
virtual |
Set / Get the ceiling height of the fog layer.
Implements makVrv::DtSkyObject.
|
virtual |
|
virtual |
Set / Get the fog color (which will be lit based on time of day.) The fog color will blend toward this value once visibility is below the fog threshold distance, otherwise hazy conditions dominated by Rayeligh scattering is assumed.
Implements makVrv::DtSkyObject.
|
virtual |
|
virtual |
Set / Get the visibility distance at which atmospheric attenuation is considered to be mostly Rayleigh scattering from small particles, instead of fog. Below this distance, the specified fog color is used, and the sun will start to fade out.
|
virtual |
|
virtual |
Set / Get whether precipitation is enabled.
Implements makVrv::DtSkyObject.
|
virtual |
|
virtual |
Set / Get whether precipitation affects visibility.
|
virtual |
|
virtual |
Set / Get the precipitation type.
| input | 0 = none, 1 = rain, 2 = wet snow, 3 = dry snow, 4 = sleet |
Implements makVrv::DtSkyObject.
|
virtual |
|
virtual |
Set / Get the precipitation intensity.
Implements makVrv::DtSkyObject.
|
virtual |
|
virtual |
Move a cloud layer to a new position.
Implements makVrv::DtSkyObject.
|
virtual |
Set / Get the wind speed in meters per second.
Implements makVrv::DtSkyObject.
|
virtual |
|
virtual |
Set wind direction blowing from in radians from north.
Implements makVrv::DtSkyObject.
|
virtual |
Get wind direction blowing from in radians from north.
|
virtual |
Get wind direction blowing from in degrees from north.
this is not a member variable so every time it is called it converts from Radians to Degrees
|
virtual |
Set / Get minimum wind altitude.
|
virtual |
|
virtual |
Set / Get maximum wind altitude.
|
virtual |
|
virtual |
Set / Get use of lens flare effects.
|
virtual |
|
virtual |
Set / Get use of crepuscular rays (sun rays) effects.
|
virtual |
|
virtual |
Set / Get use of rain splash effects.
| void makVrv::DtOsgSkyObject::setGenerateCubeMaps | ( | bool | enabled | ) |
Toggles automatic generation of cube maps from the sky.
| GLuint makVrv::DtOsgSkyObject::getCubeMap | ( | const osg::ref_ptr< osg::Camera > | camera, |
| const osg::State & | state | ||
| ) | const |
Retrieve the OpenGL texture ID for a cube map generated from the local sky for a given camera.
| GLuint makVrv::DtOsgSkyObject::getPrimaryCubeMap | ( | ) | const |
Retrieve the OpenGL texture ID for a cube map generated from the local sky for general use.
| void makVrv::DtOsgSkyObject::setFogOverride | ( | osg::ref_ptr< osg::Camera > | camera, |
| const osg::Vec4f & | fogColor, | ||
| float | fogDensity | ||
| ) |
Override fog settings.
| void makVrv::DtOsgSkyObject::clearFogOverride | ( | osg::ref_ptr< osg::Camera > | camera | ) |
Clear any fog override previously set.
| void makVrv::DtOsgSkyObject::clearFogOverrideForAllCameras | ( | void | ) |
| void makVrv::DtOsgSkyObject::setHorizonColor | ( | const osg::Vec4f & | horizonColor | ) |
Set the color at and below the horizon.
| void makVrv::DtOsgSkyObject::clearHorizonColor | ( | ) |
Clear use of a fixed horizon color.
| void makVrv::DtOsgSkyObject::updatePrecipitation | ( | ) |
Update the precipitation in the scene-graph.
| DtSilverliningGroup* makVrv::DtOsgSkyObject::getDtSilverlining | ( | ) |
get Silverlining's Date and Time in the GMT timezone
| void makVrv::DtOsgSkyObject::enableLighting | ( | osg::ref_ptr< osg::Camera > | camera, |
| bool | enable | ||
| ) |
| bool makVrv::DtOsgSkyObject::shouldActivateRaindrops | ( | ) | const |
check precipitation bools to see whether to draw the rain post effect
|
inline |
needed for god ray generation
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |