#include "mbconfig.h"
#include <cstring>
#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 40 of file rot2phi.cc.
References M11, M12, M13, M21, M22, M23, M31, M32, M33, M_PI, Vec3::Norm(), and RotManip::VecRot().
43 if (!strcasecmp(argv[1],
"-?")
44 || !strcasecmp(argv[1],
"-h")
45 || !strcasecmp(argv[1],
"--help")) {
46 std::cerr << std::endl <<
"usage: " << argv[0] << std::endl << std::endl
47 <<
" reads a rotation matrix (row-oriented) from stdin;" << std::endl
48 <<
" writes the rotation vector {magniture (in degs), direction} on standard output" << std::endl << std::endl
49 <<
"part of MBDyn package (Copyright (C) Pierangelo Masarati, 1996)" << std::endl << std::endl;
54 std::cout.precision(16);
60 std::cin >> d[
M12] >> d[
M13]
65 std::cout << d*180./
M_PI <<
" " << phi/d << std::endl;
67 std::cout << 0. <<
" " << 0. <<
" " << 0. <<
" " << 0. << std::endl;
74 return (EXIT_SUCCESS);
Vec3 VecRot(const Mat3x3 &Phi)