OpenLexocad  27.1
Axis.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (c) 2011 Jürgen Riegel <juergen.riegel@web.de> *
3  * *
4  * This file is part of the FreeCAD CAx development system. *
5  * *
6  * This library is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU Library General Public *
8  * License as published by the Free Software Foundation; either *
9  * version 2 of the License, or (at your option) any later version. *
10  * *
11  * This library is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU Library General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Library General Public *
17  * License along with this library; see the file COPYING.LIB. If not, *
18  * write to the Free Software Foundation, Inc., 59 Temple Place, *
19  * Suite 330, Boston, MA 02111-1307, USA *
20  * *
21  ***************************************************************************/
22 
23 
24 #ifndef BASE_AXIS_H
25 #define BASE_AXIS_H
26 
27 #include "Vector3D.h"
28 #include "Placement.h"
29 
30 namespace Base {
31 
35 class LX_BASE_EXPORT Axis
36 {
37 public:
39  Axis(void);
40  Axis(const Axis&);
41  Axis(const Vector3d& Orig, const Vector3d& Dir);
43  ~Axis () {}
44 
45  const Vector3d& getBase(void) const {return _base;}
46  const Vector3d& getDirection(void) const {return _dir;}
47  void setBase(const Vector3d& Orig) {_base=Orig;}
48  void setDirection(const Vector3d& Dir) {_dir=Dir;}
49 
50  void reverse();
51  Axis reversed() const;
52  void move(const Vector3d& MovVec);
53 
56  Axis& operator *=(const Placement &p);
57  Axis operator *(const Placement &p) const;
58  bool operator ==(const Axis&) const;
59  bool operator !=(const Axis&) const;
60  Axis& operator =(const Axis&);
62 
63 protected:
66 };
67 
68 } // namespace Base
69 
70 #endif // BASE_AXIS_H
const Vector3d & getBase(void) const
Definition: Axis.h:45
Vector3f & operator *=(Vector3f &rclVect, const Matrix4D &rclMtrx)
Definition: Matrix.h:351
Definition: Axis.h:35
Vector3d _base
Definition: Axis.h:64
Vector3d _dir
Definition: Axis.h:65
void setDirection(const Vector3d &Dir)
Definition: Axis.h:48
const Vector3d & getDirection(void) const
Definition: Axis.h:46
Definition: AbstractXMLReader.h:5
~Axis()
Destruction.
Definition: Axis.h:43
Definition: Placement.h:38
void setBase(const Vector3d &Orig)
Definition: Axis.h:47
DualNumber operator *(DualNumber a, DualNumber b)
Definition: DualNumber.h:71