VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions
makVrv::DtLocalWeatherQuery Class Referenceabstract

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.

Inheritance diagram for makVrv::DtLocalWeatherQuery:
Inheritance graph
[legend]

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
 

Constructor & Destructor Documentation

virtual makVrv::DtLocalWeatherQuery::~DtLocalWeatherQuery ( )
virtual

DTOR.

makVrv::DtLocalWeatherQuery::DtLocalWeatherQuery ( )
protected
makVrv::DtLocalWeatherQuery::DtLocalWeatherQuery ( const DtLocalWeatherQuery &  )
privatedelete

Member Function Documentation

static DtLocalWeatherQuery* makVrv::DtLocalWeatherQuery::findInstance ( DtDe &  de)
static

Look up the per-De instance.

Returns
nullptr if no implementation has been registered (e.g. vrvOsg absent).
static void makVrv::DtLocalWeatherQuery::registerInstance ( DtDe &  de,
DtLocalWeatherQuery *  query 
)
static

Register (or replace) the per-De instance. Called once per De during DtOsgSkyObject construction.

static const std::string& makVrv::DtLocalWeatherQuery::theClassName ( )
static

Return the class name used for registration.

virtual bool makVrv::DtLocalWeatherQuery::getLocalPrecipitation ( const DtVector &  observerPos,
bool &  raining,
float &  normalizedIntensity 
) const
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.

Parameters
observerPosGeocentric world position of the observer.
rainingSet to true if a rain area covers the position.
normalizedIntensityBlended 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.
Returns
true if any local rain area was found.

Implemented in makVrv::DtOsgLocalWeatherQuery.

virtual bool makVrv::DtLocalWeatherQuery::getLocalWind ( const DtVector &  observerPos,
bool &  audible,
float &  speedMs,
float &  directionRad 
) const
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.

Parameters
observerPosGeocentric world position of the observer.
audibleSet to true if a local wind area covers the position.
speedMsBlended wind speed in metres per second.
directionRadWind bearing in radians, clockwise from north (meteorological blowing-from convention).
Returns
true if any local wind area was found.

Implemented in makVrv::DtOsgLocalWeatherQuery.

virtual bool makVrv::DtLocalWeatherQuery::getLocalVisibility ( const DtVector &  observerPos,
float &  visibilityMeters 
) const
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.

Parameters
observerPosGeocentric world position of the observer.
visibilityMetersVisibility distance in metres from the densest covering area.
Returns
true if any local visibility area was found.

Implemented in makVrv::DtOsgLocalWeatherQuery.

DtLocalWeatherQuery& makVrv::DtLocalWeatherQuery::operator= ( const DtLocalWeatherQuery &  )
privatedelete

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)