MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
posrel.cc File Reference
#include "mbconfig.h"
#include <cstring>
#include <iostream>
#include "matvec3.h"
Include dependency graph for posrel.cc:

Go to the source code of this file.

Functions

int main (int argn, const char *const argv[])
 

Function Documentation

int main ( int  argn,
const char *const  argv[] 
)

Definition at line 40 of file posrel.cc.

References EulerAngles2MatR(), M_PI, and Mat3x3::Transpose().

41 {
42  static doublereal d[3];
43 
44  while (true) {
45  std::cin >> d[0];
46  if (std::cin) {
47  std::cin >> d[1] >> d[2];
48  Vec3 x1(d);
49  std::cin >> d[0] >> d[1] >> d[2];
50  Mat3x3 R1(EulerAngles2MatR(Vec3(d)/180.*M_PI));
51  std::cin >> d[0] >> d[1] >> d[2];
52  Vec3 x2(d);
53 
54  std::cout << R1.Transpose()*(x2-x1) << std::endl;
55  } else {
56  break;
57  }
58  }
59 
60  return (EXIT_SUCCESS);
61 }
#define M_PI
Definition: gradienttest.cc:67
Definition: matvec3.h:98
Mat3x3 EulerAngles2MatR(const Vec3 &v)
Definition: matvec3.cc:1008
double doublereal
Definition: colamd.c:52

Here is the call graph for this function: