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

The source. More...

#include <Source.h>

Public Member Functions

 Source (bool existence=true, double radius=0., double azimuth=0.)
 The source constructor. More...
 
 ~Source ()
 The source destructor. More...
 
void setExistence (bool state)
 Set the existence state of the source. More...
 
void setCoordinatesPolar (double radius, double azimuth)
 Set the position of the source with polar coordinates. More...
 
void setRadius (double radius)
 Set the radius of the source. More...
 
void seAzimuth (double azimuth)
 Set the azimuth of the source. More...
 
void setCoordinatesCartesian (double abscissa, double ordinate)
 Set the position of the source with cartesians coordinates. More...
 
void setAbscissa (double abscissa)
 Set the abscissa of the source. More...
 
void setOrdinate (double ordinate)
 Set the ordinate of the source. More...
 
void setColor (double red, double green, double blue, double alpha)
 Set the color of the source. More...
 
void setDescription (std::string description)
 Set the description of the source. More...
 
void setGroup (long groupIndex)
 Add source to an indexed group. More...
 
void removeGroup (long groupIndex)
 Remove source from an indexed group. More...
 
void setMaximumRadius (double limitValue)
 Set the maximum radius of the source. More...
 
void setMute (bool state)
 Set the mute state of the source. More...
 
bool getExistence () const
 Get the existence state of the source. More...
 
double getRadius () const
 Get the radius of the source. More...
 
double getAzimuth () const
 Get the azimuth of the source. More...
 
double getAbscissa () const
 Get the abscissa of the source. More...
 
double getOrdinate () const
 Get the ordinate of the source. More...
 
double * getColor () const
 Get the color of the source. More...
 
std::string getDescription () const
 Get the description of the source. More...
 
long getNumberOfGroups () const
 Get the number of group the source is owned by. More...
 
long getGroupIndex (long index)
 Get the the group index the source is owned by at a particular index. More...
 
bool isOwnedByGroup (long groupIndex)
 Determine if the source is owned by a particular group. More...
 
bool getMute () const
 Get the mute state of the source. More...
 

Detailed Description

The source.

The source store and manage source informations like the position, color, mute...

Definition at line 17 of file Source.h.

Constructor & Destructor Documentation

Hoa2D::Source::Source ( bool  existence = true,
double  radius = 0.,
double  azimuth = 0. 
)

The source constructor.

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

Parameters
existenceThe existence state of the source.
radiusThe radius of the source.
azimuthThe azimuth of the source.

Definition at line 11 of file Source.cpp.

Hoa2D::Source::~Source ( )

The source destructor.

The source destructor free the memory.

Definition at line 132 of file Source.cpp.

Member Function Documentation

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

Get the abscissa of the source.

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

Definition at line 159 of file Source.h.

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

Get the azimuth of the source.

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

Definition at line 152 of file Source.h.

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

Get the color of the source.

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

Definition at line 173 of file Source.h.

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

Get the description of the source.

Returns
The description of the source.
See Also
setDescription

Definition at line 180 of file Source.h.

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

Get the existence state of the source.

Returns
The existence state of the source.
See Also
setExistence

Definition at line 138 of file Source.h.

long Hoa2D::Source::getGroupIndex ( long  index)

Get the the group index the source is owned by at a particular index.

Parameters
indexThe index of the group
Returns
The group index.

Definition at line 117 of file Source.cpp.

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

Get the mute state of the source.

Returns
The mute state of the source.
See Also
setMute

Definition at line 208 of file Source.h.

long Hoa2D::Source::getNumberOfGroups ( ) const
inline

Get the number of group the source is owned by.

Returns
The number of group.
See Also
setDescription

Definition at line 187 of file Source.h.

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

Get the ordinate of the source.

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

Definition at line 166 of file Source.h.

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

Get the radius of the source.

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

Definition at line 145 of file Source.h.

bool Hoa2D::Source::isOwnedByGroup ( long  groupIndex)

Determine if the source is owned by a particular group.

Parameters
groupIndexThe index of the group
Returns
true if the source is in the group, false otherwise.

Definition at line 125 of file Source.cpp.

void Hoa2D::Source::removeGroup ( long  groupIndex)

Remove source from an indexed group.

Parameters
groupIndexThe index of the group.

Definition at line 102 of file Source.cpp.

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

Set the azimuth of the source.

Parameters
azimuthThe azimuth of the source.

Definition at line 49 of file Source.cpp.

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

Set the abscissa of the source.

Parameters
abscissaThe abscissa of the source.

Definition at line 60 of file Source.cpp.

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

Set the color of the source.

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 74 of file Source.cpp.

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

Set the position of the source with cartesians coordinates.

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

Definition at line 54 of file Source.cpp.

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

Set the position of the source with polar coordinates.

Parameters
radiusThe radius of the source.
azimuthThe azimuth of the source.
See Also
setCoordinatesCartesian

Definition at line 33 of file Source.cpp.

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

Set the description of the source.

Parameters
descriptionThe text description of the source.

Definition at line 82 of file Source.cpp.

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

Set the existence state of the source.

Parameters
stateThe existence state of the source.
See Also
getExistence

Definition at line 28 of file Source.cpp.

void Hoa2D::Source::setGroup ( long  groupIndex)

Add source to an indexed group.

Parameters
groupIndexThe index of the group.

Definition at line 87 of file Source.cpp.

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

Set the maximum radius of the source.

Parameters
limitValueThe radius limit value.

Definition at line 23 of file Source.cpp.

void Hoa2D::Source::setMute ( bool  state)

Set the mute state of the source.

Parameters
stateThe mute state of the source.
See Also
getMute

Definition at line 97 of file Source.cpp.

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

Set the ordinate of the source.

Parameters
ordinateThe ordinate of the source.

Definition at line 67 of file Source.cpp.

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

Set the radius of the source.

Parameters
radiusThe radius of the source.
See Also
getRadius

Definition at line 39 of file Source.cpp.