openmbvcppinterface  3.1.0
OpenMBV C++ Interface
bevelgear.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_BEVELGEAR_H_
21#define _OPENMBV_BEVELGEAR_H_
22
23#include <openmbvcppinterface/rigidbody.h>
24#include <vector>
25
26namespace OpenMBV {
27
29 class BevelGear : public RigidBody {
30 friend class ObjectFactory;
31 protected:
32 int N{15};
33 double w{5e-2};
34 double be{0};
35 double ga{0};
36 double m{16e-3};
37 double al{0.349065850398866};
38 double b{0};
39 BevelGear() = default;
40 ~BevelGear() override = default;
41 public:
43 void setNumberOfTeeth(int N_) { N = N_; }
44
45 int getNumberOfTeeth() { return N; }
46
48 void setWidth(double w_) { w = w_; }
49
50 double getWidth() { return w; }
51
53 void setHelixAngle(double be_) { be = be_; }
54
55 double getHelixAngle() { return be; }
56
58 void setPitchAngle(double ga_) { ga = ga_; }
59
60 double getPitchAngle() { return ga; }
61
63 void setModule(double m_) { m = m_; }
64
65 double getModule() { return m; }
66
68 void setPressureAngle(double al_) { al = al_; }
69
70 double getPressureAngle() { return al; }
71
73 void setBacklash(double b_) { b = b_; }
74
75 double getBacklash() { return b; }
76
78 void initializeUsingXML(xercesc::DOMElement *element) override;
79
80 xercesc::DOMElement *writeXMLFile(xercesc::DOMNode *parent) override;
81
82 };
83
84}
85
86#endif /* _OPENMBV_BEVELGEAR_H_ */
Definition: bevelgear.h:29
void initializeUsingXML(xercesc::DOMElement *element) override
Definition: bevelgear.cc:43
void setBacklash(double b_)
Definition: bevelgear.h:73
void setHelixAngle(double be_)
Definition: bevelgear.h:53
void setPressureAngle(double al_)
Definition: bevelgear.h:68
void setWidth(double w_)
Definition: bevelgear.h:48
void setNumberOfTeeth(int N_)
Definition: bevelgear.h:43
void setModule(double m_)
Definition: bevelgear.h:63
void setPitchAngle(double ga_)
Definition: bevelgear.h:58
Definition: objectfactory.h:38
Abstract base class for all rigid bodies.
Definition: rigidbody.h:68