Points&Forces (core)
Software tools facilitating the task of surveying architecture
a_pos.h
Go to the documentation of this file.
1 /*
2 Copyright 2010-2019 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 #ifndef _VE_POS_H_
17 #define _VE_POS_H_
18 
19 #include "a_mat.h"
20 #include "a_point.h"
21 #include "a_quaternion.h"
22 
23 // .NAME a_pos
24 // .SECTION Author
25 // Pierre Smars
26 
27 #include <iostream>
28 
30 class a_pos : public a_mat
31 {
32 public:
33  inline a_pos() : a_mat(4,4) {for (int i = 0; i<4; i++) (*this)(i,i)=1; }
34  a_pos(const a_mat& m);
35  static const std::string help();
36  a_pos & translate(double x, double y, double z);
37  a_pos & translate(a_point t);
38  a_pos & rotateX(double v);
39  a_pos & rotateY(double v);
40  a_pos & rotateZ(double v);
41  a_pos & orient(a_point dir);
42  a_pos & rotate(const a_quaternion & q);
43 };
44 
45 #endif
Definition: a_mat.h:42
std::valarray< double > & x() const
Definition: a_mat.h:53
position matrix
Definition: a_pos.h:31
a_pos & rotateY(double v)
Definition: a_pos.cxx:72
static const std::string help()
Definition: a_pos.cxx:19
a_pos & orient(a_point dir)
Definition: a_pos.cxx:94
a_pos & translate(double x, double y, double z)
Definition: a_pos.cxx:47
a_pos & rotateX(double v)
Definition: a_pos.cxx:61
a_pos()
Definition: a_pos.h:33
a_pos & rotate(const a_quaternion &q)
Definition: a_pos.cxx:126
a_pos & rotateZ(double v)
Definition: a_pos.cxx:83