VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtEntityConditionalAudializer.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 
12 #include <vrvAudio/vrvAudio.h>
13 
16 
17 #include <matrix/vlVector.h>
18 
19 #include <set>
20 
21 namespace makVrv
22 {
26  {
27  bool myIsMovementRequired = false;
28  std::map<DtModelSemanticsMapper::States::Id, std::set<int>> myStateValueRequirements;
29  };
30 
31  class DtSoundComponentAgent;
33 
34  namespace EntityStateListener
35  {
36  enum class DamageState;
37  }
38 
44  {
45  public:
53  DtSceneObjectAgent* sceneObject, DtModelSetId modelSet);
54 
57 
60 
63 
66 
67  public:
68 
71  virtual void initialize() override;
72 
74  virtual void createModelAgents();
75 
77  virtual void destroyModelAgents();
78 
82  virtual const DtStateVisualizer::TypeInfo& typeInfo() const;
83 
86  static const DtStateVisualizer::TypeInfo& theTypeInfo();
87 
90  virtual void setModelDefinitionForAgents();
91 
93  virtual void play();
94 
96  virtual void stop();
97 
100  virtual void setIs3d(bool is3d);
101 
104  virtual bool is3d();
105 
108  virtual void setDecibel(float decibel);
109 
112  virtual float decibel();
113 
118  virtual void setOffset(const DtVector& offset);
119 
122  virtual const DtVector& offset() const;
123 
126  DtEntityStateListener& entityStateListener();
127 
129  const DtEntityStateListener& entityStateListener() const;
130  protected:
133  virtual void setInitialValuesFromVisualizerDefinition() override;
134 
139  virtual void slot_wrmStateSet(int stateNumber, int stateValue);
140 
143  virtual void playAudioBasedOnCriteria();
144 
147  virtual void connectToListenerSignals() override;
148  protected:
149  DtSoundComponentAgent* mySoundComponentAgent;
150  bool myIs3d;
151  float myDecibel;
152  DtVector myOffset;
153 
155  };
156 
161 }
DtAudioPlayCriteria myVisualizationCriteria
Conditions that determine whether the sound should be playing.
Definition: DtEntityConditionalAudializer.h:154
DtVector myOffset
Body-frame offset (forward, right, down) in metres.
Definition: DtEntityConditionalAudializer.h:152
Base class for entity state visualizers (using the DtModelVisualizer schema)
Definition: DtEntityStateVisualizer.h:22
DamageState
Definition: DtEntityStateListener.h:65
Definition: DtStateVisualizer.h:277
DtStateVisualizerCreatorTemplate< DtEntityConditionalAudializer > DtEntityConditionalAudializerCreator
Creator registered with the state visualizer factory to construct DtEntityConditionalAudializer insta...
Definition: DtEntityConditionalAudializer.h:160
Contains the DLL export macro for vrvAudio classes.
DtEntityConditionalAudializer manages the sound for an entity. The sound will update itself according...
Definition: DtEntityConditionalAudializer.h:43
The DtBaseConnection is an abstract class.
Definition: DtBaseConnection.h:35
Contains makVrv::DtModelSemanticsMapper class.
bool myIsMovementRequired
Reserved; whether movement is required for the audio to play.
Definition: DtEntityConditionalAudializer.h:27
Contains makVrv:DtEntityStateVisualizer class. Base class for other state visualizers such as articul...
#define DT_DLL_VRVAUDIO
Definition: vrvAudio.h:20
Holds the per-state conditions that must be satisfied before the conditional audializer will play...
Definition: DtEntityConditionalAudializer.h:25
DtModelSetId
Definition: DtModelSetEnums.h:19
bool myIs3d
Whether the sound is played spatialized in 3D.
Definition: DtEntityConditionalAudializer.h:150
voidpf uLong offset
Definition: ioapi.h:42
The DtStateListener is an abstract class. Subclasses implement functionality that will allow data to ...
Definition: DtStateListener.h:26
Struct to hold metadata about each functional visualizer type This allows users of the factory to get...
Definition: DtStateVisualizer.h:55
std::map< DtModelSemanticsMapper::States::Id, std::set< int > > myStateValueRequirements
Map of WRM state IDs to the set of acceptable values.
Definition: DtEntityConditionalAudializer.h:28
float myDecibel
Playback level in decibels; default is 80.
Definition: DtEntityConditionalAudializer.h:151
DtSoundComponentAgent * mySoundComponentAgent
Owned agent that performs the actual sound playback.
Definition: DtEntityConditionalAudializer.h:149
DtEntityStateListener.
Definition: DtEntityStateListener.h:138

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)