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

The ambisonic rotate. More...

#include <Rotate.h>

Inheritance diagram for Hoa3D::Rotate:
Hoa3D::Ambisonic

Public Member Functions

 Rotate (unsigned int order)
 The Rotate constructor. More...
 
 ~Rotate ()
 The Rotate destructor. More...
 
void setRotations (const double roll, const double pitch, const double yaw)
 This method sets the three rotation values at the same time (xyz axis). More...
 
void setRoll (const double value)
 This method sets the roll value (rotation on the x-axis). More...
 
void setPitch (const double value)
 This method sets the pitch value (rotation on the y-axis). More...
 
void setYaw (const double value)
 This method sets the yaw value (rotation on the z-axis). More...
 
double getRoll () const
 Get the roll value (rotation on the x-axis). More...
 
double getPitch () const
 Get the pitch value (rotation on the y-axis). More...
 
double getYaw () const
 Get the yaw value (rotation on the z-axis). More...
 
void process (const float *inputs, float *outputs)
 This method performs the rotation with single precision. More...
 
void process (const double *inputs, double *outputs)
 This method performs the rotation with double precision. More...
 
- Public Member Functions inherited from Hoa3D::Ambisonic
 Ambisonic (unsigned int order)
 The ambisonic constructor. More...
 
 ~Ambisonic ()
 The ambisonic destructor. More...
 
unsigned int getOrder () const
 Retrieve the decomposition order. More...
 
unsigned int getNumberOfHarmonics () const
 Retrieve the number of harmonics. More...
 
int getHarmonicArgument (const unsigned int index) const
 Retrieve the argument of an harmonic. More...
 
unsigned int getHarmonicBand (const unsigned int index) const
 Retrieve the band of an harmonic. More...
 
std::string getHarmonicsName (const unsigned int index) const
 Retrieve a name for an harmonic. More...
 

Detailed Description

The ambisonic rotate.

The rotation.

Definition at line 18 of file Rotate.h.

Constructor & Destructor Documentation

Hoa3D::Rotate::Rotate ( unsigned int  order)

The Rotate constructor.

The Rotate constructor allocates and initialize the member values to computes spherical harmonics rotation depending on a decomposition order. The order must be at least 1.

Parameters
orderThe order.

Definition at line 11 of file Rotate.cpp.

Hoa3D::Rotate::~Rotate ( )

The Rotate destructor.

The Rotate destructor free the memory.

Definition at line 97 of file Rotate.cpp.

Member Function Documentation

double Hoa3D::Rotate::getPitch ( ) const
inline

Get the pitch value (rotation on the y-axis).

The pitch is equivalent to a rotation on the y-axis (also named tumble).

Returns
value The pitch value between 0 and 2π.

Definition at line 95 of file Rotate.h.

double Hoa3D::Rotate::getRoll ( ) const
inline

Get the roll value (rotation on the x-axis).

The roll is equivalent to a rotation on the x-axis (also named tilt).

Returns
value The roll value between 0 and 2π.

Definition at line 88 of file Rotate.h.

double Hoa3D::Rotate::getYaw ( ) const
inline

Get the yaw value (rotation on the z-axis).

The yaw is equivalent to a rotation on the z-axis (also named rotation).

Returns
value The yaw value between 0 and 2π.

Definition at line 102 of file Rotate.h.

void Hoa3D::Rotate::process ( const float *  inputs,
float *  outputs 
)

This method performs the rotation with single precision.

You should use this method for not-in-place processing and performs the rotation sample by sample. (warning : doesn't work with in-place vectors); The inputs array and outputs array contains the spherical harmonics samples and the minimum size must be the number of harmonics.

Parameters
inputsThe inputs array.
outputsThe outputs array.

Definition at line 48 of file Rotate.cpp.

void Hoa3D::Rotate::process ( const double *  inputs,
double *  outputs 
)

This method performs the rotation with double precision.

You should use this method for not-in-place processing and performs the rotation sample by sample. (warning : doesn't work with in-place vectors); The inputs array and outputs array contains the spherical harmonics samples and the minimum size must be the number of harmonics.

Parameters
inputsThe inputs array.
outputsThe outputs array.

Definition at line 75 of file Rotate.cpp.

void Hoa3D::Rotate::setPitch ( const double  value)

This method sets the pitch value (rotation on the y-axis).

The pitch is equivalent to a rotation on the y-axis (also named tumble).

Parameters
valueThe pitch value between 0 and 2π.
See Also
setRoll
setYaw

Definition at line 34 of file Rotate.cpp.

void Hoa3D::Rotate::setRoll ( const double  value)

This method sets the roll value (rotation on the x-axis).

The roll is equivalent to a rotation on the x-axis (also named tilt).

Parameters
valueThe roll value between 0 and 2π.
See Also
setPitch
setYaw

Definition at line 26 of file Rotate.cpp.

void Hoa3D::Rotate::setRotations ( const double  roll,
const double  pitch,
const double  yaw 
)

This method sets the three rotation values at the same time (xyz axis).

This method sets the three rotation values at the same time (xyz axis).

Parameters
rollThe roll value is equivalent to a rotation on the x-axis (also named tilt), between 0 and 2π.
pitchThe pitch value is equivalent to a rotation on the y-axis (also named tumble), between 0 and 2π.
yawThe yaw value is equivalent to a rotation on the z-axis (also named rotation), between 0 and 2π.
See Also
setRoll, setPitch, setYaw

Definition at line 19 of file Rotate.cpp.

void Hoa3D::Rotate::setYaw ( const double  value)

This method sets the yaw value (rotation on the z-axis).

The yaw is equivalent to a rotation on the z-axis (also named rotation).

Parameters
valueThe yaw value between 0 and 2π.
See Also
setRoll
setPitch

Definition at line 40 of file Rotate.cpp.