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 | Protected Attributes
makVrv::DtSoundInteractionAudializer Class Reference

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.

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

Public Member Functions

 DtSoundInteractionAudializer (DtBaseConnection &simulation, DtStateListener &listener, DtSceneObjectAgent *sceneObject, DtModelSetId modelSet)
 
virtual ~DtSoundInteractionAudializer ()
 
 DtSoundInteractionAudializer ()=delete
 
 DtSoundInteractionAudializer (const DtSoundInteractionAudializer &)=delete
 
DtSoundInteractionAudializer & operator= (const DtSoundInteractionAudializer &)=delete
 
virtual void initialize () override
 
virtual void createModelAgents () override
 
virtual void destroyModelAgents () override
 
virtual const TypeInfo & typeInfo () const
 
virtual void setModelDefinitionForAgents ()
 
- Public Member Functions inherited from makVrv::DtInteractionAudializer
 DtInteractionAudializer (DtBaseConnection &simulation, DtStateListener &listener, DtSceneObjectAgent *sceneObject, DtModelSetId modelSet)
 
virtual ~DtInteractionAudializer ()
 
virtual void setInteractionLocation (DtVector location)
 
virtual DtVector interactionLocation ()
 
virtual void setDecibel (float decibel)
 
virtual float decibel ()
 
virtual void setDeleteDelay (float delay)
 
virtual float deleteDelay ()
 
- Public Member Functions inherited from makVrv::DtStateVisualizer
 DtStateVisualizer (DtBaseConnection &connection, DtStateListener &listener, DtSceneObjectAgent *sceneObjectAgent, DtModelSetId modelSet)
 
virtual ~DtStateVisualizer ()
 
virtual DtModelSetId modelSet ()
 
virtual void setSceneObjectAgent (DtSceneObjectAgent *sceneObject)
 
void setModelDefinition (const std::string &definition)
 
const std::string & modelDefinition () const
 
virtual void implementVisibility (bool visible)
 
virtual void slot_setSelected (bool b)
 
void setName (const std::string &)
 
const std::string & name () const
 
virtual void setPickable (bool)
 
virtual bool pickable () const
 
virtual DtUniqueID sceneObjectID () const
 
int visualizerType () const
 
virtual void setVisualizerDefinition (const DtVisualizerDefinition &)
 
DtStateListener & listener ()
 
const DtStateListener & listener () const
 
DtBaseConnection & simulation ()
 
void setDistribute (bool b)
 
bool distribute () const
 
virtual bool isVisible () const
 
virtual bool setVisualizerIsVisible (bool vis, DtVisualizerShowHideContext::VisualizerShowHideContext context)
 

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
 

Constructor & Destructor Documentation

makVrv::DtSoundInteractionAudializer::DtSoundInteractionAudializer ( DtBaseConnection &  simulation,
DtStateListener &  listener,
DtSceneObjectAgent *  sceneObject,
DtModelSetId  modelSet 
)

Constructs the audializer and binds it to its simulation context.

Parameters
simulationActive simulation connection used to access scene services.
listenerState listener supplying sound interaction data.
sceneObjectScene object agent that owns this audializer, or nullptr.
modelSetModel set ID used to resolve sound asset definitions.
virtual makVrv::DtSoundInteractionAudializer::~DtSoundInteractionAudializer ( )
virtual

DTOR.

makVrv::DtSoundInteractionAudializer::DtSoundInteractionAudializer ( )
delete

Default Constructor not implemented - default constructor not allowed.

makVrv::DtSoundInteractionAudializer::DtSoundInteractionAudializer ( const DtSoundInteractionAudializer &  )
delete

Copy Constructor not implemented - Copy not allowed.

Member Function Documentation

static const DtStateVisualizer::TypeInfo& makVrv::DtSoundInteractionAudializer::theTypeInfo ( )
static

Returns the static TypeInfo descriptor for this class.

Returns
Reference to the class-level TypeInfo used by the factory system.
DtSoundInteractionAudializer& makVrv::DtSoundInteractionAudializer::operator= ( const DtSoundInteractionAudializer &  )
delete

Assignment Operator not implemented - Copy not allowed.

virtual void makVrv::DtSoundInteractionAudializer::initialize ( )
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.

virtual void makVrv::DtSoundInteractionAudializer::createModelAgents ( )
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.

virtual void makVrv::DtSoundInteractionAudializer::destroyModelAgents ( )
overridevirtual

Destroys the DtSoundComponentAgent created by createModelAgents().

Called by the framework when the entity becomes invisible or is removed.

Reimplemented from makVrv::DtInteractionAudializer.

virtual const TypeInfo& makVrv::DtSoundInteractionAudializer::typeInfo ( ) const
virtual

Returns the runtime TypeInfo descriptor for this instance.

Delegates to theTypeInfo(). Used by the framework's type-dispatch system.

Returns
Reference to this class's TypeInfo.

Implements makVrv::DtStateVisualizer.

virtual void makVrv::DtSoundInteractionAudializer::setModelDefinitionForAgents ( )
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.

virtual void makVrv::DtSoundInteractionAudializer::setInitialValuesFromVisualizerDefinition ( )
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.

Note
Do not call this directly. It is invoked by DtStateVisualizer::initialize() during startup.

Reimplemented from makVrv::DtInteractionAudializer.

virtual void makVrv::DtSoundInteractionAudializer::connectToListenerSignals ( )
overrideprotectedvirtual

Connects this audializer's slots to the listener's Boost signals.

Note
Called automatically by DtStateVisualizer::initialize().

Reimplemented from makVrv::DtStateVisualizer.

virtual void makVrv::DtSoundInteractionAudializer::slot_elementIdSet ( )
protectedvirtual

Slot invoked when the listener's source element ID changes.

virtual void makVrv::DtSoundInteractionAudializer::slot_locationSet ( )
protectedvirtual

Slot invoked when the listener's absolute location changes.

virtual void makVrv::DtSoundInteractionAudializer::slot_relativeLocationSet ( )
protectedvirtual

Slot invoked when the listener's relative location changes.

virtual void makVrv::DtSoundInteractionAudializer::slot_decibelLevelSet ( )
protectedvirtual

Slot invoked when the listener's decibel level changes.

Member Data Documentation

DtSoundInteractionStateListener* makVrv::DtSoundInteractionAudializer::mySoundInteractionStateListener
protected

Typed pointer to the sound interaction listener; not owned.

DtSoundComponentAgent* makVrv::DtSoundInteractionAudializer::mySoundComponentAgent
protected

Sound component agent that performs the actual one-shot playback.

Note
Intentionally shadows the base-class member. This class uses DtDELETE cleanup semantics rather than the base-class takeAgent delay path.
bool makVrv::DtSoundInteractionAudializer::myIs3d = false
protected

When true the sound is spatialized at the interaction location; when false it is played as a flat mono signal.


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)