RayZaler 0.1
The free opto-mechanical simulation framework
RotatedFrame.h
1//
2// Copyright (c) 2024 Gonzalo José Carracedo Carballal
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU Lesser General Public License as
6// published by the Free Software Foundation, either version 3 of the
7// License, or (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful, but
10// WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU Lesser General Public License for more details.
13//
14// You should have received a copy of the GNU Lesser General Public
15// License along with this program. If not, see
16// <http://www.gnu.org/licenses/>
17//
18
19#ifndef ROTATEDFRAME_H
20#define ROTATEDFRAME_H
21
22#include <ReferenceFrame.h>
23
24namespace RZ {
26 Vec3 m_currAxis;
27 Real m_currAngle;
28 int m_axisIndex;
29
30 Matrix3 m_rotMatrix;
31
32 protected:
33 void recalculateFrame();
34
35 public:
36 void setRotation(Vec3 const &axis, Real angle);
37 void setAxisX(Real);
38 void setAxisY(Real);
39 void setAxisZ(Real);
40 void setAngle(Real);
41
43 std::string const &name,
44 ReferenceFrame *parent,
45 Vec3 const &axis,
46 Real angle);
47
48 virtual ~RotatedFrame() override = default;
49 };
50}
51
52#endif // ROTATEDFRAME_H
Definition: ReferenceFrame.h:59
Definition: RotatedFrame.h:25
Definition: Matrix.h:48
Definition: Vector.h:66