![]() |
VR-Forces 4.5 Class Documentation
|
A group node which adds a silver-lining sky and will light all Children with the proper lighting parameters. More...

Classes | |
| struct | CloudLayer |
Public Member Functions | |
| DtSilverliningGroup (DtDe &de) | |
| CTOR. | |
| virtual | ~DtSilverliningGroup () |
| DTOR. | |
| void | setGenerateCubeMaps (bool enabled) |
| Enable auto-generation of cube maps from the sky. | |
| void | setCubeMapGenerationDistanceThreshold (double threshold) |
| Set the distance threshold for re-generating cube maps. | |
| unsigned int | getCubeMap (const osg::ref_ptr< osg::Camera > &camera) const |
| Retrieve a texture ID for a cube map containing the local sky for a given camera. | |
| unsigned int | getPrimaryCubeMap () const |
| Retrieve a texture ID for a cube map containing the local sky for general use. | |
| void | installIntoChannel (DtChannel *) |
| void | applyFog (osg::ref_ptr< osg::Camera > camera) |
| Apply fog for a given camera. | |
| void | deleteGeods () |
| Tell the silver-lining group to delete its specific children. | |
| void | setGeocentricMode (bool mode) |
| Set the group to be in geocentric mode. | |
| bool | geocentricMode () const |
| Get the simulation are in geocentric mode. | |
| void | setHiResCumulus (bool enabled) |
| Sets use of high-resolution (lower performance) cumulus clouds. | |
| bool | hiResCumulus () const |
| Gets use of high-resolution cumulus clouds. | |
| void | setLensFlare (bool enabled) |
| Set use of lens flare effects. | |
| bool | lensFlare () const |
| Get the use of lens flare effects. | |
| void | setCrepuscularRays (bool enabled) |
| Set use of crepuscular rays (sun rays) effects. | |
| bool | crepuscularRays () const |
| Get the use of crepuscular rays (sun rays) effects. | |
| void | setForcedMoonPhase (float phase) |
| Forces the moon phase regardless of simulated date. 0 = new moon, 1.0 = full moon. | |
| void | clearForcedMoonPhase () |
| Clears a forced moon phase and goes back to simulating it based on the date. | |
| bool | moonPhaseIsForced () const |
| Retrieves whether a forced moon phase is being used. | |
| float | forcedMoonPhase () const |
| Retrieves the forced moon phase (if any) | |
| void | setForcedSunAndMoon (double sunLat, double sunLon, double moonLat, double moonLon, bool horizonCoords=true) |
| Force latitude and longitude of the sun & moon to specified positions, using horizon (default) or ecliptic coordinates Note latitudes and longitudes are in radians. | |
| void | clearForcedSunAndMoon () |
| bool | sunAndMoonPositionIsForced () const |
| Retrieves whether a forced sun and moon is being used. | |
| void | getForcedSunAndMoonPosition (double &sunLat, double &sunLon, double &moonLat, double &moonLon, bool &horizonCoords) const |
| Retrieves the forced sun an moon position (if any) | |
| *void | setLightPollution (double Wm2) |
| Sets the simulated amount of nighttime light pollution, in watts per square meter. | |
| double | lightPollution () const |
| Gets the simulated light pollution in watts per square meter. | |
| virtual void | setDateAndTime (unsigned short year, unsigned char month, unsigned char day, unsigned char hour, unsigned char minutes, double seconds, bool observeDaylightSavings) |
| Setup the date and time of silver lining. | |
| virtual void | updateTime () |
| Update the time in the atmosphere. | |
| virtual void | setLocation (const DtVector &location) |
| Set the location using a local coordinate (it will be converted to the global coordinate using the current coordinate system). | |
| virtual void | update (const osg::Matrix &m) |
| Update the lighting. | |
| virtual void | update2D (const osg::Matrix &m) |
| Update the lighting in 2D mode. | |
| virtual void | updateConditions (DtOsgSkyObject *skyObject) |
| Update all conditions from a DtOsgSkyObject. | |
| int | cloudLayerCount () const |
| Get the number of cloud layers. | |
| void | removeCloudLayer (int index) |
| Remove a cloud layer. | |
| void | setFogColor (const osg::Vec4f &rgbA) |
| Set the fog color (which will be lit based on time of day) when visibility gets below the fog threshold distance. | |
| void | setFogHeight (float height) |
| Sets the simulated height of the fog on the skybox only. | |
| void | setFogBlend (const osg::Vec4f &rgbA, float density) |
| Set parameters to blend with the fog specified in setFogColor. | |
| void | setFogOverride (osg::ref_ptr< osg::Camera > camera, const osg::Vec4f &rgbA, float density) |
| Override all fog computations to the given fog color & density. | |
| void | setFogThresholdDistance (float distance) |
| Sets the visibility distance at which fog effects kick in instead of haze. | |
| void | setHorizonColor (const osg::Vec4f &rgbA) |
| Set the color of the sky at and below the horizon. | |
| void | setCubeMapDirty () |
| Set the cube map dirty flag. | |
| void | setUse16BitEnviroMap (bool flag) |
| Set the silverlining atmosphere to use a 16 bit environment map. | |
| bool | getUse16BitEnviroMap () |
| Get whether or not the atmosphere should use a 16 bit environment map. | |
| void | setUsingSensorFXShader (bool flag) |
| Set the flag that silverlining is using the sensorFX shaders. | |
| bool | getUsingSensorFXShader () |
| Get the flag that silverlining is using the sensorFX shaders. | |
| void | clearHorizonColor () |
| Clear usage of a set horizon color. | |
| void | clearFogOverride (osg::ref_ptr< osg::Camera > camera) |
| Undo any override for fog previously set. | |
| void | clearFogOverrideForAllCameras (void) |
| virtual void | setUseGlobalTimeZone (bool b) |
| If set to true at next update use UTC time to position sun/moon, else use local timezone based on the position of the observer. | |
| virtual bool | useGlobalTimeZone () const |
| Get the current value of using GMT time for observer. | |
| float | getSunAlpha () const |
| Gets the alpha value of the sun disc (affected by fog) | |
| void | setDrawSunAndMoonIntoEnvMap (bool draw) |
| Sets whether the sun and moon are drawn into the environment map for reflections. | |
| bool | drawSunAndMoonIntoEnvMap () const |
| Gets whether the sun and moon are drawn into the environment map for reflections. | |
| float | getSkyCoverage () const |
| Retrieve the percentage of sky occluded by clouds, above the current camera position. | |
| void | addCirroCumulus (const DtVector &position, const DtVector &bounds, bool infinite, bool relative) |
| Add cirrus clouds too the scene. | |
| void | addCirrusFibratus (const DtVector &position, const DtVector &bounds, bool infinite, bool relative) |
| void | addNimbostratus (const DtVector &position, const DtVector &bounds, double density, bool infinite, bool relative) |
| void | addCumulusMediocris (const DtVector &position, const DtVector &bounds, double density, bool infinite, bool relative) |
| void | addCumulusCongestus (const DtVector &position, const DtVector &bounds, double density, bool infinite, bool relative) |
| void | addCumulonumbusCappilatus (const DtVector &position, const DtVector &bounds, double density, bool relative) |
| void | addStratocumulus (const DtVector &position, const DtVector &bounds, double density, bool infinite, bool relative) |
| void | setCloudLayerEnabled (int index, bool enabled) |
| void | setCloudLayerPosition (int index, double xCoord, double yCoord) |
| void | setWind (double directionDEN, double minAltitude, double maxAltitude, double velocity) |
| void | setAirTurbidity (float turbidity) |
| void | setVisibleDistance (float distance) |
| float | getVisibleDistance () const |
| void | createAtmosphere () |
| void | destroyAtmosphere () |
| bool | getFailedInit () |
| void | addRain (float mmPerHour, bool global) |
| void | addSleet (float mmPerHour, bool global) |
| void | addSnow (float mmPerHour, bool global, bool wet) |
| void | clearAllPrecipitation () |
| void | realizeLayers () |
| SilverLining::Atmosphere * | findAtmosphere () |
| DtDe & | getDtDe () |
| void | getGMTDateTime (long &julianDate, double &GMTTod) |
| osg::Node * | getCloudsNode () |
| osg::Node * | getSkyNode () |
| std::vector< unsigned int > | getDefaultShaderVector () |
| void | setSunMoonEnabled (bool drawSunMoon) |
| bool | getSunMoonEnabled () |
| void | setStarsEnabled (bool drawStars) |
| bool | getStarsEnabled () |
| void | enableLighting (osg::ref_ptr< osg::Camera > camera, bool enable) |
| virtual void | setEnableHDR (bool enable) |
| allows a plugin to turn on or off HDR in silverlining | |
| virtual osg::LightSource * | skyLight () |
| getter for skyLight so Triton can use it for it's lighting | |
Protected Types | |
| typedef std::vector< CloudLayer > | CloudLayerList |
| typedef std::map< osg::ref_ptr < osg::Camera >, bool > | FogOverrideMap |
Protected Member Functions | |
| void | addLayer (const CloudLayer &layer) |
| Add layer. | |
| void | realizeLayer (CloudLayer &layer) |
| Realize Layer. | |
| void | destroyLayer (DtSilverliningGroup::CloudLayer &layer) |
| int | CalculateZoneByLongitude (double longitude) |
| void | SetTimeAndLocation () |
| void | addPrecipitationToClouds (int type, float mmPerHour) |
| void | updatePrecipitation () |
| void | setCloudVisibility () |
| virtual void | traverse (osg::NodeVisitor &nv) |
| Traverse. | |
| void | resetLayers () |
| void | forceResetLayers () |
| void | generateCubeMap (const osg::Matrix &viewMatrix) |
| virtual void | slot_reloadShader () |
| handle the reload shaders signal so the fog shader can be reloaded. | |
A group node which adds a silver-lining sky and will light all Children with the proper lighting parameters.
|
protected |
|
protected |
| makVrv::DtSilverliningGroup::DtSilverliningGroup | ( | DtDe & | de | ) |
CTOR.
|
virtual |
DTOR.
| void makVrv::DtSilverliningGroup::setGenerateCubeMaps | ( | bool | enabled | ) |
Enable auto-generation of cube maps from the sky.
| void makVrv::DtSilverliningGroup::setCubeMapGenerationDistanceThreshold | ( | double | threshold | ) |
Set the distance threshold for re-generating cube maps.
| unsigned int makVrv::DtSilverliningGroup::getCubeMap | ( | const osg::ref_ptr< osg::Camera > & | camera | ) | const |
Retrieve a texture ID for a cube map containing the local sky for a given camera.
| unsigned int makVrv::DtSilverliningGroup::getPrimaryCubeMap | ( | ) | const |
Retrieve a texture ID for a cube map containing the local sky for general use.
| void makVrv::DtSilverliningGroup::installIntoChannel | ( | DtChannel * | ) |
| void makVrv::DtSilverliningGroup::applyFog | ( | osg::ref_ptr< osg::Camera > | camera | ) |
Apply fog for a given camera.
| void makVrv::DtSilverliningGroup::deleteGeods | ( | ) |
Tell the silver-lining group to delete its specific children.
| void makVrv::DtSilverliningGroup::setGeocentricMode | ( | bool | mode | ) |
Set the group to be in geocentric mode.
| bool makVrv::DtSilverliningGroup::geocentricMode | ( | ) | const |
Get the simulation are in geocentric mode.
| void makVrv::DtSilverliningGroup::setHiResCumulus | ( | bool | enabled | ) |
Sets use of high-resolution (lower performance) cumulus clouds.
| bool makVrv::DtSilverliningGroup::hiResCumulus | ( | ) | const |
Gets use of high-resolution cumulus clouds.
| void makVrv::DtSilverliningGroup::setLensFlare | ( | bool | enabled | ) |
Set use of lens flare effects.
| bool makVrv::DtSilverliningGroup::lensFlare | ( | ) | const |
Get the use of lens flare effects.
| void makVrv::DtSilverliningGroup::setCrepuscularRays | ( | bool | enabled | ) |
Set use of crepuscular rays (sun rays) effects.
| bool makVrv::DtSilverliningGroup::crepuscularRays | ( | ) | const |
Get the use of crepuscular rays (sun rays) effects.
| void makVrv::DtSilverliningGroup::setForcedMoonPhase | ( | float | phase | ) |
Forces the moon phase regardless of simulated date. 0 = new moon, 1.0 = full moon.
| void makVrv::DtSilverliningGroup::clearForcedMoonPhase | ( | ) |
Clears a forced moon phase and goes back to simulating it based on the date.
| bool makVrv::DtSilverliningGroup::moonPhaseIsForced | ( | ) | const |
Retrieves whether a forced moon phase is being used.
| float makVrv::DtSilverliningGroup::forcedMoonPhase | ( | ) | const |
Retrieves the forced moon phase (if any)
| void makVrv::DtSilverliningGroup::setForcedSunAndMoon | ( | double | sunLat, |
| double | sunLon, | ||
| double | moonLat, | ||
| double | moonLon, | ||
| bool | horizonCoords = true |
||
| ) |
Force latitude and longitude of the sun & moon to specified positions, using horizon (default) or ecliptic coordinates Note latitudes and longitudes are in radians.
| void makVrv::DtSilverliningGroup::clearForcedSunAndMoon | ( | ) |
| bool makVrv::DtSilverliningGroup::sunAndMoonPositionIsForced | ( | ) | const |
Retrieves whether a forced sun and moon is being used.
| void makVrv::DtSilverliningGroup::getForcedSunAndMoonPosition | ( | double & | sunLat, |
| double & | sunLon, | ||
| double & | moonLat, | ||
| double & | moonLon, | ||
| bool & | horizonCoords | ||
| ) | const |
Retrieves the forced sun an moon position (if any)
| * void makVrv::DtSilverliningGroup::setLightPollution | ( | double | Wm2 | ) |
Sets the simulated amount of nighttime light pollution, in watts per square meter.
Defaults to zero. A reasonable value would be in the order of 0.01
| double makVrv::DtSilverliningGroup::lightPollution | ( | ) | const |
Gets the simulated light pollution in watts per square meter.
|
virtual |
Setup the date and time of silver lining.
|
virtual |
Update the time in the atmosphere.
|
virtual |
Set the location using a local coordinate (it will be converted to the global coordinate using the current coordinate system).
|
virtual |
Update the lighting.
|
virtual |
Update the lighting in 2D mode.
|
virtual |
Update all conditions from a DtOsgSkyObject.
| int makVrv::DtSilverliningGroup::cloudLayerCount | ( | ) | const |
Get the number of cloud layers.
| void makVrv::DtSilverliningGroup::removeCloudLayer | ( | int | index | ) |
Remove a cloud layer.
| void makVrv::DtSilverliningGroup::setFogColor | ( | const osg::Vec4f & | rgbA | ) |
Set the fog color (which will be lit based on time of day) when visibility gets below the fog threshold distance.
| void makVrv::DtSilverliningGroup::setFogHeight | ( | float | height | ) |
Sets the simulated height of the fog on the skybox only.
| void makVrv::DtSilverliningGroup::setFogBlend | ( | const osg::Vec4f & | rgbA, |
| float | density | ||
| ) |
Set parameters to blend with the fog specified in setFogColor.
The the fog alpha is the blend parameter w/ 1.0 is 100% user set fog.
| void makVrv::DtSilverliningGroup::setFogOverride | ( | osg::ref_ptr< osg::Camera > | camera, |
| const osg::Vec4f & | rgbA, | ||
| float | density | ||
| ) |
Override all fog computations to the given fog color & density.
| void makVrv::DtSilverliningGroup::setFogThresholdDistance | ( | float | distance | ) |
Sets the visibility distance at which fog effects kick in instead of haze.
| void makVrv::DtSilverliningGroup::setHorizonColor | ( | const osg::Vec4f & | rgbA | ) |
Set the color of the sky at and below the horizon.
| void makVrv::DtSilverliningGroup::setCubeMapDirty | ( | ) |
Set the cube map dirty flag.
| void makVrv::DtSilverliningGroup::setUse16BitEnviroMap | ( | bool | flag | ) |
Set the silverlining atmosphere to use a 16 bit environment map.
| bool makVrv::DtSilverliningGroup::getUse16BitEnviroMap | ( | ) |
Get whether or not the atmosphere should use a 16 bit environment map.
| void makVrv::DtSilverliningGroup::setUsingSensorFXShader | ( | bool | flag | ) |
Set the flag that silverlining is using the sensorFX shaders.
| bool makVrv::DtSilverliningGroup::getUsingSensorFXShader | ( | ) |
Get the flag that silverlining is using the sensorFX shaders.
| void makVrv::DtSilverliningGroup::clearHorizonColor | ( | ) |
Clear usage of a set horizon color.
| void makVrv::DtSilverliningGroup::clearFogOverride | ( | osg::ref_ptr< osg::Camera > | camera | ) |
Undo any override for fog previously set.
| void makVrv::DtSilverliningGroup::clearFogOverrideForAllCameras | ( | void | ) |
|
virtual |
If set to true at next update use UTC time to position sun/moon, else use local timezone based on the position of the observer.
|
virtual |
Get the current value of using GMT time for observer.
| float makVrv::DtSilverliningGroup::getSunAlpha | ( | ) | const |
Gets the alpha value of the sun disc (affected by fog)
| void makVrv::DtSilverliningGroup::setDrawSunAndMoonIntoEnvMap | ( | bool | draw | ) |
Sets whether the sun and moon are drawn into the environment map for reflections.
| bool makVrv::DtSilverliningGroup::drawSunAndMoonIntoEnvMap | ( | ) | const |
Gets whether the sun and moon are drawn into the environment map for reflections.
| float makVrv::DtSilverliningGroup::getSkyCoverage | ( | ) | const |
Retrieve the percentage of sky occluded by clouds, above the current camera position.
| void makVrv::DtSilverliningGroup::addCirroCumulus | ( | const DtVector & | position, |
| const DtVector & | bounds, | ||
| bool | infinite, | ||
| bool | relative | ||
| ) |
Add cirrus clouds too the scene.
| void makVrv::DtSilverliningGroup::addCirrusFibratus | ( | const DtVector & | position, |
| const DtVector & | bounds, | ||
| bool | infinite, | ||
| bool | relative | ||
| ) |
| void makVrv::DtSilverliningGroup::addNimbostratus | ( | const DtVector & | position, |
| const DtVector & | bounds, | ||
| double | density, | ||
| bool | infinite, | ||
| bool | relative | ||
| ) |
| void makVrv::DtSilverliningGroup::addCumulusMediocris | ( | const DtVector & | position, |
| const DtVector & | bounds, | ||
| double | density, | ||
| bool | infinite, | ||
| bool | relative | ||
| ) |
| void makVrv::DtSilverliningGroup::addCumulusCongestus | ( | const DtVector & | position, |
| const DtVector & | bounds, | ||
| double | density, | ||
| bool | infinite, | ||
| bool | relative | ||
| ) |
| void makVrv::DtSilverliningGroup::addCumulonumbusCappilatus | ( | const DtVector & | position, |
| const DtVector & | bounds, | ||
| double | density, | ||
| bool | relative | ||
| ) |
| void makVrv::DtSilverliningGroup::addStratocumulus | ( | const DtVector & | position, |
| const DtVector & | bounds, | ||
| double | density, | ||
| bool | infinite, | ||
| bool | relative | ||
| ) |
| void makVrv::DtSilverliningGroup::setWind | ( | double | directionDEN, |
| double | minAltitude, | ||
| double | maxAltitude, | ||
| double | velocity | ||
| ) |
| void makVrv::DtSilverliningGroup::setAirTurbidity | ( | float | turbidity | ) |
| void makVrv::DtSilverliningGroup::setVisibleDistance | ( | float | distance | ) |
| float makVrv::DtSilverliningGroup::getVisibleDistance | ( | ) | const |
| void makVrv::DtSilverliningGroup::createAtmosphere | ( | ) |
| void makVrv::DtSilverliningGroup::destroyAtmosphere | ( | ) |
|
inline |
| void makVrv::DtSilverliningGroup::addRain | ( | float | mmPerHour, |
| bool | global | ||
| ) |
| void makVrv::DtSilverliningGroup::addSleet | ( | float | mmPerHour, |
| bool | global | ||
| ) |
| void makVrv::DtSilverliningGroup::clearAllPrecipitation | ( | ) |
| void makVrv::DtSilverliningGroup::realizeLayers | ( | ) |
| SilverLining::Atmosphere* makVrv::DtSilverliningGroup::findAtmosphere | ( | ) |
| DtDe& makVrv::DtSilverliningGroup::getDtDe | ( | ) |
| osg::Node* makVrv::DtSilverliningGroup::getCloudsNode | ( | ) |
| osg::Node* makVrv::DtSilverliningGroup::getSkyNode | ( | ) |
| std::vector<unsigned int> makVrv::DtSilverliningGroup::getDefaultShaderVector | ( | ) |
| void makVrv::DtSilverliningGroup::setSunMoonEnabled | ( | bool | drawSunMoon | ) |
| bool makVrv::DtSilverliningGroup::getSunMoonEnabled | ( | ) |
| void makVrv::DtSilverliningGroup::setStarsEnabled | ( | bool | drawStars | ) |
| bool makVrv::DtSilverliningGroup::getStarsEnabled | ( | ) |
| void makVrv::DtSilverliningGroup::enableLighting | ( | osg::ref_ptr< osg::Camera > | camera, |
| bool | enable | ||
| ) |
|
virtual |
allows a plugin to turn on or off HDR in silverlining
|
virtual |
getter for skyLight so Triton can use it for it's lighting
|
protected |
Add layer.
|
protected |
Realize Layer.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
Traverse.
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
handle the reload shaders signal so the fog shader can be reloaded.
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
my atmosphere.
|
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 |
|
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 |