34 #ifndef __ENKI_ACTIVESOUNDOBJECT_H 35 #define __ENKI_ACTIVESOUNDOBJECT_H 37 #include "../Interaction.h" 38 #include "../PhysicalEngine.h" 69 virtual void init() {}
79 void setSound(
unsigned channel,
double signal);
double getMaxSound(int *channel)
Get the maximum value, set channel to the channel where this maximum lies.
Definition: ActiveSoundSource.cpp:116
~ActiveSoundSource()
Destructor.
Definition: ActiveSoundSource.cpp:65
A situated object in the world with mass, geometry properties, physical properties, ...
Definition: PhysicalEngine.h:131
void setSoundRange(double range)
Set the range of this sound interraction.
Definition: ActiveSoundSource.cpp:70
unsigned noOfChannels
No of channels of this sound source.
Definition: ActiveSoundSource.h:52
Enki is the namespace of the Enki simulator. All Enki functions and classes excepted the math one are...
Definition: BluetoothBase.cpp:44
double * pitch
Produced sound: vector of different pitch as they were channels.
Definition: ActiveSoundSource.h:55
double r
Radius of the local interaction.
Definition: Interaction.h:57
Robot * owner
The physical object that owns the interaction.
Definition: Interaction.h:62
double elapsedTime
Elapsed time since last activation.
Definition: ActiveSoundSource.h:60
void setSound(unsigned channel, double signal)
Set the value of channel to signal using a simplified model.
Definition: ActiveSoundSource.cpp:75
ActiveSoundSource(Robot *owner, double r, unsigned channels)
Constructor.
Definition: ActiveSoundSource.cpp:46
double getSound(unsigned channel)
Get the value associated with channel.
Definition: ActiveSoundSource.cpp:107
The world is the container of all objects and robots.
Definition: PhysicalEngine.h:411
ActiveSoundObject can be inherited by any robot that want to emit sound.
Definition: ActiveSoundSource.h:86
ActiveSoundSource speaker
Speaker.
Definition: ActiveSoundSource.h:90
Time limited sound emitter.
Definition: ActiveSoundSource.h:48
Interacts with another object or wall only up to a certain distance.
Definition: Interaction.h:53
void realisticSetSound(unsigned channel, double signal)
Set the value of channel to signal using a more realistic model.
Definition: ActiveSoundSource.cpp:81
double activityTime
Activity time.
Definition: ActiveSoundSource.h:62
A robot is a PhysicalObject that has additional interactions and a controller.
Definition: PhysicalEngine.h:379
bool enableFlag
Sound activity.
Definition: ActiveSoundSource.h:58