HoaLibrary
2.0
High Order Ambisonics Library
|
The sources manager. More...
#include <SourcesManager.h>
Public Member Functions | |
SourcesManager (double maximumRadius=1., bool existence=true) | |
The source manager constructor. More... | |
~SourcesManager () | |
The source manager destructor free the memory. | |
void | clearAll () |
Clear all the sources and groups. | |
void | setMaximumRadius (double limitValue) |
Set the maximum radius the sources and groups can have. More... | |
void | setExistence (bool state) |
Set the existence state of the sources manager. More... | |
void | setZoom (double zoom) |
Set the zoom factor. More... | |
long | getMaximumIndexOfSource () |
Get the maximum index of sources. More... | |
long | getNumberOfSources () |
Get the number of sources actually managed. More... | |
long | getMaximumIndexOfGroup () |
Get the maximum index of the sources actually managed. More... | |
long | getNumberOfGroups () |
Get the number of groups actually managed. More... | |
double | getLimitMaximum () |
Get the maximum radius of the sources and groups. More... | |
bool | getExistence () |
Get the existence state of the source manager. More... | |
double | getZoom () |
Get the zoom factor value. More... | |
void | sourceNewPolar (double radius, double azimuth) |
Add a new source with polar coordinates. More... | |
void | sourceNewCartesian (double abscissa, double ordinate) |
Add a new source with cartesian coordinates. More... | |
void | sourceSetPolar (long index, double radius, double azimuth) |
Set position of a source with polar coordinates. More... | |
void | sourceSetRadius (long index, double radius) |
Set radius of a source. More... | |
void | sourceSetAzimuth (long index, double azimuth) |
Set azimuth of a source. More... | |
void | sourceSetCartesian (long index, double abscissa, double ordinate) |
Set position of a source with cartesian coordinates. More... | |
void | sourceSetAbscissa (long index, double abscissa) |
Set abscissa of a source. More... | |
void | sourceSetOrdinate (long index, double ordinate) |
Set ordinate of a source. More... | |
void | sourceSetColor (long index, double red, double green, double blue, double alpha) |
Set the rgba color of a source. More... | |
void | sourceSetDescription (long index, std::string description) |
Add a description to a given source. More... | |
void | sourceRemove (long index) |
Remove a source. More... | |
void | sourceSetMute (long index, bool state) |
Set the mute state of a source. More... | |
long | sourceGetExistence (long index) |
Retrieve the existence state of a source. More... | |
double | sourceGetRadius (long index) |
Get the radius of a source. More... | |
double | sourceGetAzimuth (long index) |
Get the azimuth of a source. More... | |
double | sourceGetAbscissa (long index) |
Get the abscissa of a source. More... | |
double | sourceGetOrdinate (long index) |
Get the ordinate of a source. More... | |
double * | sourceGetColor (long index) |
Get the rgba color of a source. More... | |
std::string | sourceGetDescription (long index) |
Get the text description of a source. More... | |
long | sourceGetNumberOfGroups (long index) |
Get the number of group a source is owned by. More... | |
long | sourceGetGroupIndex (long sourceIndex, long groupIndex) |
Get the the group index the source is owned by at a particular index. More... | |
long | sourceGetMute (long index) |
Retrieve the mute state of a source. More... | |
void | groupSetSource (long groupIndex, long sourceIndex) |
Add a source to a group. More... | |
void | groupRemoveSource (long groupIndex, long sourceIndex) |
Remove source from a group. More... | |
void | groupSetPolar (long index, double radius, double azimuth) |
Set position of a group with polar coordinates. More... | |
void | groupSetRadius (long index, double radius) |
Set radius of a group. More... | |
void | groupSetAzimuth (long index, double azimuth) |
Set azimuth of a group. More... | |
void | groupSetCartesian (long index, double abscissa, double ordinate) |
Set position of a group with cartesian coordinates. More... | |
void | groupSetAbscissa (long index, double abscissa) |
Set abscissa of a group. More... | |
void | groupSetOrdinate (long index, double ordinate) |
Set ordinate of a group. More... | |
void | groupSetRelativePolar (long groupIndex, double radius, double azimuth) |
Set position of a group with relative polar coordinates. More... | |
void | groupSetRelativeRadius (long groupIndex, double radius) |
Set radius of a group with relative value. More... | |
void | groupSetRelativeAzimuth (long groupIndex, double azimuth) |
Set azimuth of a group with relative value. More... | |
void | groupSetColor (long index, double red, double green, double blue, double alpha) |
Set the rgba color of a group. More... | |
void | groupSetDescription (long index, std::string description) |
Add a description to a given group. More... | |
void | groupRemove (long groupIndex) |
Remove group. More... | |
void | groupRemoveWithSources (long groupIndex) |
Remove group and sources it contains. More... | |
long | groupGetNumberOfSources (long groupIndex) |
Get the number of sources a group contains. More... | |
long | groupGetSourceIndex (long groupIndex, long sourceIndex) |
Get the the index of a source stored at a particular index by a group. More... | |
void | groupSetMute (long index, long state) |
Set the mute state of a group. More... | |
void | groupClean () |
Clean all groups. | |
long | groupGetExistence (long index) |
Retrieve the existence state of a group. More... | |
double | groupGetRadius (long index) |
Get the radius of a group. More... | |
double | groupGetAzimuth (long index) |
Get the azimuth of a group. More... | |
double | groupGetAbscissa (long index) |
Get the abscissa of a group. More... | |
double | groupGetOrdinate (long index) |
Get the ordinate of a group. More... | |
double * | groupGetColor (long index) |
Get the rgba color of a group. More... | |
std::string | groupGetDescription (long index) |
Get the text description of a group. More... | |
long | groupGetMute (long index) |
Retrieve the mute state of a group. More... | |
bool | groupGetIfSourceMuted (long index) |
Returns true if a source is is muted in a group. More... | |
long | groupGetNextIndex () |
Retrieve the next free group index. More... | |
The sources manager.
The SourcesManager should be used to store and manage multiple Source and SourcesGroup
Definition at line 21 of file SourcesManager.h.
Hoa2D::SourcesManager::SourcesManager | ( | double | maximumRadius = 1. , |
bool | existence = true |
||
) |
The source manager constructor.
The source manager constructor allocates and initialize the member values.
maximumRadius | The maximum radius the sources or groups in the source manager could have |
existence | The existence state of the source manager. |
Definition at line 11 of file SourcesManager.cpp.
bool Hoa2D::SourcesManager::getExistence | ( | ) |
Get the existence state of the source manager.
Definition at line 37 of file SourcesManager.cpp.
double Hoa2D::SourcesManager::getLimitMaximum | ( | ) |
Get the maximum radius of the sources and groups.
Definition at line 59 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::getMaximumIndexOfGroup | ( | ) |
Get the maximum index of the sources actually managed.
Definition at line 86 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::getMaximumIndexOfSource | ( | ) |
Get the maximum index of sources.
Definition at line 64 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::getNumberOfGroups | ( | ) |
Get the number of groups actually managed.
Definition at line 91 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::getNumberOfSources | ( | ) |
Get the number of sources actually managed.
Definition at line 75 of file SourcesManager.cpp.
double Hoa2D::SourcesManager::getZoom | ( | ) |
Get the zoom factor value.
Definition at line 54 of file SourcesManager.cpp.
double Hoa2D::SourcesManager::groupGetAbscissa | ( | long | index | ) |
Get the abscissa of a group.
index | The index of the group. |
Definition at line 613 of file SourcesManager.cpp.
double Hoa2D::SourcesManager::groupGetAzimuth | ( | long | index | ) |
Get the azimuth of a group.
index | The index of the group. |
Definition at line 605 of file SourcesManager.cpp.
double * Hoa2D::SourcesManager::groupGetColor | ( | long | index | ) |
Get the rgba color of a group.
index | The index of the group. |
Definition at line 629 of file SourcesManager.cpp.
std::string Hoa2D::SourcesManager::groupGetDescription | ( | long | index | ) |
Get the text description of a group.
index | The index of the group. |
Definition at line 637 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::groupGetExistence | ( | long | index | ) |
Retrieve the existence state of a group.
index | The index of the group. |
Definition at line 645 of file SourcesManager.cpp.
bool Hoa2D::SourcesManager::groupGetIfSourceMuted | ( | long | index | ) |
Returns true if a source is is muted in a group.
index | The index of the group. |
Definition at line 681 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::groupGetMute | ( | long | index | ) |
Retrieve the mute state of a group.
index | The index of the group. |
Definition at line 672 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::groupGetNextIndex | ( | ) |
Retrieve the next free group index.
Definition at line 696 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::groupGetNumberOfSources | ( | long | groupIndex | ) |
Get the number of sources a group contains.
groupIndex | The index of the group. |
Definition at line 654 of file SourcesManager.cpp.
double Hoa2D::SourcesManager::groupGetOrdinate | ( | long | index | ) |
Get the ordinate of a group.
index | The index of the group. |
Definition at line 621 of file SourcesManager.cpp.
double Hoa2D::SourcesManager::groupGetRadius | ( | long | index | ) |
Get the radius of a group.
index | The index of the group. |
Definition at line 597 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::groupGetSourceIndex | ( | long | groupIndex, |
long | sourceIndex | ||
) |
Get the the index of a source stored at a particular index by a group.
groupIndex | The index of the group. |
sourceIndex | The index of the source. |
Definition at line 663 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupRemove | ( | long | groupIndex | ) |
Remove group.
groupIndex | The index of the group. |
Definition at line 548 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupRemoveSource | ( | long | groupIndex, |
long | sourceIndex | ||
) |
Remove source from a group.
groupIndex | The index of the group. |
sourceIndex | The index of the source. |
Definition at line 448 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupRemoveWithSources | ( | long | groupIndex | ) |
Remove group and sources it contains.
groupIndex | The index of the group. |
Definition at line 568 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetAbscissa | ( | long | index, |
double | abscissa | ||
) |
Set abscissa of a group.
index | The index of the group. |
abscissa | The abscissa of the group. |
Definition at line 492 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetAzimuth | ( | long | index, |
double | azimuth | ||
) |
Set azimuth of a group.
index | The index of the group. |
azimuth | The azimuth of the group. |
Definition at line 476 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetCartesian | ( | long | index, |
double | abscissa, | ||
double | ordinate | ||
) |
Set position of a group with cartesian coordinates.
index | The index of the group. |
abscissa | The abscissa of the group. |
ordinate | The ordinate of the group. |
Definition at line 484 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetColor | ( | long | index, |
double | red, | ||
double | green, | ||
double | blue, | ||
double | alpha | ||
) |
Set the rgba color of a group.
All values are clipped between 0 and 1.
index | The index of the group. |
red | The red component of the color. |
green | The green component of the color |
blue | The blue component of the color |
alpha | The alpha component of the color |
Definition at line 532 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetDescription | ( | long | index, |
std::string | description | ||
) |
Add a description to a given group.
index | The index of the group. |
description | The text description of the group. |
Definition at line 540 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetMute | ( | long | index, |
long | state | ||
) |
Set the mute state of a group.
index | The index of the group. |
state | The mute state of the group. |
Definition at line 579 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetOrdinate | ( | long | index, |
double | ordinate | ||
) |
Set ordinate of a group.
index | The index of the group. |
ordinate | The ordinate of the group. |
Definition at line 500 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetPolar | ( | long | index, |
double | radius, | ||
double | azimuth | ||
) |
Set position of a group with polar coordinates.
index | The index of the group. |
radius | The radius of the group. |
azimuth | The azimuth of the group. |
Definition at line 460 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetRadius | ( | long | index, |
double | radius | ||
) |
Set radius of a group.
index | The index of the group. |
radius | The radius of the group. |
Definition at line 468 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetRelativeAzimuth | ( | long | groupIndex, |
double | azimuth | ||
) |
Set azimuth of a group with relative value.
index | The index of the group. |
azimuth | The relative azimuth of the group. |
Definition at line 524 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetRelativePolar | ( | long | groupIndex, |
double | radius, | ||
double | azimuth | ||
) |
Set position of a group with relative polar coordinates.
index | The index of the group. |
radius | The relative radius of the group. |
azimuth | The relative azimuth of the group. |
Definition at line 508 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetRelativeRadius | ( | long | groupIndex, |
double | radius | ||
) |
Set radius of a group with relative value.
index | The index of the group. |
radius | The relative radius of the group. |
Definition at line 516 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::groupSetSource | ( | long | groupIndex, |
long | sourceIndex | ||
) |
Add a source to a group.
groupIndex | The index of the group. |
sourceIndex | The index of the source. |
Definition at line 416 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::setExistence | ( | bool | state | ) |
Set the existence state of the sources manager.
If the existence state is false it will delete all sources and groups already stored.
state | The existence state. |
Definition at line 18 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::setMaximumRadius | ( | double | limitValue | ) |
Set the maximum radius the sources and groups can have.
limitValue | The radius limit value. |
Definition at line 42 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::setZoom | ( | double | zoom | ) |
Set the zoom factor.
Set the zoom factor between 0 and 1.
zoom | The zoom factor. |
Definition at line 49 of file SourcesManager.cpp.
double Hoa2D::SourcesManager::sourceGetAbscissa | ( | long | index | ) |
Get the abscissa of a source.
index | The index of the source. |
Definition at line 344 of file SourcesManager.cpp.
double Hoa2D::SourcesManager::sourceGetAzimuth | ( | long | index | ) |
Get the azimuth of a source.
index | The index of the source. |
Definition at line 336 of file SourcesManager.cpp.
double * Hoa2D::SourcesManager::sourceGetColor | ( | long | index | ) |
Get the rgba color of a source.
index | The index of the source. |
Definition at line 360 of file SourcesManager.cpp.
std::string Hoa2D::SourcesManager::sourceGetDescription | ( | long | index | ) |
Get the text description of a source.
index | The index of the source. |
Definition at line 368 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::sourceGetExistence | ( | long | index | ) |
Retrieve the existence state of a source.
index | The index of the source. |
Definition at line 376 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::sourceGetGroupIndex | ( | long | sourceIndex, |
long | groupIndex | ||
) |
Get the the group index the source is owned by at a particular index.
sourceIndex | The index of the source. |
groupIndex | The index of the group |
Definition at line 394 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::sourceGetMute | ( | long | index | ) |
Retrieve the mute state of a source.
index | The index of the source. |
Definition at line 403 of file SourcesManager.cpp.
long Hoa2D::SourcesManager::sourceGetNumberOfGroups | ( | long | index | ) |
Get the number of group a source is owned by.
index | The index of the source. |
Definition at line 385 of file SourcesManager.cpp.
double Hoa2D::SourcesManager::sourceGetOrdinate | ( | long | index | ) |
Get the ordinate of a source.
index | The index of the source. |
Definition at line 352 of file SourcesManager.cpp.
double Hoa2D::SourcesManager::sourceGetRadius | ( | long | index | ) |
Get the radius of a source.
index | The index of the source. |
Definition at line 328 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::sourceNewCartesian | ( | double | abscissa, |
double | ordinate | ||
) |
Add a new source with cartesian coordinates.
abscissa | The abscissa of the source. |
ordinate | The ordinate of the source. |
Definition at line 142 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::sourceNewPolar | ( | double | radius, |
double | azimuth | ||
) |
Add a new source with polar coordinates.
radius | The radius of the source. |
azimuth | The azimuth of the source. |
Definition at line 130 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::sourceRemove | ( | long | index | ) |
Remove a source.
This will also remove the source from all the group that the source is a part of.
index | The index of the source to remove. |
Definition at line 106 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::sourceSetAbscissa | ( | long | index, |
double | abscissa | ||
) |
Set abscissa of a source.
index | The index of the source. |
abscissa | The abscissa of the source. |
Definition at line 221 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::sourceSetAzimuth | ( | long | index, |
double | azimuth | ||
) |
Set azimuth of a source.
index | The index of the source. |
azimuth | The azimuth of the source. |
Definition at line 188 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::sourceSetCartesian | ( | long | index, |
double | abscissa, | ||
double | ordinate | ||
) |
Set position of a source with cartesian coordinates.
index | The index of the source. |
abscissa | The abscissa of the source. |
ordinate | The ordinate of the source. |
Definition at line 215 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::sourceSetColor | ( | long | index, |
double | red, | ||
double | green, | ||
double | blue, | ||
double | alpha | ||
) |
Set the rgba color of a source.
All values are clipped between 0 and 1.
index | The index of the source. |
red | The red component of the color. |
green | The green component of the color |
blue | The blue component of the color |
alpha | The alpha component of the color |
Definition at line 275 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::sourceSetDescription | ( | long | index, |
std::string | description | ||
) |
Add a description to a given source.
index | The index of the source. |
description | The text description of the source. |
Definition at line 283 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::sourceSetMute | ( | long | index, |
bool | state | ||
) |
Set the mute state of a source.
index | The index of the source. |
state | The mute state of the source. |
Definition at line 309 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::sourceSetOrdinate | ( | long | index, |
double | ordinate | ||
) |
Set ordinate of a source.
index | The index of the source. |
ordinate | The ordinate of the source. |
Definition at line 248 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::sourceSetPolar | ( | long | index, |
double | radius, | ||
double | azimuth | ||
) |
Set position of a source with polar coordinates.
index | The index of the source. |
radius | The radius of the source. |
azimuth | The azimuth of the source. |
Definition at line 154 of file SourcesManager.cpp.
void Hoa2D::SourcesManager::sourceSetRadius | ( | long | index, |
double | radius | ||
) |
Set radius of a source.
index | The index of the source. |
radius | The radius of the source. |
Definition at line 160 of file SourcesManager.cpp.