20 #ifndef SOURCECOLLECTION_H_INCLUDED
21 #define SOURCECOLLECTION_H_INCLUDED
29 #define NUM_INITIAL_COLOURS 4
108 void setAngle(
int sourceID,
float angle);
117 void setType(
int sourceID,
int type);
124 void setName(
int sourceID,
const std::string &name);
148 float normalizedValue);
158 float unnormalizedValue);
161 bool idInRange(
int sourceID)
const;
163 const int maxSources_;
164 std::vector<Source> sources_;
171 #endif // SOURCECOLLECTION_H_INCLUDED
A container class holding multiple sources (IDs 0 to maxSources-1), accessible via their sourceIDs...
Definition: SourceCollection.h:37
void setPosition(int sourceID, float x, float y)
Sets a source's position parameters.
Definition: SourceCollection.cpp:73
void activate(int sourceID)
Sets a source's state to active.
Definition: SourceCollection.cpp:59
const Source & getSource(int sourceID) const
Returns a reference to one of the internal Source objects of this SourceCollection.
Definition: SourceCollection.cpp:38
void deactivate(int sourceID)
Sets a source's state to not active.
Definition: SourceCollection.cpp:66
void setParameterUnnormalized(int sourceID, int paramIndex, float unnormalizedValue)
Sets a source's parameter from its unnormalized value.
Definition: SourceCollection.cpp:118
A struct representing a (RGB) colour.
Definition: Colours.h:28
SourceCollection(int maxSources=MAX_WONDER_SOURCES)
Constructor.
Definition: SourceCollection.cpp:24
void setType(int sourceID, int type)
Sets a source's type parameter.
Definition: SourceCollection.cpp:86
void setParameterNormalized(int sourceID, int paramIndex, float normalizedValue)
Sets a parameter from its normalized value.
Definition: SourceCollection.cpp:110
void setColour(int sourceID, Colour colour)
Sets a source's colour.
Definition: SourceCollection.cpp:98
void setDopplerEffect(int sourceID, bool dopplerOn)
Sets a source's doppler effect setting.
Definition: SourceCollection.cpp:105
void setAngle(int sourceID, float angle)
Sets a source's angle parameter.
Definition: SourceCollection.cpp:81
const int getMaxSources() const
Returns the number of Source objects that this SourceCollection contains.
Definition: SourceCollection.cpp:43
A class for objects representing a WONDER source with all its properties.
Definition: Source.h:60
void setName(int sourceID, const std::string &name)
Sets a source's name.
Definition: SourceCollection.cpp:91
virtual ~SourceCollection()
Destructor.
Definition: SourceCollection.cpp:34
bool setSource(const Source &source)
Copies the parameters of a given Source object to the internal Source object with the same ID (if the...
Definition: SourceCollection.cpp:48
#define NUM_INITIAL_COLOURS
Definition: SourceCollection.h:29