![]() |
VR-Forces Developer's Guide
|
Per-De abstract interface for querying local weather area conditions at a world position.
This interface is stored as a per-De instance (via DtDe::registerInstance) and is accessible to any vrvCore or vrvAudio code that holds a DtDe reference. The concrete implementation is provided by vrvOsg (DtOsgLocalWeatherQuery) and registered during DtOsgSkyObject construction. When vrvOsg is not present, findInstance() returns nullptr and all call sites silently skip local weather area queries, falling back to global environment state.
Both queries apply the same bounds scale and edge-fade logic used by the visual renderer (DtWeatherArea::computeLocalPrecipitation / computeLocalWind), so audio onset is guaranteed to match the visual precipitation boundary.

Public Member Functions | |
| virtual | ~DtLocalWeatherQuery () |
| virtual bool | getLocalPrecipitation (const DtVector &observerPos, bool &raining, float &normalizedIntensity) const =0 |
| virtual bool | getLocalWind (const DtVector &observerPos, bool &audible, float &speedMs, float &directionRad) const =0 |
| virtual bool | getLocalVisibility (const DtVector &observerPos, float &visibilityMeters) const =0 |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtLocalWeatherQuery * | findInstance (DtDe &de) |
| static void | registerInstance (DtDe &de, DtLocalWeatherQuery *query) |
| static const std::string & | theClassName () |
Protected Member Functions | |
| DtLocalWeatherQuery () | |
Private Member Functions | |
| DtLocalWeatherQuery (const DtLocalWeatherQuery &)=delete | |
| DtLocalWeatherQuery & | operator= (const DtLocalWeatherQuery &)=delete |
|
virtual |
DTOR.
|
protected |
|
privatedelete |
|
static |
Look up the per-De instance.
|
static |
Register (or replace) the per-De instance. Called once per De during DtOsgSkyObject construction.
|
static |
Return the class name used for registration.
|
pure virtual |
Query whether a local rain area covers the observer position.
Returns true if the observer is within the fade range of at least one active local weather area that has rain precipitation.
| observerPos | Geocentric world position of the observer. |
| raining | Set to true if a rain area covers the position. |
| normalizedIntensity | Blended precipitation intensity in [0, 1]. 1.0 = fully inside the area; 0.0 = at the outer edge of the edge-fade zone. Always 0 when raining is false. |
Implemented in makVrv::DtOsgLocalWeatherQuery.
|
pure virtual |
Query local wind speed and direction at the observer position.
Returns true if the observer is within the fade range of at least one active local weather area that has wind data.
| observerPos | Geocentric world position of the observer. |
| audible | Set to true if a local wind area covers the position. |
| speedMs | Blended wind speed in metres per second. |
| directionRad | Wind bearing in radians, clockwise from north (meteorological blowing-from convention). |
Implemented in makVrv::DtOsgLocalWeatherQuery.
|
pure virtual |
Query local visibility distance at the observer position.
Returns true if the observer is within the fade range of at least one active local weather area that has visibility data. The returned visibility is the lowest (densest fog) among all covering areas.
| observerPos | Geocentric world position of the observer. |
| visibilityMeters | Visibility distance in metres from the densest covering area. |
Implemented in makVrv::DtOsgLocalWeatherQuery.
|
privatedelete |