38 Speaker(
float frequency,
double visualSize = 0.5,
Pos visualOffset =
Pos(0,0,1))
39 : own(0), frequency(frequency), intensity(0.0),
40 visualSize(visualSize), visualOffset(visualOffset) {
54 intensity,frequency, (
void*)own);
55 globaldata.
sounds.push_back(s);
61 virtual int set(
const motor* values,
int length){
double time
Definition: globaldata.h:77
SoundList sounds
< this is used to be able to attach objects to the static environment
Definition: globaldata.h:72
This "motor" emulates a speaker or piezo element to produce sound.
Definition: speaker.h:36
void createVisual(GlobalData &globalData, double visualSize, Pos visualOffset) const
Definition: sound.cpp:43
Speaker(float frequency, double visualSize=0.5, Pos visualOffset=Pos(0, 0, 1))
Definition: speaker.h:38
Abstact base class for attachable motors.
Definition: motor.h:35
Interface class for primitives represented in the physical and graphical world.
Definition: primitive.h:80
double max(const matrix::Matrix &v)
returns the largest element
Definition: controller_misc.cpp:318
Data structure holding all essential global information.
Definition: globaldata.h:57
Object that represents a sound signal in the simulator.
Definition: sound.h:35
virtual bool act(GlobalData &globaldata)
performs the actions, This is usually called in doInternalStuff() from the robot
Definition: speaker.h:52
virtual ~Speaker()
Definition: speaker.h:42
double motor
Definition: types.h:30
virtual void init(Primitive *own, Joint *joint=0)
initialises motor with body of robot
Definition: speaker.h:44
virtual int set(const motor *values, int length)
sends the action commands to the motor.
Definition: speaker.h:61
virtual Pos getPosition() const
returns the position
Definition: primitive.cpp:181
double min(const matrix::Matrix &v)
returns the smallest element
Definition: controller_misc.cpp:307
virtual int getMotorNumber() const
return the dimensionality of this motor
Definition: speaker.h:48