25 x = tr * cosf(ttheta);
26 y = tr * sinf(ttheta);
38 x = (tr * cosf(ttheta) * cosf(tphi));
39 y = (tr * sinf(ttheta) * cosf(tphi));
40 z = (tr * sinf(tphi));
81 x = a * cosf(b) * cosf(c);
82 y = a * sinf(b) * cosf(c);
88 float tr = this->
len();
94 float tr = this->
len();
95 float ttheta = this->
theta();
96 x=tr * cosf(ttheta) * cosf(tele);
97 y=tr * sinf(ttheta) * cosf(tele);
102 float tr = tmag / this->
len();
117 v.
x = -
x; v.
y = -
y; v.
z = -
z;
127 v.
x = -
y; v.
y =
x; v.
z =
z;
140 return (
x==Q.
x &&
y==Q.
y);
143 return (
x==Q.
x &&
y==Q.
y &&
z==Q.
z);
153 return (
x!=Q.
x ||
y!=Q.
y);
156 return (
x!=Q.
x ||
y!=Q.
y ||
z!=Q.
z);
186 return (
x * w.
x +
y * w.
y +
z * w.
z);
192 return (
x * w.
y -
y * w.
x);
198 v.
x =
y * w.
z -
z * w.
y;
199 v.
y =
z * w.
x -
x * w.
z;
200 v.
z =
x * w.
y -
y * w.
x;
236 double ox=
x, oy=
y, oz=
z;
237 x = oy * w.
z - oz * w.
y;
238 y = oz * w.
x - ox * w.
z;
239 z = ox * w.
y - oy * w.
x;
311 P.
x = (float)(Q.
x / c);
312 P.
y = (float)(Q.
y / c);
313 P.
z = (float)(Q.
z / c);
357 return sqrtf(dx*dx + dy*dy + dz*dz);
364 return (dx*dx + dy*dy + dz*dz);
371 return sqrtf(dx*dx + dy*dy + dz*dz);
378 return (dx*dx + dy*dy + dz*dz);
406 double tan = atanf(sqrtf((
x*
x) + (
y*
y)) /
z);
411 return asin(
z /
len() );
425 if (len == 0)
return;
COORD_TYPE distance2(CPoint *)
COORD_TYPE operator*(CPoint)
COORD_TYPE operator|(CPoint)
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
void setElevation(double tele)
CPoint & operator-=(CPoint)
void setAzimuth(double taz)
CPoint operator+(CPoint Q, CPoint R)
CPoint operator/(CPoint Q, int c)
CPoint & operator/=(double)
unsigned setdim(unsigned)
void rotateBy(double angle)
CPoint & operator^=(CPoint)
COORD_TYPE distance(CPoint *)
COORD_TYPE operator()(unsigned idx) const
CPoint & operator+=(CPoint)
CPoint operator*(int c, CPoint Q)
CPoint & operator*=(double)
void setMagnitude(double tmag)