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

The planewaves class. More...

#include <Planewaves.h>

Inheritance diagram for Hoa2D::Planewaves:
Hoa2D::DecoderBinaural Hoa2D::DecoderIrregular Hoa2D::DecoderMulti Hoa2D::DecoderRegular Hoa2D::Meter Hoa2D::Projector Hoa2D::Recomposer Hoa2D::Vector

Public Member Functions

 Planewaves (unsigned int numberOfChannels)
 The planewaves constructor. More...
 
 ~Planewaves ()
 The planewaves destructor. More...
 
unsigned int getNumberOfChannels () const
 Retrieve the number of channels. More...
 
double getChannelAzimuth (unsigned int index) const
 Retrieve the azimuth of a channel. More...
 
double getChannelAbscissa (unsigned int index) const
 Retrieve the abscissa of a channel. More...
 
double getChannelOrdinate (unsigned int index) const
 Retrieve the ordinate of a channel. More...
 
std::string getChannelName (unsigned int index)
 Retrieve a name for a channel. More...
 

Protected Member Functions

void setChannelAzimuth (unsigned int index, double azimuth)
 Set the azimuth of a channel. More...
 
void setChannelsAzimuth (double *azimuths)
 Set the azimtuh of all the channels. More...
 

Detailed Description

The planewaves class.

The planewaves classes, that process on a set of channels (or planewaves), inherit from this class. It store basic informations like the number of channels, the coordinates and the names of channels.

Definition at line 18 of file Planewaves.h.

Constructor & Destructor Documentation

Hoa2D::Planewaves::Planewaves ( unsigned int  numberOfChannels)

The planewaves constructor.

The lanewaves constructor allocates and initializes the general member values depending on a number of channels. The number of loudspkeakers must a least 1.

Parameters
numberOfChannelsThe number of channels.

Definition at line 11 of file Planewaves.cpp.

Hoa2D::Planewaves::~Planewaves ( )

The planewaves destructor.

The Planewaves destructor free the memorie allocated.

Definition at line 36 of file Planewaves.cpp.

Member Function Documentation

double Hoa2D::Planewaves::getChannelAbscissa ( unsigned int  index) const
inline

Retrieve the abscissa of a channel.

Retrieve the abscissa of a channel. The abscissa is between -1 and 1, -1 is the left of the soundfield, 0 is the center of the soundfield and 1 is the right of the soundfield. The maximum index must be the number of channels - 1.

Parameters
indexThe index of the loudspeaker.
Returns
The abscissa of the channel if the channel exists, otherwise the function generates an error.
See Also
getChannelAzimuth
getChannelOrdinate
getChannelName

Definition at line 92 of file Planewaves.h.

double Hoa2D::Planewaves::getChannelAzimuth ( unsigned int  index) const
inline

Retrieve the azimuth of a channel.

Retrieve the azimuth of a channel. The azimuth of the channel is in radian, 0 radian is at the front of the soundfield and Pi is at the back of the sound field. The maximum index must be the number of channels - 1.

Parameters
indexThe index of the channel.
Returns
The azimuth of the channel if the channel exists, otherwise the function generates an error.
See Also
getChannelAbscissa
getChannelOrdinate
getChannelName

Definition at line 75 of file Planewaves.h.

std::string Hoa2D::Planewaves::getChannelName ( unsigned int  index)
inline

Retrieve a name for a channel.

Retrieve a name for a channel in a std::string format that will be "Channel index azimuth (in degrees)".

Parameters
indexThe index of a channel.
Returns
The method returns a name for the channel that contains its index and its azimuth if the channel exists, otherwise the function generates an error.
See Also
getChannelAzimuth
getChannelAbscissa
getChannelOrdinate

Definition at line 124 of file Planewaves.h.

double Hoa2D::Planewaves::getChannelOrdinate ( unsigned int  index) const
inline

Retrieve the ordinate of a channel.

Retrieve the ordinate of a channel. The ordinate is between -1 and 1, -1 is the back of the soundfield, 0 is the center of the soundfield and 1 is the front of the soundfield. The maximum index must be the number of channels - 1.

Parameters
indexThe index of the channel.
Returns
The ordinate of the channel if the channel exists, otherwise the function generates an error.
See Also
getChannelAzimuth
getChannelAbscissa
getChannelName

Definition at line 108 of file Planewaves.h.

unsigned int Hoa2D::Planewaves::getNumberOfChannels ( ) const
inline

Retrieve the number of channels.

Retrieve the number of channels of the planewave class.

Returns
The number of channels.

Definition at line 60 of file Planewaves.h.

void Hoa2D::Planewaves::setChannelAzimuth ( unsigned int  index,
double  azimuth 
)
protected

Set the azimuth of a channel.

Set the azimuth of a channel. The azimuth is in radian between 0 and 2 Pi, O is the front of the soundfield and Pi is the back of the sound field. The maximum index must be the number of channel - 1.

Parameters
indexThe index of the loudspeaker.
azimuthThe azimuth.

Definition at line 22 of file Planewaves.cpp.

void Hoa2D::Planewaves::setChannelsAzimuth ( double *  azimuths)
protected

Set the azimtuh of all the channels.

Set the azimtuh of all the channels. It is more efficient to set all the channels azimuths at the same time because even if only one channel has changed, all the decoding matrix have to be recomputed. The azimuths are in radian between 0 and 2 Pi, O is the front of the soundfield and Pi is the back of the sound field. The azimtuhs array must have a minimum size of the number of channels.

Parameters
azimuthsThe azimuths array.
See Also
setChannelAzimuth

Definition at line 29 of file Planewaves.cpp.