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 | Private Member Functions | Private Attributes
makVrv::DtModelSoundCreator Class Reference

Concrete DtSoundCreatorInterface that creates and manages DtSoundComponent objects for models whose definitions carry sound parameters.

One instance per De, registered by DtAudioManager during construction. Reads the following parameters from a DtModelDefinition:

Note
The filename, sound_decibels, min/max_audible_distance_m, and sound_priority parameters are parsed via the shared static helper DtSoundComponent::populateFromSoundSchema so that every Sound-schema consumer honors them uniformly.
Inheritance diagram for makVrv::DtModelSoundCreator:
Inheritance graph
[legend]

Public Member Functions

 DtModelSoundCreator (DtDe &de)
 
virtual ~DtModelSoundCreator ()
 
 DtModelSoundCreator (const DtModelSoundCreator &)=delete
 
DtModelSoundCreator & operator= (const DtModelSoundCreator &)=delete
 
virtual void onModelDefinitionSet (DtModel &model, const DtModelDefinition *definition) override
 
virtual void onModelDestroyed (DtModel &model) override
 
- Public Member Functions inherited from makVrv::DtSoundCreatorInterface
virtual ~DtSoundCreatorInterface ()
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Private Member Functions

void destroySoundForModel (const DtUniqueID &id)
 

Private Attributes

DtDe & myDe
 
std::map< DtUniqueID,
DtSoundComponent * > 
myComponentMap
 

Additional Inherited Members

- Static Public Member Functions inherited from makVrv::DtSoundCreatorInterface
static DtSoundCreatorInterface * findInstance (DtDe &de)
 
static void registerInstance (DtDe &de, DtSoundCreatorInterface *creator)
 
static const std::string & theClassName ()
 
- Protected Member Functions inherited from makVrv::DtSoundCreatorInterface
 DtSoundCreatorInterface ()
 
 DtSoundCreatorInterface (const DtSoundCreatorInterface &)=delete
 
DtSoundCreatorInterface & operator= (const DtSoundCreatorInterface &)=delete
 

Constructor & Destructor Documentation

makVrv::DtModelSoundCreator::DtModelSoundCreator ( DtDe &  de)
explicit

CTOR.

virtual makVrv::DtModelSoundCreator::~DtModelSoundCreator ( )
virtual

DTOR. Destroys all owned DtSoundComponent objects.

makVrv::DtModelSoundCreator::DtModelSoundCreator ( const DtModelSoundCreator &  )
delete

Copy Constructor not implemented - copy not allowed.

Member Function Documentation

DtModelSoundCreator& makVrv::DtModelSoundCreator::operator= ( const DtModelSoundCreator &  )
delete

Assignment Operator not implemented - copy not allowed.

virtual void makVrv::DtModelSoundCreator::onModelDefinitionSet ( DtModel &  model,
const DtModelDefinition *  definition 
)
overridevirtual

Called whenever a model definition is applied to a DtModel.

Implementations must destroy any previously created sound for model.uniqueId(), then inspect definition for sound parameters. If sound parameters are present a new DtSoundComponent is created, configured, and played. If definition is nullptr or carries no sound parameters only the destroy step is performed.

Parameters
modelThe model whose definition changed.
definitionThe new model definition, or nullptr if the definition name was empty or unknown.

Implements makVrv::DtSoundCreatorInterface.

virtual void makVrv::DtModelSoundCreator::onModelDestroyed ( DtModel &  model)
overridevirtual

Called from DtModel::~DtModel() when the De is not destructing.

Implementations must destroy and remove the sound component owned for model.uniqueId().

Parameters
modelThe model being destroyed.

Implements makVrv::DtSoundCreatorInterface.

void makVrv::DtModelSoundCreator::destroySoundForModel ( const DtUniqueID &  id)
private

Destroy and erase the sound component owned for id, if any.

Member Data Documentation

DtDe& makVrv::DtModelSoundCreator::myDe
private
std::map<DtUniqueID, DtSoundComponent*> makVrv::DtModelSoundCreator::myComponentMap
private

Owned sound components keyed by the unique ID of their DtModel.


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)