non-crashing (but also non-functional) integration of VBAP with panner "architecture"

git-svn-id: svn://localhost/ardour2/branches/3.0@8056 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2010-11-19 00:58:57 +00:00
parent e50bd9e653
commit d8ec9bbea7
10 changed files with 211 additions and 78 deletions

View File

@@ -16,6 +16,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <iostream>
#include <cmath>
#include "pbd/cartesian.h"
@@ -39,13 +40,13 @@ PBD::cart_to_azi_ele (double x, double y, double z, double& azimuth, double& ele
if(x == 0.0) {
atan_y_per_x = M_PI / 2;
} else {
atan_y_per_x = atan(y / x);
atan_y_per_x = atan (y/x);
}
azimuth = atan_y_per_x / atorad;
if (x < 0.0) {
azimuth +=180.0;
azimuth += 180.0;
}
distance = sqrt (x*x + y*y);
@@ -66,6 +67,8 @@ PBD::cart_to_azi_ele (double x, double y, double z, double& azimuth, double& ele
elevation = atan_x_pl_y_per_z / atorad;
std::cerr << x << ", " << y << ", " << z << " = " << azimuth << " /= " << elevation << std::endl;
// distance = sqrtf (x*x + y*y + z*z);
}