• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • astro
attlib.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2013 Gerhard Holtkamp
9 //
10 
11 /***********************************************************************
12  3-Dim Vector and Matrix Definitions and Operations
13 
14  License:GNU LGPL Version 2+
15 
16  Author: Gerhard HOLTKAMP 14-JAN-2012
17  ***********************************************************************/
18 
19 //#include <iostream>
20 #include "attlib.h"
21 #include <cmath>
22 using namespace std;
23 
24 /*********************************************************************/
25 double atan20 (double y, double x)
26 {
27  /* redefine atan2 so that it does'nt crash when both x and y are 0 */
28  double result;
29 
30  if ((x == 0) && (y == 0)) result = 0;
31  else result = atan2 (y, x);
32 
33  return result;
34 }
35 
36 
37  Vec3::Vec3(double x, double y, double z)
38  {assign(x, y, z);}
39 
40  Vec3::Vec3 (const Vec3& c)
41  {
42  for (int j = 0; j<3; j++) v[j] = c.v[j];
43  }
44 
45 
46  void Vec3::assign (double x, double y, double z)
47  {
48  v[0]=x; v[1]=y; v[2]=z;
49  }
50 
51  double& Vec3::operator [] (unsigned index)
52  {
53  return (index < 3) ? * (v + index) : *v;
54  }
55 
56  Vec3& Vec3::operator = (const Vec3& c)
57  {
58  for (int j = 0; j<3; j++) v[j] = c.v[j];
59  return *this;
60  }
61 
62  Vec3& Vec3::operator += (const Vec3& c)
63  {
64  for (int j = 0; j<3; j++) v[j] = v[j] + c.v[j];
65  return *this;
66  }
67 
68  Vec3& Vec3::operator -= (const Vec3& c)
69  {
70  for (int j = 0; j<3; j++) v[j] = v[j] - c.v[j];
71  return *this;
72  }
73 
74  Vec3& Vec3::operator *= (const Vec3& c) // cross product
75  {
76  Vec3 result;
77  result.v[0] = v[1] * c.v[2] - v[2] * c.v[1];
78  result.v[1] = v[2] * c.v[0] - v[0] * c.v[2];
79  result.v[2] = v[0] * c.v[1] - v[1] * c.v[0];
80  for (int j = 0; j<3; j++) v[j] = result.v[j];
81  return *this;
82  }
83 
84  Vec3& Vec3::operator *= (double r)
85  {
86  for (int j = 0; j<3; j++) v[j] = r * v[j];
87  return *this;
88  }
89 
90  Vec3& Vec3::operator /= (double r)
91  {
92  double q;
93 
94  if (r < 1E-100) q = 0.0;
95  else q = 1.0 / r;
96  for (int j = 0; j<3; j++) v[j] = q * v[j];
97  return *this;
98  }
99 
100  double abs(const Vec3& c) // absolute value
101  {
102  double result=0;
103 
104  for (int j=0; j<3; j++) result += c.v[j]*c.v[j];
105  return sqrt(result);
106  }
107 
108  double dot (const Vec3& c1, const Vec3& c2) // dot product
109  {
110  double result=0;
111 
112  for (int j = 0; j<3; j++) result += c1.v[j]*c2.v[j];
113  return result;
114  }
115 
116  Vec3 operator + (const Vec3& c1, const Vec3& c2)
117  {
118  Vec3 result;
119 
120  for (int j = 0; j<3; j++) result.v[j] = c1.v[j] + c2.v[j];
121  return result;
122  }
123 
124  Vec3 operator - (const Vec3& c1, const Vec3& c2)
125  {
126  Vec3 result;
127 
128  for (int j = 0; j<3; j++) result.v[j] = c1.v[j] - c2.v[j];
129 
130  return result;
131  }
132 
133  Vec3 operator * (double r, const Vec3& c1)
134  {
135  Vec3 result;
136 
137  for (int j = 0; j<3; j++) result.v[j] = r * c1.v[j];
138  return result;
139  }
140 
141  Vec3 operator * (const Vec3& c1, double r)
142  {
143  Vec3 result;
144 
145  for (int j = 0; j<3; j++) result.v[j] = c1.v[j] * r;
146  return result;
147  }
148 
149  Vec3 operator * (const Vec3& c1, const Vec3& c2) // cross product
150  {
151  Vec3 result;
152 
153  result.v[0] = c1.v[1] * c2.v[2] - c1.v[2] * c2.v[1];
154  result.v[1] = c1.v[2] * c2.v[0] - c1.v[0] * c2.v[2];
155  result.v[2] = c1.v[0] * c2.v[1] - c1.v[1] * c2.v[0];
156  return result;
157  }
158 
159  Vec3 operator / (const Vec3& c1, double r)
160  {
161  double q;
162  Vec3 result;
163 
164  if (r < 1E-100) q = 0.0;
165  else q = 1.0 / r;
166  for (int j = 0; j<3; j++) result.v[j] = q * c1.v[j];
167  return result;
168  }
169 
170  Vec3 vnorm (const Vec3& c) // norm vector
171  {
172  int j;
173  double q=0;
174  Vec3 result;
175 
176  for (j=0; j<3; j++) q += c.v[j]*c.v[j];
177  q = sqrt(q);
178  if (q < 1E-100) q = 0.0;
179  else q = 1.0 / q;
180  for (j=0; j<3; j++) result.v[j] = c.v[j]*q;
181  return result;
182  }
183 
184  Vec3 carpol (const Vec3& c) // Cartesian -> Polar
185  /* Convert vector from cartesian coordinates c = [x, y, z]
186  into polar coordinates v = [rho, phi, theta]
187  where rho is the radius, phi the "azimuth" and theta the
188  "declination" (equatorial plane = 0, pole = 90ø)
189  */
190  {
191  double x, y, z, r;
192  Vec3 result;
193 
194  x = c.v[0];
195  y = c.v[1];
196  z = c.v[2];
197  r = x*x + y*y;
198  result.v[0] = sqrt (r + z*z);
199  result.v[1] = atan20 (y, x);
200  if (result.v[1] < 0) result.v[1] += 2.0*M_PI;
201  r = sqrt (r);
202  result.v[2] = atan20 (z, r);
203 
204  return result;
205  }
206 
207  Vec3 polcar (const Vec3& c) // Polar -> Cartesian
208  /* Convert vector from polar coordinates c = [rho, phi, theta]
209  where rho is the radius, phi the "azimuth" and theta the
210  "declination" (equatorial plane = 0, pole = 90ø)
211  into vector v = [x, y, z] of cartesian coordinates.
212  */
213  {
214  double r;
215  Vec3 result;
216 
217  r = c.v[0] * cos(c.v[2]);
218  result.v[0] = r * cos(c.v[1]);
219  result.v[1] = r * sin(c.v[1]);
220  result.v[2] = c.v[0] * sin(c.v[2]);
221 
222  return result;
223  }
224 
225  ostream& operator << (ostream& os, const Vec3& c)
226  {
227  os << "[" << c.v[0] << "," << c.v[1] << "," << c.v[2] << "]";
228  return os;
229  }
230 
231 /*******************************************************************/
232 
233 Mat3::Mat3 (double x)
234  {
235  int i, j;
236 
237  for (i=0; i<3; i++)
238  for (j=0; j<3; j++) m[i][j] = x;
239  }
240 
241 Mat3::Mat3 (const Mat3& c)
242  {
243  int i, j;
244 
245  for (i=0; i<3; i++)
246  for (j=0; j<3; j++) m[i][j] = c.m[i][j];
247  }
248 
249 void Mat3::assign (double x11, double x12, double x13,
250  double x21, double x22, double x23,
251  double x31, double x32, double x33)
252  {
253  m[0][0] = x11;
254  m[0][1] = x12;
255  m[0][2] = x13;
256  m[1][0] = x21;
257  m[1][1] = x22;
258  m[1][2] = x23;
259  m[2][0] = x31;
260  m[2][1] = x32;
261  m[2][2] = x33;
262  }
263 
264 void Mat3::assign (double x[3][3])
265  {
266  int i, j;
267 
268  for (i=0; i<3; i++)
269  for (j=0; j<3; j++) m[i][j] = x[i][j];
270  }
271 
272 void Mat3::PutMij (double x, int i, int j)
273  {
274  if ((i>0) && (i<4) && (j>0) && (j<4)) m[i-1][j-1] = x;
275  }
276 
277 double Mat3::GetMij (int i, int j) const
278  {
279  double result;
280 
281  if ((i>0) && (i<4) && (j>0) && (j<4)) result = m[i-1][j-1];
282  else result = 0;
283  return result;
284  }
285 
286 
287 Mat3& Mat3::operator = (const Mat3& c)
288  {
289  int i, j;
290 
291  for (i=0; i<3; i++)
292  for (j=0; j<3; j++) m[i][j] = c.m[i][j];
293 
294  return (*this);
295  }
296 
297 Mat3& Mat3::operator += (const Mat3& c)
298  {
299  int i, j;
300 
301  for (i=0; i<3; i++)
302  for (j=0; j<3; j++) m[i][j] = m[i][j] + c.m[i][j];
303  return *this;
304  }
305 
306 Mat3& Mat3::operator -= (const Mat3& c)
307  {
308  int i, j;
309 
310  for (i=0; i<3; i++)
311  for (j=0; j<3; j++) m[i][j] = m[i][j] - c.m[i][j];
312  return *this;
313  }
314 
315 Mat3& Mat3::operator *= (const Mat3& c)
316  {
317  int i, j, k;
318  double r;
319  Mat3 b;
320 
321  for (i=0; i<3; i++)
322  for (j=0; j<3; j++)
323  {
324  r = 0;
325  for (k=0; k<3; k++) r = r + c.m[i][k] * m[k][j];
326  b.m[i][j] = r;
327  }
328 
329  for (i=0; i<3; i++)
330  for (j=0; j<3; j++) m[i][j] = b.m[i][j];
331 
332  return *this;
333  }
334 
335 Mat3& Mat3::operator *= (double r)
336  {
337  int i, j;
338 
339  for (i=0; i<3; i++)
340  for (j=0; j<3; j++) m[i][j] = r*m[i][j];
341  return *this;
342  }
343 
344 Mat3& Mat3::operator /= (double r)
345  {
346  int i, j;
347  double q;
348 
349  if (r < 1E-100) q = 0.0;
350  else q = 1.0 / r;
351 
352  for (i=0; i<3; i++)
353  for (j=0; j<3; j++) m[i][j] = m[i][j] * q;
354  return *this;
355  }
356 
357 Mat3 mxcon (double r) // constant matrix with all elements of value r
358  {
359  Mat3 result;
360  int i, j;
361 
362  for (i=0; i<3; i++)
363  for (j=0; j<3; j++) result.m[i][j] = r;
364 
365  return result;
366  }
367 
368 Mat3 mxidn () // identity matrix
369  {
370  Mat3 result;
371  int i;
372 
373  result = mxcon (0);
374  for (i=0; i<3; i++) result.m[i][i] = 1.0;
375 
376  return result;
377  }
378 
379 Mat3 mxtrn (const Mat3& m1) // returns transposed of matrix m1
380  {
381  Mat3 result;
382  int i, j;
383 
384  for (i=0; i<3; i++)
385  for (j=0; j<3; j++) result.m[i][j] = m1.m[j][i];
386 
387  return result;
388  }
389 
390 double mxdet (const Mat3& c) // returns determinant of matrix m1
391  {
392  double result;
393 
394  result = c.m[0][0]*c.m[1][1]*c.m[2][2] + c.m[0][1]*c.m[1][2]*c.m[2][0]
395  + c.m[0][2]*c.m[1][0]*c.m[2][1] - c.m[0][2]*c.m[1][1]*c.m[2][0]
396  - c.m[0][0]*c.m[1][2]*c.m[2][1] - c.m[0][1]*c.m[1][0]*c.m[2][2];
397 
398  return result;
399  }
400 
401 Mat3 operator + (const Mat3& c1, const Mat3& c2)
402  {
403  Mat3 result;
404  int i, j;
405 
406  for (i=0; i<3; i++)
407  for (j=0; j<3; j++) result.m[i][j] = c1.m[i][j] + c2.m[i][j];
408  return result;
409  }
410 
411 Mat3 operator - (const Mat3& c1, const Mat3& c2)
412  {
413  Mat3 result;
414  int i, j;
415 
416  for (i=0; i<3; i++)
417  for (j=0; j<3; j++) result.m[i][j] = c1.m[i][j] - c2.m[i][j];
418  return result;
419  }
420 
421 Mat3 operator * (double r, const Mat3& c1)
422  {
423  Mat3 result;
424  int i, j;
425 
426  for (i=0; i<3; i++)
427  for (j=0; j<3; j++) result.m[i][j] = c1.m[i][j] * r;
428  return result;
429  }
430 
431 
432 Mat3 operator * (const Mat3& c1, double r)
433  {
434  int i, j;
435  Mat3 result;
436 
437  for (i=0; i<3; i++)
438  for (j=0; j<3; j++) result.m[i][j] = c1.m[i][j] * r;
439  return result;
440  }
441 
442 Mat3 operator * (const Mat3& c1, const Mat3& c2)
443  {
444  int i, j, k;
445  double r;
446  Mat3 result;
447 
448  for (i=0; i<3; i++)
449  for (j=0; j<3; j++)
450  {
451  r = 0;
452  for (k=0; k<3; k++) r = r + c1.m[i][k] * c2.m[k][j];
453  result.m[i][j] = r;
454  };
455 
456  return result;
457  }
458 
459 Mat3 operator / (const Mat3& c1, double r)
460  {
461  Mat3 result;
462  int i, j;
463  double q;
464 
465  if (r < 1E-100) q = 0.0;
466  else q = 1.0 / r;
467 
468  for (i=0; i<3; i++)
469  for (j=0; j<3; j++) result.m[i][j] = c1.m[i][j] * q;
470  return result;
471  }
472 
473 Vec3 mxvct (const Mat3& m1, Vec3& v1)
474  {
475  int i, j;
476  double r;
477  Vec3 result;
478 
479  for (i=0; i<3; i++)
480  {
481  r = 0;
482  for (j=0; j<3; j++) r = r + m1.m[i][j] * v1[j];
483  result[i] = r;
484  };
485  return result;
486  }
487 
488 Mat3 xrot (double a)
489  {
490  // Rotation matrix around x-axis with angle a (in radians).
491  double c, s;
492  Mat3 m1;
493 
494  c = cos (a);
495  s = sin (a);
496  m1.m[0][0] = 1.0;
497  m1.m[0][1] = 0.0;
498  m1.m[0][2] = 0.0;
499  m1.m[1][0] = 0.0;
500  m1.m[1][1] = c;
501  m1.m[1][2] = s;
502  m1.m[2][0] = 0.0;
503  m1.m[2][1] = -s;
504  m1.m[2][2] = c;
505 
506  return m1;
507  }
508 
509 Mat3 yrot (double a)
510  {
511  // Rotation matrix around y-axis with angle a (in radians).
512  double c, s;
513  Mat3 m1;
514 
515  c = cos (a);
516  s = sin (a);
517  m1.m[0][0] = c;
518  m1.m[0][1] = 0.0;
519  m1.m[0][2] = -s;
520  m1.m[1][0] = 0.0;
521  m1.m[1][1] = 1.0;
522  m1.m[1][2] = 0.0;
523  m1.m[2][0] = s;
524  m1.m[2][1] = 0.0;
525  m1.m[2][2] = c;
526 
527  return m1;
528  }
529 
530 Mat3 zrot (double a)
531  {
532  // Rotation matrix around z-axis with angle a (in radians).
533  double c, s;
534  Mat3 m1;
535 
536  c = cos (a);
537  s = sin (a);
538  m1.m[0][0] = c;
539  m1.m[0][1] = s;
540  m1.m[0][2] = 0.0;
541  m1.m[1][0] = -s;
542  m1.m[1][1] = c;
543  m1.m[1][2] = 0.0;
544  m1.m[2][0] = 0.0;
545  m1.m[2][1] = 0.0;
546  m1.m[2][2] = 1.0;
547 
548  return m1;
549  }
550 
551 Mat3 csmx (double p, double y, double r)
552  {
553  // Form cosine matrix m from pitch p, yaw y and roll r angles.
554  // The angles are to be given in radians.
555  // Roll is rotation about the x-axis, pitch about y, yaw about z.
556  //
557  Mat3 pitch, yaw, roll, result;
558 
559  pitch = yrot (p);
560  yaw = zrot (y);
561  roll = xrot (r);
562  result = yaw * pitch;
563  result *= roll;
564 
565  return result;
566  }
567 
568 void gpyr (const Mat3& m1, double& p, double& y, double& r)
569  {
570  // Get pitch p, yaw y and roll r angles (in radians) from
571  // cosine matrix m1.
572 
573  y = asin (m1.m[0][1]);
574  r = atan20 (-m1.m[2][1], m1.m[1][1]);
575  p = atan20 (-m1.m[0][2], m1.m[0][0]);
576  }
577 
578 void vcpy (Vec3& v, double& p, double& y)
579  {
580  // Convert direction given by cartesion vector v into a corresponding
581  // pitch (p) / yaw (y) sequence. The angles are in radians.
582 
583  p = atan20 (-v[2], v[0]);
584  y = atan20 (v[1], sqrt (v[0]*v[0] + v[2]*v[2]));
585  }
586 
587 void vcrp (Vec3& v, double& p, double& r)
588  {
589  // Convert direction given by cartesian vector v into a corresponding
590  // roll (r) / pitch (p) sequence. The angles are in radians.
591 
592  r = atan20 (v[1], -v[2]);
593  p = M_PI / 2.0 - atan20 (v[0], sqrt (v[1]*v[1] + v[2]*v[2]));
594  }
595 
596 void mxevc (const Mat3& m, double& a, Vec3& v)
597  {
598  // Get eigenvalue a and eigenvector v from cosine matrix m.
599  // The eigenangle a is in radians.
600 
601  double ri, rj, rk, q1, q2, q3, q4;
602 
603  // using the 3-1-3 rotation matrix, first get the corresponding
604  // angles ri, rj, rk of rotation about the x-, y-, z-axis.
605  ri = atan20 (m.m[2][0], -m.m[2][1]);
606  rj = 0.5 * acos (m.m[2][2]);
607  rk = atan20 (m.m[0][2], m.m[1][2]);
608 
609  // now convert to quaternions
610  q4 = sin (rj);
611  q1 = q4 * cos (0.5 * (ri - rk));
612  q2 = q4 * sin (0.5 * (ri - rk));
613  q4 = cos (rj);
614  q3 = q4 * sin (0.5 * (ri + rk));
615  q4 = q4 * cos (0.5 * (ri + rk));
616 
617  // now get the eigen angle and eigen vector
618  v.assign(q1, q2, q3);
619  ri = abs (v);
620  if (ri == 0)
621  {
622  // treat singularity for 3-1-3 matrix
623  v.assign (0.0, 0.0, 1.0);
624  q4 = 0.5 * sqrt (1.0 + m.m[0][0] + m.m[1][1] + m.m[2][2]);
625  }
626  else v /= ri;
627 
628  a = 2.0 * acos (q4);
629  }
630 
631 Mat3 mxrox (double& a, Vec3& v)
632  {
633  // Convert eigenvalue a (eigen angle in radians) and eigenvector v
634  // into a corresponding cosine rotation matrix m.
635 
636  double q1, q2, q3, q4, q12, q22, q32, q42;
637  Mat3 result;
638 
639  // calculate quaternions and their squares
640  q4 = sin ( 0.5 * a);
641  q1 = v[0] * q4;
642  q2 = v[1] * q4;
643  q3 = v[2] * q4;
644  q4 = cos (0.5 * a);
645  q12 = q1 * q1;
646  q22 = q2 * q2;
647  q32 = q3 * q3;
648  q42 = q4 * q4;
649 
650  // now get the matrix elements
651  result.assign ((q12 - q22 - q32 + q42), (2.0 * (q1*q2 + q3*q4)),
652  (2.0 * (q1*q3 - q2*q4)), (2.0 * (q1*q2 - q3*q4)),
653  (-q12 + q22 - q32 + q42),(2.0 * (q2*q3 + q1*q4)),
654  (2.0 * (q1*q3 + q2*q4)), (2.0 * (q2*q3 - q1*q4)),
655  (-q12 - q22 + q32 + q42));
656 
657  return result;
658  }
659 
660 
661 ostream& operator << (ostream& os, const Mat3& c)
662  {
663  os << "[" << c.m[0][0] << "," << c.m[0][1] << "," << c.m[0][2] << "]" << endl
664  << "[" << c.m[1][0] << "," << c.m[1][1] << "," << c.m[1][2] << "]" << endl
665  << "[" << c.m[2][0] << "," << c.m[2][1] << "," << c.m[2][2] << "]" << endl;
666  return os;
667  }
668 
Vec3::operator[]
double & operator[](unsigned index)
Definition: attlib.cpp:51
Mat3
Definition: attlib.h:63
Vec3
Definition: attlib.h:27
Mat3::operator-=
Mat3 & operator-=(const Mat3 &c)
Definition: attlib.cpp:306
vcpy
void vcpy(Vec3 &v, double &p, double &y)
Definition: attlib.cpp:578
yrot
Mat3 yrot(double a)
Definition: attlib.cpp:509
atan20
double atan20(double y, double x)
Definition: attlib.cpp:25
operator/
Vec3 operator/(const Vec3 &c1, double r)
Definition: attlib.cpp:159
operator-
Vec3 operator-(const Vec3 &c1, const Vec3 &c2)
Definition: attlib.cpp:124
Mat3::operator+=
Mat3 & operator+=(const Mat3 &c)
Definition: attlib.cpp:297
gpyr
void gpyr(const Mat3 &m1, double &p, double &y, double &r)
Definition: attlib.cpp:568
carpol
Vec3 carpol(const Vec3 &c)
Definition: attlib.cpp:184
vnorm
Vec3 vnorm(const Vec3 &c)
Definition: attlib.cpp:170
attlib.h
zrot
Mat3 zrot(double a)
Definition: attlib.cpp:530
Mat3::Mat3
Mat3(double x=0)
Definition: attlib.cpp:233
operator+
Vec3 operator+(const Vec3 &c1, const Vec3 &c2)
Definition: attlib.cpp:116
Mat3::assign
void assign(double x11, double x12, double x13, double x21, double x22, double x23, double x31, double x32, double x33)
Definition: attlib.cpp:249
Mat3::operator=
Mat3 & operator=(const Mat3 &c)
Definition: attlib.cpp:287
vcrp
void vcrp(Vec3 &v, double &p, double &r)
Definition: attlib.cpp:587
mxcon
Mat3 mxcon(double r)
Definition: attlib.cpp:357
abs
double abs(const Vec3 &c)
Definition: attlib.cpp:100
Vec3::operator*=
Vec3 & operator*=(const Vec3 &c)
Definition: attlib.cpp:74
Mat3::operator*=
Mat3 & operator*=(const Mat3 &c)
Definition: attlib.cpp:315
mxrox
Mat3 mxrox(double &a, Vec3 &v)
Definition: attlib.cpp:631
mxevc
void mxevc(const Mat3 &m, double &a, Vec3 &v)
Definition: attlib.cpp:596
Mat3::m
double m[3][3]
Definition: attlib.h:66
mxdet
double mxdet(const Mat3 &c)
Definition: attlib.cpp:390
mxtrn
Mat3 mxtrn(const Mat3 &m1)
Definition: attlib.cpp:379
csmx
Mat3 csmx(double p, double y, double r)
Definition: attlib.cpp:551
operator<<
ostream & operator<<(ostream &os, const Vec3 &c)
Definition: attlib.cpp:225
Vec3::operator/=
Vec3 & operator/=(double r)
Definition: attlib.cpp:90
operator*
Vec3 operator*(double r, const Vec3 &c1)
Definition: attlib.cpp:133
Mat3::operator/=
Mat3 & operator/=(double r)
Definition: attlib.cpp:344
Vec3::operator-=
Vec3 & operator-=(const Vec3 &c)
Definition: attlib.cpp:68
Mat3::GetMij
double GetMij(int i, int j) const
Definition: attlib.cpp:277
Vec3::assign
void assign(double x=0, double y=0, double z=0)
Definition: attlib.cpp:46
M_PI
#define M_PI
Definition: GeoDataCoordinates.h:26
mxidn
Mat3 mxidn()
Definition: attlib.cpp:368
xrot
Mat3 xrot(double a)
Definition: attlib.cpp:488
Vec3::operator+=
Vec3 & operator+=(const Vec3 &c)
Definition: attlib.cpp:62
Vec3::operator=
Vec3 & operator=(const Vec3 &c)
Definition: attlib.cpp:56
dot
double dot(const Vec3 &c1, const Vec3 &c2)
Definition: attlib.cpp:108
polcar
Vec3 polcar(const Vec3 &c)
Definition: attlib.cpp:207
mxvct
Vec3 mxvct(const Mat3 &m1, Vec3 &v1)
Definition: attlib.cpp:473
Vec3::Vec3
Vec3(double x=0, double y=0, double z=0)
Definition: attlib.cpp:37
Mat3::PutMij
void PutMij(double x, int i, int j)
Definition: attlib.cpp:272
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal