![]() |
VR-Forces Developer's Guide
|
Audializer that plays a one-shot sound for a sound interaction event.
When an interaction is received, this audializer creates a DtSoundComponentAgent and triggers a single non-looping playback. The sound can be rendered in 3D (spatialized at the interaction location) or as a flat mono signal depending on the is3d attribute in the visualizer definition. The playback volume is sourced from the visualizer definition's decibel attribute; if the network listener carries a positive decibel override, that value takes precedence for the current interaction.

Static Public Member Functions | |
| static const DtStateVisualizer::TypeInfo & | theTypeInfo () |
Protected Member Functions | |
| virtual void | setInitialValuesFromVisualizerDefinition () override |
| virtual void | connectToListenerSignals () override |
| virtual void | slot_elementIdSet () |
| virtual void | slot_locationSet () |
| virtual void | slot_relativeLocationSet () |
| virtual void | slot_decibelLevelSet () |
Protected Member Functions inherited from makVrv::DtStateVisualizer | |
| virtual void | makeVisible () |
| template<typename T , typename C > | |
| void | connectAndUpdate (boost::signalslib::signal< void(T)> &sig, void(C::*fp)(T), T val) |
Protected Attributes | |
| DtSoundInteractionStateListener * | mySoundInteractionStateListener |
| DtSoundComponentAgent * | mySoundComponentAgent |
| bool | myIs3d = false |
Protected Attributes inherited from makVrv::DtInteractionAudializer | |
| DtSoundComponentAgent * | mySoundComponentAgent |
| float | myDecibel |
| DtVector | myInteractionLocation |
| float | myDeleteDelay |
Protected Attributes inherited from makVrv::DtStateVisualizer | |
| DtBaseConnection & | mySimulation |
| DtStateListener & | myListener |
| DtUniqueID | mySceneObjectID |
| std::string | myName |
| std::string | myModelDefinition |
| DtSignalConnectionManager | myConnections |
| DtModelSetId | myModelSet |
| int | myVisualizerType |
| bool | myDistributeFlag |
| bool | myPickable |
| bool | myVisible |
| bool | myInitialInitializeDone |
| const DtVisualizerDefinition * | myVisualizerDefinition |
| DtSceneObjectAgent * | mySceneObjectAgent |
| ShowHideContextVector | myVisualizerShowHideContexts |
Additional Inherited Members | |
Public Types inherited from makVrv::DtStateVisualizer | |
| enum | Type { AllVisualizerTypes = 0, EntityVisualizerType = 1, EnvironmentalVisualizerType, InteractionVisualizerType, AggregateVisualizerType, IntervisibilityVisualizerType, TacticalSmokeVisualizerType, SoundInteractionVisualizerType, UserType = 10000 } |
Protected Types inherited from makVrv::DtStateVisualizer | |
| typedef std::vector < DtVisualizerShowHideContext::VisualizerShowHideContext > | ShowHideContextVector |
| makVrv::DtSoundInteractionAudializer::DtSoundInteractionAudializer | ( | DtBaseConnection & | simulation, |
| DtStateListener & | listener, | ||
| DtSceneObjectAgent * | sceneObject, | ||
| DtModelSetId | modelSet | ||
| ) |
Constructs the audializer and binds it to its simulation context.
| simulation | Active simulation connection used to access scene services. |
| listener | State listener supplying sound interaction data. |
| sceneObject | Scene object agent that owns this audializer, or nullptr. |
| modelSet | Model set ID used to resolve sound asset definitions. |
|
virtual |
DTOR.
|
delete |
Default Constructor not implemented - default constructor not allowed.
|
delete |
Copy Constructor not implemented - Copy not allowed.
|
static |
Returns the static TypeInfo descriptor for this class.
|
delete |
Assignment Operator not implemented - Copy not allowed.
|
overridevirtual |
Initializes the audializer.
Reads the visualizer definition attributes (is3d, decibel), establishes connections to the listener signals, and prepares the sound component agent for subsequent playback requests. Called once by the framework after construction.
Reimplemented from makVrv::DtStateVisualizer.
|
overridevirtual |
Creates the DtSoundComponentAgent used to play the interaction sound.
Called by the framework when the entity becomes visible. Creates mySoundComponentAgent and configures it with the current model definition.
Reimplemented from makVrv::DtInteractionAudializer.
|
overridevirtual |
Destroys the DtSoundComponentAgent created by createModelAgents().
Called by the framework when the entity becomes invisible or is removed.
Reimplemented from makVrv::DtInteractionAudializer.
|
virtual |
Returns the runtime TypeInfo descriptor for this instance.
Delegates to theTypeInfo(). Used by the framework's type-dispatch system.
Implements makVrv::DtStateVisualizer.
|
virtual |
Applies the resolved model definition to the sound component agent.
Determines the effective decibel level: if the listener's decibel value is not negative, that network-supplied override is used; otherwise (a negative value signals the not-set sentinel) the base-class myDecibel value read from the visualizer definition is applied. The resulting definition is forwarded to mySoundComponentAgent.
Reimplemented from makVrv::DtInteractionAudializer.
|
overrideprotectedvirtual |
Reads initial attribute values from the visualizer definition.
Reads the "is3d" boolean attribute and the "decibel" float attribute from the visualizer definition if they are present, storing the results in myIs3d and the base-class myDecibel respectively.
Reimplemented from makVrv::DtInteractionAudializer.
|
overrideprotectedvirtual |
Connects this audializer's slots to the listener's Boost signals.
Reimplemented from makVrv::DtStateVisualizer.
|
protectedvirtual |
Slot invoked when the listener's source element ID changes.
|
protectedvirtual |
Slot invoked when the listener's absolute location changes.
|
protectedvirtual |
Slot invoked when the listener's relative location changes.
|
protectedvirtual |
Slot invoked when the listener's decibel level changes.
|
protected |
Typed pointer to the sound interaction listener; not owned.
|
protected |
Sound component agent that performs the actual one-shot playback.
|
protected |
When true the sound is spatialized at the interaction location; when false it is played as a flat mono signal.