openmbvcppinterface  3.1.0
OpenMBV C++ Interface
cylindricalgear.h
1/*
2 OpenMBV - Open Multi Body Viewer.
3 Copyright (C) 2009 Markus Friedrich
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18*/
19
20#ifndef _OPENMBV_CYLINDRICALGEAR_H_
21#define _OPENMBV_CYLINDRICALGEAR_H_
22
23#include <openmbvcppinterface/rigidbody.h>
24#include <vector>
25
26namespace OpenMBV {
27
29 class CylindricalGear : public RigidBody {
30 friend class ObjectFactory;
31 protected:
32 int N{15};
33 double w{5e-2};
34 double be{0};
35 double m{16e-3};
36 double al{0.349065850398866};
37 double b{0};
38 bool ext{true};
39 double R{0};
40 CylindricalGear() = default;
41 ~CylindricalGear() override = default;
42 public:
44 void setNumberOfTeeth(int N_) { N = N_; }
45
46 int getNumberOfTeeth() { return N; }
47
49 void setWidth(double w_) { w = w_; }
50
51 double getWidth() { return w; }
52
54 void setHelixAngle(double be_) { be = be_; }
55
56 double getHelixAngle() { return be; }
57
59 void setModule(double m_) { m = m_; }
60
61 double getModule() { return m; }
62
64 void setPressureAngle(double al_) { al = al_; }
65
66 double getPressureAngle() { return al; }
67
69 void setBacklash(double b_) { b = b_; }
70
71 double getBacklash() { return b; }
72
74 void setExternalToothed(bool ext_) { ext = ext_; }
75
76 bool getExternalToothed() { return ext; }
77
79 void setOutsideRadius(double R_) { R = R_; }
80
81 double getOutsideRadius() { return R; }
82
84 void initializeUsingXML(xercesc::DOMElement *element) override;
85
86 xercesc::DOMElement *writeXMLFile(xercesc::DOMNode *parent) override;
87
88 };
89
90}
91
92#endif /* _OPENMBV_CYLINDRICALGEAR_H_ */
Definition: cylindricalgear.h:29
void setWidth(double w_)
Definition: cylindricalgear.h:49
void setNumberOfTeeth(int N_)
Definition: cylindricalgear.h:44
void setOutsideRadius(double R_)
Definition: cylindricalgear.h:79
void setPressureAngle(double al_)
Definition: cylindricalgear.h:64
void setModule(double m_)
Definition: cylindricalgear.h:59
void setExternalToothed(bool ext_)
Definition: cylindricalgear.h:74
void setHelixAngle(double be_)
Definition: cylindricalgear.h:54
void initializeUsingXML(xercesc::DOMElement *element) override
Definition: cylindricalgear.cc:44
void setBacklash(double b_)
Definition: cylindricalgear.h:69
Definition: objectfactory.h:38
Abstract base class for all rigid bodies.
Definition: rigidbody.h:68