HoaLibrary  2.0
High Order Ambisonics Library
 All Classes Namespaces Functions Enumerations Enumerator
Public Member Functions | List of all members
Hoa2D::SourcesGroup Class Reference

The sources group. More...

#include <SourcesGroup.h>

Public Member Functions

 SourcesGroup (SourcesManager *sourcesManager, bool existence)
 The source group constructor. More...
 
 ~SourcesGroup ()
 The source group destructor. More...
 
void setExistence (bool state)
 Set the existence state of the group. More...
 
void setCoordinatesPolar (double radius, double azimuth)
 Set the position of the group with polar coordinates. More...
 
void setRadius (double radius)
 Set the radius of the group. More...
 
void seAzimuth (double azimuth)
 Set the azimuth of the group. More...
 
void setCoordinatesCartesian (double abscissa, double ordinate)
 Set the position of the group with cartesians coordinates. More...
 
void setAbscissa (double abscissa)
 Set the abscissa of the group. More...
 
void setOrdinate (double ordinate)
 Set the ordinate of the group. More...
 
void setColor (double red, double green, double blue, double alpha)
 Set the color of the group. More...
 
void setDescription (std::string description)
 Set the description of the group. More...
 
void setMaximumRadius (double limitValue)
 Set the maximum radius of the group. More...
 
void addSource (long sourceIndex)
 Store a new source in this group. More...
 
void removeSource (long sourceIndex)
 Remove a source from this group. More...
 
void sourceHasMoved ()
 Notify the group that a source has moved. More...
 
void setMute (long aValue)
 Set the mute state of the group. More...
 
void setRelativeCoordinatesPolar (double radius, double azimuth)
 Set the position of the group with relative polar coordinates. More...
 
void setRelativeRadius (double radius)
 Set the radius of the group with a relative value. More...
 
void setRelativeAzimuth (double azimuth)
 Set the azimuth of the group with a relative value. More...
 
bool getExistence () const
 Get the existence state of the group. More...
 
double getRadius () const
 Get the radius of the group. More...
 
double getAzimuth () const
 Get the azimuth of the group. More...
 
double getAbscissa () const
 Get the abscissa of the group. More...
 
double getOrdinate () const
 Get the ordinate of the group. More...
 
double * getColor () const
 Get the color of the group. More...
 
std::string getDescription () const
 Get the description of the group. More...
 
long getNumberOfSources () const
 Get the number of sources owned by this group. More...
 
bool getMute () const
 Get the mute state of the group. More...
 
long getSourceIndex (long index) const
 Get the the index of a source stored at a particular index by the group. More...
 

Detailed Description

The sources group.

The SourcesGroup should be used to store and manage multiple Source

Definition at line 20 of file SourcesGroup.h.

Constructor & Destructor Documentation

Hoa2D::SourcesGroup::SourcesGroup ( SourcesManager sourcesManager,
bool  existence 
)

The source group constructor.

The source group constructor allocates and initialize the member values for a source group.

Parameters
sourcesManagerA SourceManager object's pointer.
existenceThe existence state of the source.

Definition at line 11 of file SourcesGroup.cpp.

Hoa2D::SourcesGroup::~SourcesGroup ( )

The source group destructor.

The source group destructor free the memory.

Definition at line 370 of file SourcesGroup.cpp.

Member Function Documentation

void Hoa2D::SourcesGroup::addSource ( long  sourceIndex)

Store a new source in this group.

Parameters
sourceIndexThe index of the source to store.

Definition at line 65 of file SourcesGroup.cpp.

double Hoa2D::SourcesGroup::getAbscissa ( ) const
inline

Get the abscissa of the group.

Returns
The abscissa of the group.
See Also
setAbscissa, setCoordinatesCartesian

Definition at line 199 of file SourcesGroup.h.

double Hoa2D::SourcesGroup::getAzimuth ( ) const
inline

Get the azimuth of the group.

Returns
The azimuth of the group.
See Also
setAzimuth, setCoordinatesPolar

Definition at line 192 of file SourcesGroup.h.

double* Hoa2D::SourcesGroup::getColor ( ) const
inline

Get the color of the group.

Returns
The rgba color of the group as an array of 4 double.
See Also
setColor

Definition at line 213 of file SourcesGroup.h.

std::string Hoa2D::SourcesGroup::getDescription ( ) const
inline

Get the description of the group.

Returns
The description of the group.
See Also
setDescription

Definition at line 220 of file SourcesGroup.h.

