HOA Library  beta 3.0
High Order Ambisonics Library
Public Member Functions | List of all members
Vector< D, T > Class Template Referenceabstract

The vector class computes the energy and the velocity vectors for a set of loudspeakers. More...

#include <Hoa_Vector.hpp>

Inheritance diagram for Vector< D, T >:
ProcessorPlanewaves< D, T > Processor< D, T >

Public Member Functions

 Vector (const size_t numberOfChannels) hoa_noexcept
 The vector constructor. More...
 
virtual ~Vector () hoa_noexcept=0
 The vector destructor. More...
 
virtual void computeRendering () hoa_noexcept=0
 This method pre-computes the necessary values to process. More...
 
virtual void process (const T *inputs, T *outputs) hoa_noexcept=0
 This method computes the energy and velocity vectors. More...
 
virtual void processVelocity (const T *inputs, T *outputs) hoa_noexcept=0
 This method computes the velocity vector. More...
 
virtual void processEnergy (const T *inputs, T *outputs) hoa_noexcept=0
 This method computes the energy vector. More...
 
- Public Member Functions inherited from ProcessorPlanewaves< D, T >
 ProcessorPlanewaves (const size_t nplws) hoa_noexcept
 The planewaves constructor. More...
 
virtual ~ProcessorPlanewaves () hoa_noexcept
 The planewaves destructor.
 
size_t getNumberOfPlanewaves () const hoa_noexcept
 Returns the number of planewaves.
 
void setPlanewavesRotation (const T x_axe, const T y_axe, const T z_axe) hoa_noexcept
 Sets the global rotation of the planewaves. More...
 
getPlanewavesRotationX () const hoa_noexcept
 Returns the angle of rotation around the x axis in radian of the planewaves.
 
getPlanewavesRotationY () const hoa_noexcept
 Returns the angle of rotation around the y axis in radian of the planewaves.
 
getPlanewavesRotationZ () const hoa_noexcept
 Returns the angle of rotation around the z axis in radian of the planewaves.
 
size_t getPlanewaveIndex (const size_t index) hoa_noexcept
 Returns the index of a planewave.
 
void setPlanewaveAzimuth (const size_t index, const T azimuth) hoa_noexcept
 Sets the azimuth of a planewave in radian. More...
 
void setPlanewaveElevation (const size_t index, const T elevation) hoa_noexcept
 Sets the azimuth of a planewave in radian. More...
 
getPlanewaveAzimuth (const size_t index, const bool rotation=true) const hoa_noexcept
 Returns the azimuth of a planewave. More...
 
getPlanewaveElevation (const size_t index, const bool rotation=true) const hoa_noexcept
 Returns the elevation of a planewave. More...
 
getPlanewaveAbscissa (const size_t index, const bool rotation=true) const hoa_noexcept
 Returns the abscissa of a planewave. More...
 
getPlanewaveOrdinate (const size_t index, const bool rotation=true) const hoa_noexcept
 Returns the ordinate of a planewave. More...
 
getPlanewaveHeight (const size_t index, const bool rotation=true) const hoa_noexcept
 Returns the height of a planewave. More...
 
std::string getPlanewaveName (const size_t index) const hoa_noexcept
 Retruns the name for a planewave. More...
 
- Public Member Functions inherited from Processor< D, T >
virtual ~Processor () hoa_noexcept
 The destructor.
 

Detailed Description

template<Dimension D, typename T>
class hoa::Vector< D, T >

The vector class computes the energy and the velocity vectors for a set of loudspeakers.

The vector class compute the energy and the velocity vectors of a sound field for a set of channels. It is an useful tool to characterize the quality of the sound field restitution. For further information : Michael A. Gerzon, General metatheorie of auditory localization. Audio Engineering Society Preprint, 3306, 1992. This class retrieve the cartesian coordinates of the vectors.

Definition at line 22 of file Hoa_Vector.hpp.

Constructor & Destructor Documentation

Vector ( const size_t  numberOfChannels)

The vector constructor.

The vector constructor allocates and initialize the member values to computes vectors. The number of channels must be at least 1.

Parameters
numberOfChannelsThe number of channels.
virtual ~Vector ( )
pure virtual

The vector destructor.

The vector destructor free the memory.

Member Function Documentation

virtual void computeRendering ( )
pure virtual

This method pre-computes the necessary values to process.

You should use this method before calling the process methods and after changing the azimuth, the elevation or the offset of the channels.

virtual void process ( const T *  inputs,
T *  outputs 
)
pure virtual

This method computes the energy and velocity vectors.

You should use this method for in-place or not-in-place processing and sample by sample. The inputs array contains the channels samples and the minimum size must be the number of channels. The outputs array contains the vectors cartesian coordinates and the minimum size must be 4 for 2d and 6 for 3d. The coordinates arrangement in the outputs array is velocity abscissa, velocity ordinate, (velocity height), energy abscissa and energy ordinate (and energy height).

Parameters
inputsThe inputs array.
outputsThe outputs array.

Reimplemented from Processor< D, T >.

virtual void processVelocity ( const T *  inputs,
T *  outputs 
)
pure virtual

This method computes the velocity vector.

You should use this method for in-place or not-in-place processing and sample by sample. The inputs array and contains the channels samples and the minimum size must be the number of channels. The outputs array contains the vectors cartesian coordinates and the minimum size must be 2 for 2d and 3 for 3d. The coordinates arrangement in the outputs array is velocity abscissa and velocity ordinate (and velocity height).

Parameters
inputsThe inputs array.
outputsThe outputs array.
virtual void processEnergy ( const T *  inputs,
T *  outputs 
)
pure virtual

This method computes the energy vector.

You should use this method for in-place or not-in-place processing and sample by sample. The inputs array and contains the channels samples and the minimum size must be the number of harmonics. The outputs array contains the vectors cartesian coordinates and the minimum size must be 2 for 2d and 3 for 3d. The coordinates arrangement in the outputs array is energy abscissa and energy ordinate (and energy height).

Parameters
inputsThe inputs array.
outputsThe outputs array.