#include "mbconfig.h"
#include <cstring>
#include <stdlib.h>
#include <string>
#include <iostream>
#include "matvec3.h"
#include "matvecexp.h"
#include "Rot.hh"
Go to the source code of this file.
int main |
( |
int |
argn, |
|
|
const char *const |
argv[] |
|
) |
| |
Definition at line 46 of file eu2phi.cc.
References EulerAngles2MatR(), M_PI, Vec3::Norm(), R, and RotManip::VecRot().
50 if (!strcasecmp(argv[1],
"-?")
51 || !strcasecmp(argv[1],
"-h")
52 || !strcasecmp(argv[1],
"--help")) {
53 std::cerr << std::endl
54 <<
"usage: " << argv[0] <<
"[-v]" << std::endl
56 <<
" reads the Euler angles (in degs)"
57 " from stdin;" << std::endl
58 <<
" writes the rotation vector {magniture (in degs), direction} on standard output"
60 <<
" -v: write the rotation vector (in rads) instead of magnitude, direction"
63 <<
"part of MBDyn package (Copyright (C)"
64 " Pierangelo Masarati, 1996-2006)" << std::endl
65 <<
" Authors: Alessandro Fumagalli" << std::endl
66 <<
" Marco Morandini" << std::endl
70 if (!strcasecmp(argv[1],
"-v")) {
76 std::cout.precision(16);
82 std::cin >> d[1] >> d[2];
88 std::cout << phi << std::endl;
92 std::cout << D*180./
M_PI <<
" " << phi/D << std::endl;
94 std::cout << 0. <<
" " << 0. <<
" " << 0. <<
" " << 0. << std::endl;
Vec3 VecRot(const Mat3x3 &Phi)
Mat3x3 EulerAngles2MatR(const Vec3 &v)