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

The planewaves class. More...

#include <Planewaves.h>

Inheritance diagram for Hoa3D::Planewaves:
Hoa3D::Meter Hoa3D::Vector

Public Member Functions

 Planewaves (unsigned int numberOfLoudspeakers)
 The planewaves constructor. More...
 
 ~Planewaves ()
 The planewaves destructor. More...
 
void setLoudspeakerPosition (unsigned int index, double azimuth, double elevation)
 Set the position of a loudspeaker. More...
 
unsigned int getNumberOfLoudspeakers () const
 Retrieve the number of loudspeakers. More...
 
double getLoudspeakerAzimuth (unsigned int index) const
 Retrieve the azimuth of a loudspeaker. More...
 
double getLoudspeakerElevation (unsigned int index) const
 Retrieve the elevation of a loudspeaker. More...
 
double getLoudspeakerAbscissa (unsigned int index) const
 Retrieve the abscissa of a loudspeaker. More...
 
double getLoudspeakerOrdinate (unsigned int index) const
 Retrieve the ordinate of a loudspeaker. More...
 
double getLoudspeakerHeight (unsigned int index) const
 Retrieve the height of a loudspeaker. More...
 
std::string getLoudspeakerName (unsigned int index)
 Retrieve the number of loudspeaker. More...
 

Detailed Description

The planewaves class.

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

Definition at line 19 of file Planewaves.h.

Constructor & Destructor Documentation

Hoa3D::Planewaves::Planewaves ( unsigned int  numberOfLoudspeakers)

The planewaves constructor.

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

Parameters
numberOfLoudspeakersThe number of loudspeakers.

Definition at line 11 of file Planewaves.cpp.

Hoa3D::Planewaves::~Planewaves ( )

The planewaves destructor.

The Planewaves destructor free the memorie allocated.

Definition at line 26 of file Planewaves.cpp.

Member Function Documentation

double Hoa3D::Planewaves::getLoudspeakerAbscissa ( unsigned int  index) const
inline

Retrieve the abscissa of a loudspeaker.

Retrieve the abscissa of a loudspeaker. 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 loudspeakers - 1.

Parameters
indexThe index of the loudspeaker.
Returns
The abscissa of the loudspeaker.
See Also
getLoudspeakerOrdinate
getLoudspeakerHeight

Definition at line 91 of file Planewaves.h.

double Hoa3D::Planewaves::getLoudspeakerAzimuth ( unsigned int  index) const
inline

Retrieve the azimuth of a loudspeaker.

Retrieve the azimuth of a loudspeaker. The azimuth of the loudspeaker 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 loudspeakers - 1.

Parameters
indexThe index of the loudspeaker.
Returns
The azimuth of the loudspeaker.
See Also
getLoudspeakerElevation

Definition at line 64 of file Planewaves.h.

double Hoa3D::Planewaves::getLoudspeakerElevation ( unsigned int  index) const
inline

Retrieve the elevation of a loudspeaker.

Retrieve the elevation of a loudspeaker. The elevation is in radian between -1/2 Pi and 1/2 Pi, -1/2 Pi the the bottom of the sound field, 0 is the center of the sound field and 1/2 Pi is the top of the sound field. The maximum index must be the number of loudspeakers - 1.

Parameters
indexThe index of the loudspeaker.
Returns
The elevation of the loudspeaker.
See Also
getLoudspeakerAzimuth

Definition at line 77 of file Planewaves.h.

double Hoa3D::Planewaves::getLoudspeakerHeight ( unsigned int  index) const
inline

Retrieve the height of a loudspeaker.

Retrieve the height of a loudspeaker. The height is between -1 and 1, -1 is the bottom of the soundfield, 0 is the center of the soundfield and 1 is the top of the soundfield. The maximum index must be the number of loudspeakers - 1.

Parameters
indexThe index of the loudspeaker.
Returns
The height of the loudspeaker.
See Also
getLoudspeakerAbscissa
getLoudspeakerOrdinate

Definition at line 119 of file Planewaves.h.

std::string Hoa3D::Planewaves::getLoudspeakerName ( unsigned int  index)
inline

Retrieve the number of loudspeaker.

Retrieve a name for an loudspeaker in a std::string format that will be "Loudspeaker index azimuth elevation".

Parameters
indexThe global index of a loudspeaker.
Returns
The name of the loudspeaker

Definition at line 131 of file Planewaves.h.

double Hoa3D::Planewaves::getLoudspeakerOrdinate ( unsigned int  index) const
inline

Retrieve the ordinate of a loudspeaker.

Retrieve the ordinate of a loudspeaker. 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 loudspeakers - 1.

Parameters
indexThe index of the loudspeaker.
Returns
The ordinate of the loudspeaker.
See Also
getLoudspeakerAbscissa
getLoudspeakerHeight

Definition at line 105 of file Planewaves.h.

unsigned int Hoa3D::Planewaves::getNumberOfLoudspeakers ( ) const
inline

Retrieve the number of loudspeakers.

Retrieve the number of loudspeakers of the planewave class.

Returns
The number of loudspeakers.

Definition at line 55 of file Planewaves.h.

void Hoa3D::Planewaves::setLoudspeakerPosition ( unsigned int  index,
double  azimuth,
double  elevation 
)

Set the position of a loudspeaker.

Set the position of a loudspeaker with polar coordinates. The azimtuh 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 elevation is in radian between -1/2 Pi and 1/2 Pi, -1/2 Pi the the bottom of the sound field, 0 is the center of the sound field and 1/2 Pi is the top of the sound field. The maximum index must be the number of loudspeakers - 1.

Parameters
indexThe index of the loudspeaker.
azimuthThe azimuth.
elevationThe elevation.

Definition at line 19 of file Planewaves.cpp.