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

Public Member Functions | |
| DtOsgSkyObject (DtDe &, DtUniqueID id) | |
| CTOR. More... | |
| virtual | ~DtOsgSkyObject () |
| DTOR. More... | |
| virtual void | setLocation (const DtVector &location) |
| Set the location of the viewer where the sky is to be recalculated. More... | |
| virtual const DtVector & | location () const |
| Get the location of the viewer where the sky is to be recalculated. More... | |
| virtual void | addCloudLayer (DtCloudLayerId layerId) |
| Add new cloud layer. More... | |
| virtual void | setCloudLayerDeckType (DtCloudLayerId layerId, int deckType) |
| virtual void | setCloudLayerCornerRadius (DtCloudLayerId layerId, float corner) |
| virtual void | setCloudLayerBounds (DtCloudLayerId layerId, const DtVector &bounds) |
| virtual void | setCloudLayerDensity (DtCloudLayerId layerId, double density) |
| virtual void | setCloudLayerInfiniteFlag (DtCloudLayerId layerId, bool infinite) |
| virtual void | setCloudLayerRelativeFlag (DtCloudLayerId layerId, bool relative) |
| virtual void | setCloudLayerFadeAtAltitudeFlag (DtCloudLayerId layerId, bool fadeAtAltitude) |
| virtual void | setCloudLayerAltitudeIsHATFlag (DtCloudLayerId layerId, bool altitudeIsHAT) |
| virtual CloudLayer * | findCloudLayer (DtCloudLayerId layerId) |
| Get the information of a cloud layer. More... | |
| virtual void | removeCloudLayer (DtCloudLayerId layerId) |
| Get the number of cloud layers. More... | |
| virtual void | removeCloudLayers () |
| Remove all cloud layers. More... | |
| virtual void | sendCloudLayers () |
| Send cloud layers to the scene-graph. More... | |
| virtual void | sendCloudLayer (DtCloudLayerId layerId) |
| Send a single cloud layer to the scene-graph. More... | |
| virtual void | setCloudLayerEnabled (DtCloudLayerId layerId, bool enabled) |
| Enable/disable a cloud layer. More... | |
| virtual float | getSunAlpha () const |
| Retrieves the visibility of the sun disc, which will be affected by fog. More... | |
| virtual void | setDrawSunAndMoonIntoEnvMap (bool draw) |
| Sets whether the sun and moon are rendered into the environment map. More... | |
| virtual void | setCloudLayerPositionAndOrientation (DtCloudLayerId layerId, const DtVector &position, float orientation) |
| Move a cloud layer to a new position. More... | |
| virtual void | setWindDirection (float radians) |
| Set wind direction blowing from in radians from north. More... | |
| virtual float | windDirection () const |
| Get wind direction blowing from in radians from north. More... | |
| virtual float | windDirectionInDegrees () const |
| Get wind direction blowing from in degrees from north. More... | |
| void | setGenerateCubeMaps (bool enabled) |
| Toggles automatic generation of cube maps from the sky. More... | |
| GLuint | getCubeMap (const osg::ref_ptr< const 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. More... | |
| GLuint | getPrimaryCubeMap () const |
| Retrieve the OpenGL texture ID for a cube map generated from the local sky for general use. More... | |
| void | setFogOverride (osg::ref_ptr< const osg::Camera > camera, const osg::Vec4f &fogColor, float fogDensity) |
| Override fog settings. More... | |
| void | clearFogOverride (osg::ref_ptr< const osg::Camera > camera) |
| Clear any fog override previously set. More... | |
| void | clearFogOverrideForAllCameras (void) |
| void | setHorizonColor (const osg::Vec4f &horizonColor) |
| Set the color at and below the horizon. More... | |
| void | clearHorizonColor () |
| Clear use of a fixed horizon color. More... | |
| void | updatePrecipitation () |
| Update the precipitation in the scene-graph. More... | |
| DtSilverliningGroup * | getDtSilverlining () |
| get Silverlining's Date and Time in the GMT timezone More... | |
| DtGroundFogGroup * | getDtGroundFogGroup () |
| Get the ground fog group object. More... | |
| DtWeatherLayerGroup * | getDtWeatherLayerGroup () |
| Get the weather layer group object. More... | |
| 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 More... | |
| void | setAboveWater (bool value) |
| needed for god ray generation More... | |
| 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. More... | |
| virtual | ~DtSkyObject () |
| DTOR. More... | |
| 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. More... | |
| void | setAmbientLightValue (float ambientLightValue) |
| This is set by the SilverLining group; it can be accessed only by getting the skyObject through the skyObjectAgent. More... | |
| float | ambientLightValue () const |
| bool | isDaylight () const |
| Returns whether or not the light level counts as daylight. More... | |
| bool | isSkyCastingShadows () const |
| Returns whether or not the light level counts as shadow casting, (which could be from sun or moon light sources, but only considers sky based light sources). More... | |
Protected Types | |
| typedef boost::unordered_map < DtCloudLayerId, CloudLayer > | CloudLayerMap |
Protected Member Functions | |
| void | updatePrecipitationOSG () |
| void | updatePrecipitationSilverLining () |
| void | on_coordinateSystemChanged (const std::string &type) |
| void | applyCurrentSettings () |
| virtual void | sendCloudLayer (const CloudLayer &layer) |
Additional Inherited Members | |
Public Types inherited from makVrv::DtSkyObject | |
| enum | PrecipitationType { None = 0, Rain = 1, SnowWet = 2, SnowDry = 3, Sleet = 4, Hail = 5 } |
| Precipitation types. More... | |
Static Public Attributes inherited from makVrv::DtSkyObject | |
| static const float | DefaultDayLightLevel |
| Value for daylight visibility. More... | |
| static const float | DefaultSkyShadowsLightLevelNoHdr |
| Value for shadow visibility without HDR. More... | |
| static const float | DefaultSkyShadowsLightLevelHdr |
| Value for shadow visibility with HDR. More... | |
| static const float | DefaultFogVisibilityLevel |
| Value for fog visibility - standard definition (1000 m.) More... | |
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] | Layer | Id of the layer to add. |
| [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. |
| [in] | fadeAtAltitude | a flag indicating if the cloud layer fades when the observer is high above it. |
| [in] | altitudeIsHAT | a flag indicating if the altitude is treated as height above terrain. |
Implements makVrv::DtSkyObject.
|
virtual |
Implements makVrv::DtSkyObject.
|
virtual |
Implements makVrv::DtSkyObject.
|
virtual |
Implements makVrv::DtSkyObject.
|
virtual |
Implements makVrv::DtSkyObject.
|
virtual |
Implements makVrv::DtSkyObject.
|
virtual |
Implements makVrv::DtSkyObject.
|
virtual |
Implements makVrv::DtSkyObject.
|
virtual |
Implements 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. |
Implements makVrv::DtSkyObject.
|
virtual |
|
virtual |
Remove all cloud layers.
Implements makVrv::DtSkyObject.
|
virtual |
Send cloud layers to the scene-graph.
|
virtual |
Send a single cloud layer to the scene-graph.
Implements makVrv::DtSkyObject.
|
virtual |
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, 5 = hail |
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< const 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< const osg::Camera > | camera, |
| const osg::Vec4f & | fogColor, | ||
| float | fogDensity | ||
| ) |
Override fog settings.
| void makVrv::DtOsgSkyObject::clearFogOverride | ( | osg::ref_ptr< const 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
| DtGroundFogGroup* makVrv::DtOsgSkyObject::getDtGroundFogGroup | ( | ) |
Get the ground fog group object.
| DtWeatherLayerGroup* makVrv::DtOsgSkyObject::getDtWeatherLayerGroup | ( | ) |
Get the weather layer group object.
| 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 |
|
protectedvirtual |
|
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 |