HoaLibrary
2.0
High Order Ambisonics Library
|
The channel manager. More...
#include <ChannelManager.h>
Public Member Functions | |
ChannelManager (unsigned int number_of_channels=1) | |
The channel manager constructor. More... | |
~ChannelManager () | |
The channel manager destructor. More... | |
void | setNumberOfChannels (unsigned int number_of_channels) |
Set the number of channels you want to manage. More... | |
void | setAzimuth (const int index, double azimuth) |
Set one or each channel azimuth value. More... | |
void | setAzimuthList (double *azimuths, long size) |
Set several channel azimuth with a list. More... | |
void | resetAzimuth (const int index=-1) |
Reset one or each channel azimuth value. More... | |
void | setDirectivity (const int index, const double directivity) |
Set one or each channel directivity value. More... | |
void | setDirectivityList (double *directivities, long size) |
Set several channel directivity value with a list. More... | |
void | resetDirectivity (const int index=-1) |
Reset one or each channel directivity to 1. More... | |
void | setSelected (const int index, int selectedState) |
Set the selected state of one or each channel. More... | |
void | rotateSelectedChannels (double newRadian, int channelBeingDragged, int magnet=0) |
Rotate all of the currently selected channels relative to one channel azimuth rotation. More... | |
void | setFisheyeDestAzimuth (double azimuth) |
Set fisheye destination azimuth. More... | |
void | setFisheyeStartAzimuth (const int index) |
Set the fisheye start azimuth of one or several channel with current azimuth. More... | |
void | setFisheyeStartAzimuth (const int index, double radian) |
Set the fisheye start azimuth of one or several channel. More... | |
void | setFisheyeStepWithDelta (const int index, double delta) |
Increment or decrement the fisheye step by a value. More... | |
void | setFisheyeStepDirect (const int index, double fisheyeStep) |
Set the fisheye step directly. More... | |
void | setAzimuthToClosestDefChannelAzimuth (const int index) |
Set channel azimuth value to the closest default azimuth position value. More... | |
long | getNumberOfSelectedChannels () |
Retrieve the number of selected channels. More... | |
double | getClosestDefChannelAzimuth (const int index) |
Retrieve the closest default azimuth position of a channel. More... | |
double | getClosestDefChannelAzimuth (double azimuth) |
Retrieve the closest default azimuth position relative to an azimuth value. More... | |
double | getClosestDefChannelDistance (const int index) |
Retrieve the distance to the closest default azimuth position relative to the azimuth of a channel. More... | |
double | getClosestDefChannelDistance (double azimuth) |
Retrieve the distance to the closest default azimuth position relative to an azimuth value. More... | |
double | getFisheyeDestAzimuth () const |
Retrieve the fisheye destination azimuth value. More... | |
long | getNumberOfChannels () const |
Retrieve the number of channels currently managed. More... | |
double | getFisheyeStep () const |
Retrieve the current fisheye step. More... | |
bool | isSelected (const int index) const |
Retrieve the selection state of a channel. More... | |
double | getDirectivity (const int index) const |
Retrieve the directivity value of a channel. More... | |
double | getFisheyeStartAzimuth (const int index) const |
Retrieve the fisheye start azimuth value of a channel. More... | |
double | getAbscissa (const int index) const |
Retrieve the abscissa of a channel. More... | |
double | getOrdinate (const int index) const |
Retrieve the ordinate of a channel. More... | |
double | getAzimuth (const int index) const |
Retrieve the azimuth of a channel. More... | |
The channel manager.
The channel manager should be used to manage a group of channel.
Definition at line 17 of file ChannelManager.h.
Hoa2D::ChannelManager::ChannelManager | ( | unsigned int | number_of_channels = 1 | ) |
The channel manager constructor.
The channel manager constructor allocates and initialize the member values for each channel.
number_of_channels | The number of channels you need to manage, default is 1. |
Definition at line 11 of file ChannelManager.cpp.
Hoa2D::ChannelManager::~ChannelManager | ( | ) |
The channel manager destructor.
The channel manager destructor free the memory.
Definition at line 17 of file ChannelManager.cpp.
|
inline |
Retrieve the abscissa of a channel.
index | The index of the channel. |
Definition at line 305 of file ChannelManager.h.
|
inline |
Retrieve the azimuth of a channel.
index | The index of the channel. |
Definition at line 330 of file ChannelManager.h.
double Hoa2D::ChannelManager::getClosestDefChannelAzimuth | ( | const int | index | ) |
Retrieve the closest default azimuth position of a channel.
index | The index of the channel. |
Definition at line 267 of file ChannelManager.cpp.
double Hoa2D::ChannelManager::getClosestDefChannelAzimuth | ( | double | azimuth | ) |
Retrieve the closest default azimuth position relative to an azimuth value.
azimuth | The relative azimuth. |
Definition at line 272 of file ChannelManager.cpp.
double Hoa2D::ChannelManager::getClosestDefChannelDistance | ( | const int | index | ) |
Retrieve the distance to the closest default azimuth position relative to the azimuth of a channel.
index | The index of the channel. |
Definition at line 291 of file ChannelManager.cpp.
double Hoa2D::ChannelManager::getClosestDefChannelDistance | ( | double | azimuth | ) |
Retrieve the distance to the closest default azimuth position relative to an azimuth value.
azimuth | The relative azimuth. |
Definition at line 296 of file ChannelManager.cpp.
|
inline |
Retrieve the directivity value of a channel.
index | The index of the channel. |
Definition at line 280 of file ChannelManager.h.
|
inline |
Retrieve the fisheye destination azimuth value.
Definition at line 245 of file ChannelManager.h.
|
inline |
Retrieve the fisheye start azimuth value of a channel.
index | The index of the channel. |
Definition at line 293 of file ChannelManager.h.
|
inline |
Retrieve the current fisheye step.
Definition at line 259 of file ChannelManager.h.
|
inline |
Retrieve the number of channels currently managed.
Definition at line 252 of file ChannelManager.h.
long Hoa2D::ChannelManager::getNumberOfSelectedChannels | ( | ) |
Retrieve the number of selected channels.
Definition at line 313 of file ChannelManager.cpp.
|
inline |
Retrieve the ordinate of a channel.
index | The index of the channel. |
Definition at line 317 of file ChannelManager.h.
|
inline |
Retrieve the selection state of a channel.
index | The index of the channel. |
Definition at line 267 of file ChannelManager.h.
void Hoa2D::ChannelManager::resetAzimuth | ( | const int | index = -1 | ) |
Reset one or each channel azimuth value.
Reset one or each channel to the default azimuth value.
If you want to reset all of the channels azimuth value, pass -1 in the index parameter.
index | The index of the channel (pass -1 to reset all of them). |
Definition at line 56 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::resetDirectivity | ( | const int | index = -1 | ) |
Reset one or each channel directivity to 1.
If you want to reset all of the channels directivity value, pass -1 in the index parameter.
index | The index of the channel (pass -1 to reset all of them). |
Definition at line 70 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::rotateSelectedChannels | ( | double | newRadian, |
int | channelBeingDragged, | ||
int | magnet = 0 |
||
) |
Rotate all of the currently selected channels relative to one channel azimuth rotation.
newRadian | The new azimuth of the channel which is being dragged |
channelBeingDragged | The index of the channel which is being dragged. |
magnet | Pass 1 to magnetize the channel to one of the default azimuth positions |
Definition at line 138 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::setAzimuth | ( | const int | index, |
double | azimuth | ||
) |
Set one or each channel azimuth value.
If you want to reset all of the channels azimuth value, pass -1 in the index parameter.
index | The index of the channel (pass -1 to reset all of them). |
azimuth | The new azimuth value in radians. |
Definition at line 90 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::setAzimuthList | ( | double * | azimuths, |
long | size | ||
) |
Set several channel azimuth with a list.
azimuths | An array of azimuth values in radians. |
size | The size of the array. |
Definition at line 84 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::setAzimuthToClosestDefChannelAzimuth | ( | const int | index | ) |
Set channel azimuth value to the closest default azimuth position value.
index | The index of the channel. |
Definition at line 307 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::setDirectivity | ( | const int | index, |
const double | directivity | ||
) |
Set one or each channel directivity value.
If you want to reset all of the channels azimuth value, pass -1 in the index parameter.
index | The index of the channel (pass -1 to reset all of them). |
directivity | The new directivity value (between 0 and 1). |
Definition at line 110 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::setDirectivityList | ( | double * | directivities, |
long | size | ||
) |
Set several channel directivity value with a list.
directivities | An array of directivity (between 0 and 1). |
size | The size of the array. |
Definition at line 104 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::setFisheyeDestAzimuth | ( | double | azimuth | ) |
Set fisheye destination azimuth.
azimuth | The azimuth value of the fisheye destination in radians. |
Definition at line 168 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::setFisheyeStartAzimuth | ( | const int | index | ) |
Set the fisheye start azimuth of one or several channel with current azimuth.
index | The index of the channel if greather than -1, pass -2 to affect all selected channels, pass -1 to affect all channels |
Definition at line 202 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::setFisheyeStartAzimuth | ( | const int | index, |
double | radian | ||
) |
Set the fisheye start azimuth of one or several channel.
index | The index of the channel if greather than -1, pass -2 to affect all selected channels, pass -1 to affect all channels |
Definition at line 222 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::setFisheyeStepDirect | ( | const int | index, |
double | fisheyeStep | ||
) |
Set the fisheye step directly.
index | The index of the channel if greather than -1, pass -2 to affect all selected channels, pass -1 to affect all channels |
fisheyeStep | The fisheye step (between 0 and 1). |
Definition at line 180 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::setFisheyeStepWithDelta | ( | const int | index, |
double | delta | ||
) |
Increment or decrement the fisheye step by a value.
index | The index of the channel if greather than -1, pass -2 to affect all selected channels, pass -1 to affect all channels |
Definition at line 174 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::setNumberOfChannels | ( | unsigned int | number_of_channels | ) |
Set the number of channels you want to manage.
number_of_channels | The number of channels you need to manage. |
Definition at line 24 of file ChannelManager.cpp.
void Hoa2D::ChannelManager::setSelected | ( | const int | index, |
int | selectedState | ||
) |
Set the selected state of one or each channel.
If you want to reset all of the channels selected state, pass -1 in the index parameter.
index | The index of the channel (pass -1 to reset all of them). |
selectedState | The selected state, pass 0 to unselect, 1 to select and -1 to toggle the state. |
Definition at line 124 of file ChannelManager.cpp.