#include "mbconfig.h"
#include <cstring>
#include <iostream>
#include "matvec3.h"
Go to the source code of this file.
int main |
( |
int |
argn, |
|
|
const char *const |
argv[] |
|
) |
| |
Definition at line 40 of file rotrel.cc.
References dRaDegr, EulerAngles2MatR(), MatR2EulerAngles(), R, and Mat3x3::Transpose().
45 if (!strcasecmp(argv[1],
"-?")
46 || !strcasecmp(argv[1],
"-h")
47 || !strcasecmp(argv[1],
"--help")) {
48 std::cerr << std::endl
49 <<
"usage: " << argv[0]
50 <<
" [mat|euler]" << std::endl
52 <<
" reads the Euler angles (in degs)"
53 " of bodies 1 and 2 from stdin;" << std::endl
54 <<
" writes, on standard output:" << std::endl
55 <<
" default|\"euler\", the relative"
56 " Euler angles," << std::endl
57 <<
" \"mat\", the relative rotation"
58 " matrix (column-oriented)" << std::endl
60 <<
"part of MBDyn package (Copyright (C)"
61 " Pierangelo Masarati, 1996-2004)" << std::endl
64 }
else if (!strcasecmp(argv[1],
"mat")) {
66 }
else if (!strcasecmp(argv[1],
"euler")) {
77 std::cin >> d[1] >> d[2];
79 std::cin >> d[0] >> d[1] >> d[2];
84 std::cout <<
R << std::endl;
93 return (EXIT_SUCCESS);
Vec3 MatR2EulerAngles(const Mat3x3 &R)
Mat3x3 EulerAngles2MatR(const Vec3 &v)