![]() |
VR-Forces 5.0.1 Developer's Guide
|
An OSG implementation of the sky.

Public Member Functions | |
| DtOsgSkyObject (DtDe &, DtUniqueID id) | |
| virtual | ~DtOsgSkyObject () |
| virtual void | setLocation (const DtVector &location) |
| virtual const DtVector & | location () const |
| virtual void | addCloudLayer (DtCloudLayerId layerId) |
| 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) |
| virtual void | removeCloudLayer (DtCloudLayerId layerId) |
| virtual void | removeCloudLayers () |
| virtual void | sendCloudLayers () |
| virtual void | sendCloudLayer (DtCloudLayerId layerId) |
| virtual void | setCloudLayerEnabled (DtCloudLayerId layerId, bool enabled) |
| virtual float | getSunAlpha () const |
| virtual void | setDrawSunAndMoonIntoEnvMap (bool draw) |
| virtual void | setCloudLayerPositionAndOrientation (DtCloudLayerId layerId, const DtVector &position, float orientation) |
| virtual void | setWindDirection (float radians) |
| virtual float | windDirection () const |
| virtual float | windDirectionInDegrees () const |
| void | setGenerateCubeMaps (bool enabled) |
| GLuint | getCubeMap (const osg::ref_ptr< const osg::Camera > camera, const osg::State &state) const |
| void | setFogOverride (osg::ref_ptr< const osg::Camera > camera, const osg::Vec4f &fogColor, float fogDensity) |
| void | clearFogOverride (osg::ref_ptr< const osg::Camera > camera) |
| void | clearFogOverrideForAllCameras (void) |
| void | setHorizonColor (const osg::Vec4f &horizonColor) |
| void | clearHorizonColor () |
| void | updatePrecipitation () |
| DtSilverliningGroup * | getDtSilverlining () |
| DtWeatherAreaGroup * | findWeatherAreaGroup () |
| DtWeatherLayerGroup * | findWeatherLayerGroup () |
| void | enableLighting (osg::ref_ptr< osg::Camera > camera, bool enable) |
| bool | shouldActivateRaindrops () const |
| virtual bool | bindFogFroxelTexture (const int unit, const unsigned int renderContextId) |
| virtual float | fogFroxelMaxDistance () const |
| 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 | setGroundFogColor (const DtVector &color) override |
| virtual const osg::Vec3 & | groundFogColor () 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 bool | computeLocalPrecipitation (const DtVector &location, int &type, float &intensity) const |
| virtual bool | computeLocalGroundRainAccumulation (const DtVector &location, float &depth, float &blend) 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) | |
| virtual | ~DtSkyObject () |
| virtual void | setDateAndTime (unsigned short year, unsigned char month, unsigned char day, unsigned char hour, unsigned char minutes, double seconds, bool observeDaylightSavings) |
| void | setAmbientLightValue (float ambientLightValue) |
| float | ambientLightValue () const |
| bool | isDaylight () const |
| bool | isSkyCastingShadows () const |
Protected Types | |
| typedef std::unordered_map < DtCloudLayerId, CloudLayer > | CloudLayerMap |
Protected Member Functions | |
| void | updatePrecipitationSilverLining () |
| void | on_coordinateSystemChanged (const std::string &type) |
| void | applyCurrentSettings () |
| virtual void | sendCloudLayer (const CloudLayer &layer) |
Protected Attributes | |
| DtDe & | myDe |
| DtSignalConnectionManager | mySignals |
| osg::ref_ptr< DtSilverliningGroup > | mySilverliningGroup |
| osg::ref_ptr< DtWeatherAreaGroup > | myWeatherAreaGroup |
| osg::ref_ptr< DtWeatherLayerGroup > | myWeatherLayerGroup |
| DtWeatherLayer * | myHailLayer |
| DtVector | myLocation |
| CloudLayerMap | myCloudLayerMap |
| bool | myPrecipitationEnabled |
| int | myPrecipitationEffectType |
| float | myPrecipitationIntensity |
| float | myAirTurbidity |
| float | myAirTemperature |
| float | myVisibleDistance |
| float | myFogHeight |
| osg::Vec4f | myFogColor |
| osg::Vec3f | myGroundFogColor |
| float | myFogThreshold |
| float | myWindSpeed |
| float | myWindDirection |
| float | myWindAltMinimum |
| float | myWindAltMaximum |
| bool | myLensFlareEnabled |
| bool | myCrepuscularRaysEnabled |
| bool | myVisibilitySaved |
| float | mySavedVisibility |
| bool | myPrecipitationVisibilityEffects |
| osg::ref_ptr< osg::TextureCubeMap > | myDefaultCubeMap |
Protected Attributes inherited from makVrv::DtSkyObject | |
| float | myAmbientLightValue |
| DtSkyObjectSignaler & | mySignaler |
| DtDe & | myDe |
Additional Inherited Members | |
Public Types inherited from makVrv::DtSkyObject | |
| enum | PrecipitationType { None = 0, Rain = 1, SnowWet = 2, SnowDry = 3, Sleet = 4, Hail = 5, Drizzle = 6 } |
Static Public Attributes inherited from makVrv::DtSkyObject | |
| static const float | theDefaultDayLightLevel |
| static const float | theDefaultSkyShadowsLightLevelNoHdr |
| static const float | theDefaultSkyShadowsLightLevelHdr |
| static const float | theDefaultFogVisibilityLevel |
| static const double | theMaximumPrecipitationRate |
| static const float | theMaximumVisibilityDistance |
|
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 |
Set / Get the air turbidity (haziness/pollution)
|
virtual |
Set / Get the ambient air temperature.
Implements makVrv::DtSkyObject.
|
virtual |
Set / Get the ambient air temperature.
|
virtual |
Set / Get the visible distance.
Implements makVrv::DtSkyObject.
|
virtual |
Set / Get the visible distance.
|
virtual |
Set / Get the ceiling height of the fog layer.
Implements makVrv::DtSkyObject.
|
virtual |
Set / Get the ceiling height of the fog layer.
|
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 |
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.
|
overridevirtual |
Set / Get the ground fog color.
Implements makVrv::DtSkyObject.
|
virtual |
Set / Get the ground fog color.
|
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 |
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 |
Set / Get whether precipitation is enabled.
Implements makVrv::DtSkyObject.
|
virtual |
Set / Get whether precipitation is enabled.
|
virtual |
Set / Get whether precipitation affects visibility.
|
virtual |
Set / Get whether precipitation affects visibility.
|
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 |
Set / Get the precipitation type.
| input | 0 = none, 1 = rain, 2 = wet snow, 3 = dry snow, 4 = sleet, 5 = hail |
|
virtual |
Set / Get the precipitation intensity.
Implements makVrv::DtSkyObject.
|
virtual |
Set / Get the precipitation intensity.
|
virtual |
Computes the precipitation at the given location. Returns true if location is in an active local area, otherwise false. If no local areas are found, then the global precipitation is given.
| location | The location to compute the precipitation intensity at. |
| type | The computed precipitation type (DtSkyObject::PrecipitationType). |
| intensity | The computed precipitation intensity. |
|
virtual |
Computes the ground rain accumulation at the given location. Returns true if location is in an active local area, otherwise false. If no local areas are found, then the given depth value is not changed.
| location | The location to compute the ground rain accumulation at. |
| depth | The computed ground rain accumulation depth. |
| blend | (0.0 to 1.0) blend value based on local area perimeter. |
|
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 |
Set / Get the wind speed in meters per second.
|
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 |
Set / Get minimum wind altitude.
|
virtual |
Set / Get maximum wind altitude.
|
virtual |
Set / Get maximum wind altitude.
|
virtual |
Set / Get use of lens flare effects.
|
virtual |
Set / Get use of lens flare effects.
|
virtual |
Set / Get use of crepuscular rays (sun rays) effects.
|
virtual |
Set / Get use of crepuscular rays (sun rays) effects.
|
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.
| 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
| DtWeatherAreaGroup* makVrv::DtOsgSkyObject::findWeatherAreaGroup | ( | ) |
Get the weather area group object. The object returned should be concidered temporary and not safe to hold onto the pointer.
| DtWeatherLayerGroup* makVrv::DtOsgSkyObject::findWeatherLayerGroup | ( | ) |
Get the weather layer group object. Athe object returned should be considered temporary and not safe to hold onto the pointer.
| 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
|
virtual |
Binds the fog froxel texture object to the given texture unit for the given render context. Returns true if the froxel texture is enabled.
| unit | The texture unit to bind to. |
| renderContextId | The current render context used for drawing. |
|
virtual |
Returns the maximum distance used for fog froxel calulations.
|
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 |