ActiveLib
Loading...
Searching...
No Matches
Leveller.h
1
6#ifndef ACTIVE_GEOMETRY_LEVELLER
7#define ACTIVE_GEOMETRY_LEVELLER
8
9#include "Active/Geometry/Vector3.h"
10
11namespace active::geometry {
12
13 class Arc;
14 class Point;
15 class Polygon;
16 class Line;
17 class Rotater;
18
20 class Leveller {
21 public:
22
23 // MARK: - Constructors
24
28 Leveller();
35 Leveller(const Vector3& norm, double zAngle = 0.0, double prec = math::eps);
40 Leveller(const Leveller& source);
44 ~Leveller();
45
46 // MARK: - Operators
47
53 Leveller& operator= (const Leveller& source);
54
55 // MARK: - Functions (const)
56
61 const Vector3& getNormal() const { return m_normal; }
66 void transform(Point& target) const;
71 void transform(Line& target) const;
76 void transform(Arc& target) const;
81 void transform(Polygon& target) const;
82
83 // MARK: - Functions (mutating)
84
91 void setRotation(const Vector3& norm, double zAngle = 0, double prec = math::eps);
96 void setZRotation(double angle);
101 Leveller& reverse();
102
103 private:
104 Vector3 m_normal;
105 std::unique_ptr<Rotater> m_rz;
106 std::unique_ptr<Rotater> m_ry;
107 std::unique_ptr<Rotater> m_rx;
108 };
109
110}
111
112#endif //ACTIVE_GEOMETRY_LEVELLER
Class to represent an arc.
Definition Arc.h:25
Class to reorientate geometric objects to a horizontal plane.
Definition Leveller.h:20
Leveller & operator=(const Leveller &source)
Definition Leveller.cpp:65
~Leveller()
Definition Leveller.cpp:55
const Vector3 & getNormal() const
Definition Leveller.h:61
Leveller()
Definition Leveller.cpp:23
void transform(Point &target) const
Definition Leveller.cpp:121
Leveller & reverse()
Definition Leveller.cpp:107
void setRotation(const Vector3 &norm, double zAngle=0, double prec=math::eps)
Definition Leveller.cpp:82
void setZRotation(double angle)
Definition Leveller.cpp:97
Class to represent a line.
Definition Line.h:21
Definition Point.h:36
Definition Polygon.h:57
A 1x3 vector class.
Definition Vector3.h:20
Definition Anchor2D.h:11
constexpr double eps
Default length precision (0.01mm)
Definition MathFunctions.h:22