VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
makVrv::DtSoundModel Class Reference

DtSoundModel is a distributed object used to configure, start, and stop a sound. More...

Public Member Functions

 DtSoundModel (DtDe &de, DtUniqueID id)
 CTOR. More...
 
virtual ~DtSoundModel ()
 DTOR. More...
 
virtual void setModelDefinition (const std::string &modelDef)
 Set the model definition. More...
 
void realize (const std::string &filename, float decibels, bool is3d, bool isLooping, makAudio::DtAbstractAudio::Priority priority)
 Creates the actual makAudio::Sound with the given parameters. More...
 
void play ()
 Plays the sound. More...
 
void pause ()
 Pauses the sound. More...
 
void stop ()
 Stops the sound. More...
 
void setRelativePosition (bool relative)
 Sets whether use the relative position, non-3d sound will set this to true. More...
 
void setPosition (const DtVector &pos)
 Sets the position of the sound in local coordinates, only applicable to 3d sounds. More...
 
void setVelocity (const DtVector &vel)
 Sets the velocity of the sound in local coordinates, only applicable to 3d sounds. More...
 
void setDecibel (float decibel)
 Sets the decibel of the sound. More...
 
float decibel ()
 gets the decibel of the sound. More...
 
float maxFalloffDistance ()
 gets the max falloff distance. More...
 
void setIs3d (bool is3d)
 Sets if the sound is 3d sound. More...
 
bool shouldPlaySound ()
 Should we play the sound. It will get called before it actually play. More...
 
void setIsInteractionSound (bool isInteractionSound)
 Sets whether the sound is an interaction sound. More...
 
bool isInteractionSound ()
 Returns whether the sound is an interaction sound. More...
 
void setAttachedEntityEngineRunning (bool running)
 Sets whether the engine of the entity that the sound is attached to is running. More...
 
bool attachedEntityEngineRunning ()
 Sets whether the engine of the entity that the sound is attached to is running. More...
 

Protected Attributes

DtDemyDe
 
DtUniqueID myId
 
makAudio::DtSound * mySound
 
float myDecibel
 
bool myIs3d
 
bool myTransient
 
bool myIsInteractionSound
 
DtVector myPosition
 
bool myAttachedEntityEngineRunning
 

Private Member Functions

 DtSoundModel ()
 Default Constructor not implemented – default constructor not allowed. More...
 
 DtSoundModel (const DtSoundModel &)
 Copy Constructor not implemented – Copy not allowed. More...
 
DtSoundModeloperator= (const DtSoundModel &)
 Assignment Operator not implemented – Copy not allowed. More...
 

Detailed Description

DtSoundModel is a distributed object used to configure, start, and stop a sound.

It can be the sound attached to entity or an interaction sound.

Constructor & Destructor Documentation

makVrv::DtSoundModel::DtSoundModel ( DtDe de,
DtUniqueID  id 
)

CTOR.

virtual makVrv::DtSoundModel::~DtSoundModel ( )
virtual

DTOR.

makVrv::DtSoundModel::DtSoundModel ( )
private

Default Constructor not implemented – default constructor not allowed.

makVrv::DtSoundModel::DtSoundModel ( const DtSoundModel )
private

Copy Constructor not implemented – Copy not allowed.

Member Function Documentation

virtual void makVrv::DtSoundModel::setModelDefinition ( const std::string &  modelDef)
virtual

Set the model definition.

void makVrv::DtSoundModel::realize ( const std::string &  filename,
float  decibels,
bool  is3d,
bool  isLooping,
makAudio::DtAbstractAudio::Priority  priority 
)

Creates the actual makAudio::Sound with the given parameters.

Parameters
filenameThe source path of the sound file.
decibelsThe default decibel of the sound, 80 by default.
is3dWhether the sound is 3d, 3d sound need update the position, velocity, etc.
isLoopingwhether play the sound in loop.
priorityDefault is SECONDARY_FX(1).
void makVrv::DtSoundModel::play ( )

Plays the sound.

makAudio::DtSound::play

void makVrv::DtSoundModel::pause ( )

Pauses the sound.

makAudio::DtSound::pause

void makVrv::DtSoundModel::stop ( )

Stops the sound.

makAudio::DtSound::stop

void makVrv::DtSoundModel::setRelativePosition ( bool  relative)

Sets whether use the relative position, non-3d sound will set this to true.

makAudio::DtSound::setRelativePosition

void makVrv::DtSoundModel::setPosition ( const DtVector pos)

Sets the position of the sound in local coordinates, only applicable to 3d sounds.

makAudio::DtSound::setPosition

void makVrv::DtSoundModel::setVelocity ( const DtVector vel)

Sets the velocity of the sound in local coordinates, only applicable to 3d sounds.

makAudio::DtSound::setVelocity

void makVrv::DtSoundModel::setDecibel ( float  decibel)

Sets the decibel of the sound.

float makVrv::DtSoundModel::decibel ( )

gets the decibel of the sound.

float makVrv::DtSoundModel::maxFalloffDistance ( )

gets the max falloff distance.

void makVrv::DtSoundModel::setIs3d ( bool  is3d)

Sets if the sound is 3d sound.

bool makVrv::DtSoundModel::shouldPlaySound ( )

Should we play the sound. It will get called before it actually play.

void makVrv::DtSoundModel::setIsInteractionSound ( bool  isInteractionSound)

Sets whether the sound is an interaction sound.

Interaction sound has it's own source position and have a delay to the listener. Interacion sound do not create an instance of makAudio::DtSound, makAudio::DtAudioManager creates it.

bool makVrv::DtSoundModel::isInteractionSound ( )

Returns whether the sound is an interaction sound.

Interaction sound has it's own source position and have a delay to the listener. Interacion sound do not create an instance of makAudio::DtSound, makAudio::DtAudioManager creates it.

void makVrv::DtSoundModel::setAttachedEntityEngineRunning ( bool  running)

Sets whether the engine of the entity that the sound is attached to is running.

It will only play the sounds if the engine is running.

bool makVrv::DtSoundModel::attachedEntityEngineRunning ( )

Sets whether the engine of the entity that the sound is attached to is running.

It will only play the sounds if the engine is running.

DtSoundModel& makVrv::DtSoundModel::operator= ( const DtSoundModel )
private

Assignment Operator not implemented – Copy not allowed.

Member Data Documentation

DtDe& makVrv::DtSoundModel::myDe
protected
DtUniqueID makVrv::DtSoundModel::myId
protected
makAudio::DtSound* makVrv::DtSoundModel::mySound
protected
float makVrv::DtSoundModel::myDecibel
protected
bool makVrv::DtSoundModel::myIs3d
protected
bool makVrv::DtSoundModel::myTransient
protected
bool makVrv::DtSoundModel::myIsInteractionSound
protected
DtVector makVrv::DtSoundModel::myPosition
protected
bool makVrv::DtSoundModel::myAttachedEntityEngineRunning
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)