bool Hoa2D::SourcesGroup::getExistence ( ) const
inline

Get the existence state of the group.

Returns
The existence state of the group.
See Also
setExistence

Definition at line 178 of file SourcesGroup.h.

bool Hoa2D::SourcesGroup::getMute ( ) const
inline

Get the mute state of the group.

Returns
The mute state of the group.
See Also
setMute

Definition at line 234 of file SourcesGroup.h.

long Hoa2D::SourcesGroup::getNumberOfSources ( ) const
inline

Get the number of sources owned by this group.

Returns
The number of sources.
See Also
setDescription

Definition at line 227 of file SourcesGroup.h.

double Hoa2D::SourcesGroup::getOrdinate ( ) const
inline

Get the ordinate of the group.

Returns
The ordinate of the group.
See Also
setOrdinate, setCoordinatesCartesian

Definition at line 206 of file SourcesGroup.h.

double Hoa2D::SourcesGroup::getRadius ( ) const
inline

Get the radius of the group.

Returns
The radius of the group.
See Also
setRadius, setCoordinatesPolar

Definition at line 185 of file SourcesGroup.h.

long Hoa2D::SourcesGroup::getSourceIndex ( long  index) const
inline

Get the the index of a source stored at a particular index by the group.

Parameters
indexThe index of the source.
Returns
The index of the source if it exists, -1 otherwise.

Definition at line 241 of file SourcesGroup.h.

void Hoa2D::SourcesGroup::removeSource ( long  sourceIndex)

Remove a source from this group.

Parameters
sourceIndexThe index of the source to store.

Definition at line 82 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::seAzimuth ( double  azimuth)

Set the azimuth of the group.

Parameters
azimuthThe azimuth of the group.

Definition at line 311 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setAbscissa ( double  abscissa)

Set the abscissa of the group.

Parameters
abscissaThe abscissa of the group.

Definition at line 325 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setColor ( double  red,
double  green,
double  blue,
double  alpha 
)

Set the color of the group.

Parameters
redThe red component of the color.
greenThe green component of the color
blueThe blue component of the color
alphaThe alpha component of the color

Definition at line 33 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setCoordinatesCartesian ( double  abscissa,
double  ordinate 
)

Set the position of the group with cartesians coordinates.

Parameters
abscissaThe abscissa of the group.
ordinateThe ordinate of the group.

Definition at line 316 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setCoordinatesPolar ( double  radius,
double  azimuth 
)

Set the position of the group with polar coordinates.

Parameters
radiusThe radius of the group.
azimuthThe azimuth of the group.
See Also
setRelativeCoordinatesPolar, setCoordinatesCartesian

Definition at line 301 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setDescription ( std::string  description)

Set the description of the group.

Parameters
descriptionThe text description of the group.

Definition at line 28 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setExistence ( bool  state)

Set the existence state of the group.

Parameters
stateThe existence state of the group.
See Also
getExistence

Definition at line 23 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setMaximumRadius ( double  limitValue)

Set the maximum radius of the group.

Parameters
limitValueThe radius limit value.

Definition at line 41 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setMute ( long  aValue)

Set the mute state of the group.

Parameters
stateThe mute state of the group.
See Also
getMute

Definition at line 365 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setOrdinate ( double  ordinate)

Set the ordinate of the group.

Parameters
ordinateThe ordinate of the group.

Definition at line 332 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setRadius ( double  radius)

Set the radius of the group.

Parameters
radiusThe radius of the group.
See Also
getRadius

Definition at line 306 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setRelativeAzimuth ( double  azimuth)

Set the azimuth of the group with a relative value.

Parameters
azimuthThe relative azimuth value.
See Also
setCoordinatesPolar, setRelativeRadius

Definition at line 352 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setRelativeCoordinatesPolar ( double  radius,
double  azimuth 
)

Set the position of the group with relative polar coordinates.

Parameters
radiusThe relative radius value.
azimuthThe relative azimuth value.
See Also
setCoordinatesPolar, setRelativeRadius

Definition at line 339 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::setRelativeRadius ( double  radius)

Set the radius of the group with a relative value.

Parameters
radiusThe relative radius value.
See Also
setCoordinatesPolar, setRelativeRadius

Definition at line 345 of file SourcesGroup.cpp.

void Hoa2D::SourcesGroup::sourceHasMoved ( )

Notify the group that a source has moved.

You need to call this function whenever a source has moved to update group information.

Parameters
sourceIndexThe index of the source to store.

Definition at line 77 of file SourcesGroup.cpp.