VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtVisibilitySoundBehavior.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
16 
17 #include <atomic>
18 #include <map>
19 #include <memory>
20 #include <string>
21 #include <vector>
22 
23 namespace makVrv
24 {
25  class DtProceduralSound;
26  class DtDe;
27 
39  {
40  public:
43  explicit DtVisibilitySoundBehavior(const DtVisibilitySoundConfig& config);
44 
48  void setupSound(DtProceduralSound& sound, DtDe& de) override;
49 
52  void update(DtDe& de) override;
53 
57  bool isActive(const DtProceduralSoundBehaviorContext& ctx) const override;
58 
63  float currentVolumeDb(const DtProceduralSoundBehaviorContext& ctx,
64  float channelBaseVolumeDb) const override;
65 
69  void setLocalVisibilityOverride(bool hazy, float visibilityMeters) override;
70 
73  void setProximityDistance(double distanceMeters) override;
74 
77  bool isInRange() const override;
78 
81  bool usingLocalOverride() const override;
82 
84  void appendImGuiDebugInfo() const override;
85 
86  private:
88  std::atomic<float> myFogIntensity;
89  std::atomic<bool> myIsHazy;
90  std::atomic<bool> myHasLocalVisOverride;
93  std::atomic<bool> myLocalHazy;
95  std::atomic<float> myLocalVisMeters;
97  std::atomic<bool> myIsInRange;
99  std::atomic<bool> myUsingLocalOverride;
101  std::vector<std::unique_ptr<DtTierSlotBehavior>> mySlots;
102  };
103 
107  {
108  public:
114  DtDe& de,
115  const std::map<std::string, std::string>& params) override;
116  };
117 
118 } // namespace makVrv
Full configuration for DtVisibilitySoundBehavior.
Definition: DtVisibilitySoundConfig.h:45
std::atomic< bool > myIsInRange
True when the entity is within maxRangeMeters of the listener (or when maxRangeMeters == 0)...
Definition: DtVisibilitySoundBehavior.h:97
std::atomic< float > myLocalVisMeters
Local weather area raw visibility in metres, written by setLocalVisibilityOverride().
Definition: DtVisibilitySoundBehavior.h:95
Read-only context passed to every DtProceduralSoundBehavior callback.
Definition: DtProceduralSoundBehaviorContext.h:20
DtProceduralSoundBehavior that adapts audio to the current visibility distance.
Definition: DtVisibilitySoundBehavior.h:38
std::atomic< float > myFogIntensity
Normalised fog intensity [0,1]; updated by update().
Definition: DtVisibilitySoundBehavior.h:88
Abstract factory interface for creating a named DtProceduralSoundBehavior.
Definition: DtProceduralSoundBehaviorCreator.h:92
std::atomic< bool > myLocalHazy
Local weather area hazy gate, written by setLocalVisibilityOverride().
Definition: DtVisibilitySoundBehavior.h:93
std::atomic< bool > myIsHazy
True when visibility is below clearVisibilityMeters.
Definition: DtVisibilitySoundBehavior.h:89
Composes multiple DtProceduralSoundLayer pools into one streaming ambient sound.
Definition: DtProceduralSound.h:61
std::vector< std::unique_ptr< DtTierSlotBehavior > > mySlots
Per-tier slot behaviors.
Definition: DtVisibilitySoundBehavior.h:101
DtProceduralSoundBehaviorCreator for the &quot;Visibility&quot; behavior.
Definition: DtVisibilitySoundBehavior.h:106
Contains makVrv::DtProceduralSoundBehaviorCreator abstract base class.
Contains makVrv::DtVisibilitySoundTier and makVrv::DtVisibilitySoundConfig.
Optional per-channel behavior hook for DtProceduralSoundPlayer.
Definition: DtProceduralSoundBehavior.h:40
#define DT_DLL_VRVAUDIO
Definition: vrvAudio.h:20
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
std::atomic< bool > myUsingLocalOverride
True when the local weather area path was taken in the last update().
Definition: DtVisibilitySoundBehavior.h:99
Contains makVrv::DtProceduralSoundBehavior base class.
DtVisibilitySoundConfig myConfig
Full tier configuration.
Definition: DtVisibilitySoundBehavior.h:87
Contains makVrv::DtTierGainCurve and makVrv::DtTierSlotBehavior.

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)