![]() |
VR-Forces 4.1 Class Documentation
|
Instances of DtExerciseSoundPlayer automatically control a VR-Link exercise by attaching sounds to its entities and interaction using a specified MTL File. More...

Public Member Functions | |
| DtExerciseSoundPlayer (DtExerciseConn *exConn, DtReflectedEntityList *rel, const char *mtlFilename) | |
| Gets sound mappings from the given mtl file. | |
| DtExerciseSoundPlayer (DtExerciseConn *exConn, DtReflectedEntityList *rel, DtSoundMapper *soundMapper) | |
| Uses an existing DtSoundMapper object. | |
| virtual | ~DtExerciseSoundPlayer () |
| Virtual DTOR. | |
| virtual void | tick (DtConstVector viewPosition, DtConstVector viewVelocity, const DtTaitBryan &viewAngle) |
| Overridden tick(..) Each call to tick updates the listener's position and orientation and manages starting, stopping and cleanup of sounds each frame. | |
| virtual void | mapEntitySound (const DtEntityType &entity, const std::string filename) |
| Add an Entity to Sound-file mapping, or change an existing mapping if one already exists. | |
| virtual void | removeEntitySoundMap (const DtEntityType &entity) |
| Remove an existing Entity to Sound-file mapping. | |
| virtual void | mapFireSound (const DtEntityType &entity, const std::string filename, double duration=-1.0, int channel=0) |
| Add a Fire to Sound-file mapping, or change an existing mapping if one already exists. | |
| virtual void | removeFireSoundMap (const DtEntityType &entity) |
| Remove an existing Fire to Sound-file mapping. | |
| virtual void | mapDetonationSound (const DtEntityType &entity, const std::string filename, double duration=-1.0, int channel=0, int result=-1) |
| Add a Detonation to Sound-file mapping, or change an existing mapping if one already exists. | |
| virtual void | removeDetonationSoundMap (const DtEntityType &entity, int result=-1) |
| Remove an existing Detonation to Sound-file mapping. | |
| virtual void | clearSoundMappings () |
| Clear all the sound maps. | |
| virtual void | recycleSoundSources () |
| Recycle sounds sources. | |
| const DtSoundMapper * | soundMapper () const |
| Get the sound mapper. | |
Public Member Functions inherited from makVrv::DtNetSoundPlayer | |
| DtNetSoundPlayer (DtExerciseConn *exConn) | |
| Initialization CTOR. | |
| virtual | ~DtNetSoundPlayer () |
| Virtual DTOR. | |
| void | setExerciseConn (DtExerciseConn *exConn) |
| Set a new exercise connection. | |
| void | registerSignalCallbacks () |
| Register a signal interaction callback with the exercise connection. | |
| void | unregisterSignalCallbacks () |
| Unregister the signal interaction callback from the exercise connection. | |
| virtual void | setProcessSignalInteractions (bool) |
| Change setting to process signal callbacks. | |
| virtual bool | processSignalInteractions () const |
| Get the current setting to process signal callbacks. | |
Protected Member Functions | |
| virtual bool | initialize (DtExerciseConn *exConn, DtReflectedEntityList *rel) |
| Initialize the view position and connect to the reflected entity list. | |
| virtual void | registerCallbacks () |
| A helper function to register callbacks with the reflected entity list. | |
| virtual void | unregisterCallbacks () |
| A helper function to unregister callbacks from the reflected entity list. | |
| virtual void | onRecycleSoundSources () |
| A helper function to recycle the currently playing sound sources. | |
| virtual void | addEntitiesFromList (DtReflectedEntityList *rel) |
| A helper function to add a list of reflected entities. | |
| virtual void | removeEntitiesFromList (DtReflectedEntityList *rel) |
| A helper function to remove a list of reflected entities. | |
Virtual callbacks | |
| virtual void | onEntityAdded (DtReflectedEntity *entity) |
| Called when a reflected entity has been added to the simulation. | |
| virtual void | onEntityRemoved (DtReflectedEntity *entity) |
| Called when a reflected entity has been removed from the simulation. | |
| virtual void | onFireInteraction (DtFireInteraction *fire) |
| Called when a fire interaction has occurred in the simulation. | |
| virtual void | onDetonationInteraction (DtDetonationInteraction *detonation) |
| Called when a detonation interaction has occurred in the simulation. | |
Protected Member Functions inherited from makVrv::DtNetSoundPlayer | |
| virtual bool | addBufferSource (DtBufferSource *bs) |
| Add a buffer source to the signal list. | |
Static Protected Member Functions | |
Static callbacks | |
| static void | entityAddedCb (DtReflectedEntity *entity, void *caller) |
| static void | entityRemovedCb (DtReflectedEntity *entity, void *caller) |
| static void | fireInteractionCb (DtFireInteraction *fire, void *caller) |
| static void | detonationInteractionCb (DtDetonationInteraction *detonation, void *caller) |
Static Protected Member Functions inherited from makVrv::DtNetSoundPlayer | |
| static void | signalInteractionCb (DtSignalInteraction *sound, void *caller) |
| Called on a signaled interaction. | |
| static int | processEncodingType (DtSignalInteraction *sound) |
| Translate the OpenAL encoding type based on the signal interaction encoding type. | |
| static bool | canProcessEncodingClass (DtSignalInteraction *sound) |
| Check for a valid encoding class. | |
Protected Attributes | |
| DtReflectedEntityList * | myRel |
| DtSoundMapper * | mySoundMapper |
| DtVector | myLastViewPos |
| DtVector | myLastViewVel |
| DtTaitBryan | myLastViewOri |
| bool | myRecycleSourcesFlag |
Protected Attributes inherited from makVrv::DtNetSoundPlayer | |
| DtExerciseConn * | myExConn |
| bool | myProcessSignalInteractions |
Private Member Functions | |
| DtExerciseSoundPlayer (const DtExerciseSoundPlayer &orig) | |
| Copy CTOR. | |
| DtExerciseSoundPlayer & | operator= (const DtExerciseSoundPlayer &orig) |
| Assignment operator. | |
Additional Inherited Members | |
Static Protected Attributes inherited from makVrv::DtNetSoundPlayer | |
| static DtList * | mySignalList |
Instances of DtExerciseSoundPlayer automatically control a VR-Link exercise by attaching sounds to its entities and interaction using a specified MTL File.
| makVrv::DtExerciseSoundPlayer::DtExerciseSoundPlayer | ( | DtExerciseConn * | exConn, |
| DtReflectedEntityList * | rel, | ||
| const char * | mtlFilename | ||
| ) |
Gets sound mappings from the given mtl file.
Internally, creates a DtSoundMapper object with its own mtl environment, which then loads the mtl file.
| [in] | exConn | is a pointer to an exercise connection. |
| [in] | rel | is a pointer to a list of reflected entities. |
| [in] | mtlFilename | is the name of an MTL file to load. |
| makVrv::DtExerciseSoundPlayer::DtExerciseSoundPlayer | ( | DtExerciseConn * | exConn, |
| DtReflectedEntityList * | rel, | ||
| DtSoundMapper * | soundMapper | ||
| ) |
Uses an existing DtSoundMapper object.
The caller is responsible for determining if the DtSoundMapper should load or not-load an MTL environment..
| [in] | exConn | is a pointer to an exercise connection. |
| [in] | rel | is a pointer to a list of reflected entities. |
| [in] | mtlFilename | is the name of an MTL file to load. |
|
virtual |
Virtual DTOR.
|
private |
Copy CTOR.
|
virtual |
Overridden tick(..) Each call to tick updates the listener's position and orientation and manages starting, stopping and cleanup of sounds each frame.
| [in] | viewPosition | is the location of the listener. |
| [in] | viewVelocity | is the moving velocity of the listener. |
| [in] | viewAngle | is the orientation of the listener. |
Reimplemented from makVrv::DtNetSoundPlayer.
|
virtual |
Add an Entity to Sound-file mapping, or change an existing mapping if one already exists.
| [in] | entity | is the Entity Type to be mapped to a sound-file. |
| [in] | filename | is the name of a sound file to be mapped. |
|
virtual |
Remove an existing Entity to Sound-file mapping.
| [in] | entity | is the Entity Type who's mapping is to be removed. |
|
virtual |
Add a Fire to Sound-file mapping, or change an existing mapping if one already exists.
| [in] | entity | is the Entity Type to be mapped to a sound-file. |
| [in] | filename | is the name of a sound file to be mapped. |
| [in] | duration | is deprecated. |
| [in] | channel | is a flag limiting concurrently playing sounds. |
|
virtual |
Remove an existing Fire to Sound-file mapping.
| [in] | entity | is the Entity Type who's mapping is to be removed. |
|
virtual |
Add a Detonation to Sound-file mapping, or change an existing mapping if one already exists.
| [in] | entity | is the Entity Type to be mapped to a sound-file. |
| [in] | filename | is the name of a sound file to be mapped. |
| [in] | duration | is deprecated. |
| [in] | channel | is a flag limiting concurrently playing sounds. |
| [in] | result | is the type of detonation causing sound to play. |
|
virtual |
Remove an existing Detonation to Sound-file mapping.
| [in] | entity | is the Entity Type who's mapping is to be removed. |
| [in] | result | is the type of detonation causing sound to play. |
|
virtual |
Clear all the sound maps.
|
virtual |
Recycle sounds sources.
| const DtSoundMapper* makVrv::DtExerciseSoundPlayer::soundMapper | ( | ) | const |
Get the sound mapper.
|
protectedvirtual |
Initialize the view position and connect to the reflected entity list.
| [in] | exConn | is a pointer to an exercise connection. |
| [in] | rel | is a pointer to a list of reflected entities. |
|
protectedvirtual |
A helper function to register callbacks with the reflected entity list.
|
protectedvirtual |
A helper function to unregister callbacks from the reflected entity list.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protectedvirtual |
Called when a reflected entity has been added to the simulation.
| [in] | entity | is the entity that has been added. |
|
protectedvirtual |
Called when a reflected entity has been removed from the simulation.
| [in] | entity | is the entity that has been removed. |
|
protectedvirtual |
Called when a fire interaction has occurred in the simulation.
| [in] | fire | is the fire interaction that occurred. |
|
protectedvirtual |
Called when a detonation interaction has occurred in the simulation.
| [in] | detonation | is the detonation interaction that occurred. |
|
protectedvirtual |
A helper function to recycle the currently playing sound sources.
|
protectedvirtual |
A helper function to add a list of reflected entities.
|
protectedvirtual |
A helper function to remove a list of reflected entities.
|
private |
Assignment operator.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |