RayZaler 0.1
The free opto-mechanical simulation framework
Tripod.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 _TRIPOD_H
20#define _TRIPOD_H
21
22#include <Element.h>
23#include <GL/glu.h>
24#include <GLHelpers.h>
25#include <TripodFrame.h>
26
27namespace RZ {
28 class TranslatedFrame;
29 class RotatedFrame;
30
31 class Tripod : public Element {
32 GLCappedCylinder m_glLegs[3];
33 TripodFrame *m_surface;
34
35 Real m_legDiameter = 6e-3;
36 Real m_leg1 = 2e-2;
37 Real m_leg2 = 2e-2;
38 Real m_leg3 = 2e-2;
39 Real m_ta_angle = 70.; // Deg
40 Real m_ta_radius = 42e-3;
41
42 // Calculated
43 Vec3 m_p[3];
44
45 void recalcLegs();
46 void initTripod();
47
48 protected:
49 virtual bool propertyChanged(std::string const &, PropertyValue const &) override;
50
51 public:
52 Tripod(
54 std::string const &,
56 Element *parent = nullptr);
57
58 virtual ~Tripod() override;
59 virtual void renderOpenGL() override;
60 };
61
62 RZ_DECLARE_ELEMENT(Tripod);
63}
64
65#endif // _TRIPOD_H
Definition: Element.h:393
Definition: Element.h:173
Definition: GLHelpers.h:180
Definition: Element.h:58
Definition: ReferenceFrame.h:59
Definition: TripodFrame.h:25
Definition: Tripod.h:31
Definition: Vector.h:66