Points&Forces (survey)
Software tools facilitating the task of surveying architecture
test_a_twist.cxx
Go to the documentation of this file.
1 /*
2 Copyright 2010-2011 Pierre SMARS (smars@yuntech.edu.tw)
3 This program is free software: you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation, either version 2 of the License, or
6 (at your option) any later version.
7 
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16 #include <iostream>
17 #include "a_twist.h"
18 
19 int main(int argc, char ** argv)
20 {
21  std::cout << "test a_twist" << std::endl;
22  a_twist t1(0,0,0,5,0,0,5);
23  std::cout << "t1 " << t1 << std::endl;
24  a_point a1(0,0,0);
25  std::cout << "a1 " << a1 << std::endl;
26  std::cout << "a1*t1 " << a1*t1 << std::endl;
27  a_point a2(1,2,0);
28  std::cout << "a2 " << a2 << std::endl;
29  a_point a3(2,3,1);
30  std::cout << "a3 " << a3 << std::endl;
31  std::cout << "a2*t1 " << a2*t1 << std::endl;
32  a_twist t2(4,1,0,5,0,0,5);
33  std::cout << "t2 " << t2 << std::endl;
34  std::cout << "a2*t2 " << a2*t2 << std::endl;
35  a_twist t3(0,0,0,2,0,0,2,3.14159265359/4.);
36  std::cout << "t3 " << t3 << std::endl;
37  std::cout << "a1*t3 " << a1*t3 << std::endl;
38  std::cout << "a2*t3 " << a2*t3 << std::endl;
39  std::cout << "t1+t2 " << t1+t2 << std::endl;
40  a_twist t4(0,2,0,1,0,0,1,3.14159265359/2.);
41  std::cout << "t4 " << t4 << std::endl;
42 // std::cout << "t1+t4 " << t1+t4 << std::endl;
43 // std::cout << "-t4 " << -t4 << std::endl;
44  std::cout << "a1*t4 " << a1*t4 << std::endl;
45  std::cout << "a2*t4 " << a2*t4 << std::endl;
46  std::cout << "a3*t4 " << a3*t4 << std::endl;
47 }
a twist class
Definition: a_twist.h:31
int main(int argc, char **argv)