Euler_generated.h
Go to the documentation of this file.
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 #ifndef FLATBUFFERS_GENERATED_EULER_GRL_FLATBUFFER_H_
4 #define FLATBUFFERS_GENERATED_EULER_GRL_FLATBUFFER_H_
5 
6 #include "flatbuffers/flatbuffers.h"
7 
8 #include "Geometry_generated.h"
9 
10 namespace grl {
11 namespace flatbuffer {
12 struct Vector3d;
13 struct Quaternion;
14 struct Pose;
15 struct Wrench;
16 struct Inertia;
17 } // namespace flatbuffer
18 } // namespace grl
19 
20 namespace grl {
21 namespace flatbuffer {
22 
23 struct EulerXYZd;
24 struct EulerRotation;
25 struct EulerPose;
26 struct EulerTranslationParams;
27 struct EulerRotationParams;
28 struct EulerPoseParams;
29 
30 enum EulerOrder {
42 };
43 
44 inline const char **EnumNamesEulerOrder() {
45  static const char *names[] = { "xyz", "yzx", "zxy", "xzy", "zyx", "yxz", "zxz", "xyx", "yzy", "xzx", "yxy", nullptr };
46  return names;
47 }
48 
49 inline const char *EnumNameEulerOrder(EulerOrder e) { return EnumNamesEulerOrder()[static_cast<int>(e)]; }
50 
52  private:
53  double rx_;
54  double ry_;
55  double rz_;
56 
57  public:
58  EulerXYZd(double rx, double ry, double rz)
59  : rx_(flatbuffers::EndianScalar(rx)), ry_(flatbuffers::EndianScalar(ry)), rz_(flatbuffers::EndianScalar(rz)) { }
60 
61  double rx() const { return flatbuffers::EndianScalar(rx_); }
62  double ry() const { return flatbuffers::EndianScalar(ry_); }
63  double rz() const { return flatbuffers::EndianScalar(rz_); }
64 };
66 
68  private:
69  double r1_;
70  double r2_;
71  double r3_;
72  int8_t eulerOrder_;
73  int8_t __padding0;
74  int16_t __padding1;
75  int32_t __padding2;
76 
77  public:
78  EulerRotation(double r1, double r2, double r3, EulerOrder eulerOrder)
79  : r1_(flatbuffers::EndianScalar(r1)), r2_(flatbuffers::EndianScalar(r2)), r3_(flatbuffers::EndianScalar(r3)), eulerOrder_(flatbuffers::EndianScalar(static_cast<int8_t>(eulerOrder))), __padding0(0), __padding1(0), __padding2(0) { (void)__padding0; (void)__padding1; (void)__padding2; }
80 
81  double r1() const { return flatbuffers::EndianScalar(r1_); }
82  double r2() const { return flatbuffers::EndianScalar(r2_); }
83  double r3() const { return flatbuffers::EndianScalar(r3_); }
84  EulerOrder eulerOrder() const { return static_cast<EulerOrder>(flatbuffers::EndianScalar(eulerOrder_)); }
85 };
87 
89  private:
90  grl::flatbuffer::Vector3d position_;
91  EulerRotation rotation_;
92 
93  public:
94  EulerPose(const grl::flatbuffer::Vector3d &position, const EulerRotation &rotation)
95  : position_(position), rotation_(rotation) { }
96 
97  const grl::flatbuffer::Vector3d &position() const { return position_; }
98  const EulerRotation &rotation() const { return rotation_; }
99 };
100 STRUCT_END(EulerPose, 56);
101 
102 struct EulerTranslationParams FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
103  double x() const { return GetField<double>(4, 0); }
104  double y() const { return GetField<double>(6, 0); }
105  double z() const { return GetField<double>(8, 0); }
106  bool Verify(flatbuffers::Verifier &verifier) const {
107  return VerifyTableStart(verifier) &&
108  VerifyField<double>(verifier, 4 /* x */) &&
109  VerifyField<double>(verifier, 6 /* y */) &&
110  VerifyField<double>(verifier, 8 /* z */) &&
111  verifier.EndTable();
112  }
113 };
114 
116  flatbuffers::FlatBufferBuilder &fbb_;
117  flatbuffers::uoffset_t start_;
118  void add_x(double x) { fbb_.AddElement<double>(4, x, 0); }
119  void add_y(double y) { fbb_.AddElement<double>(6, y, 0); }
120  void add_z(double z) { fbb_.AddElement<double>(8, z, 0); }
121  EulerTranslationParamsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
123  flatbuffers::Offset<EulerTranslationParams> Finish() {
124  auto o = flatbuffers::Offset<EulerTranslationParams>(fbb_.EndTable(start_, 3));
125  return o;
126  }
127 };
128 
129 inline flatbuffers::Offset<EulerTranslationParams> CreateEulerTranslationParams(flatbuffers::FlatBufferBuilder &_fbb,
130  double x = 0,
131  double y = 0,
132  double z = 0) {
133  EulerTranslationParamsBuilder builder_(_fbb);
134  builder_.add_z(z);
135  builder_.add_y(y);
136  builder_.add_x(x);
137  return builder_.Finish();
138 }
139 
140 struct EulerRotationParams FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
141  double r1() const { return GetField<double>(4, 0); }
142  double r2() const { return GetField<double>(6, 0); }
143  double r3() const { return GetField<double>(8, 0); }
144  EulerOrder eulerOrder() const { return static_cast<EulerOrder>(GetField<int8_t>(10, 0)); }
145  bool Verify(flatbuffers::Verifier &verifier) const {
146  return VerifyTableStart(verifier) &&
147  VerifyField<double>(verifier, 4 /* r1 */) &&
148  VerifyField<double>(verifier, 6 /* r2 */) &&
149  VerifyField<double>(verifier, 8 /* r3 */) &&
150  VerifyField<int8_t>(verifier, 10 /* eulerOrder */) &&
151  verifier.EndTable();
152  }
153 };
154 
156  flatbuffers::FlatBufferBuilder &fbb_;
157  flatbuffers::uoffset_t start_;
158  void add_r1(double r1) { fbb_.AddElement<double>(4, r1, 0); }
159  void add_r2(double r2) { fbb_.AddElement<double>(6, r2, 0); }
160  void add_r3(double r3) { fbb_.AddElement<double>(8, r3, 0); }
161  void add_eulerOrder(EulerOrder eulerOrder) { fbb_.AddElement<int8_t>(10, static_cast<int8_t>(eulerOrder), 0); }
162  EulerRotationParamsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
164  flatbuffers::Offset<EulerRotationParams> Finish() {
165  auto o = flatbuffers::Offset<EulerRotationParams>(fbb_.EndTable(start_, 4));
166  return o;
167  }
168 };
169 
170 inline flatbuffers::Offset<EulerRotationParams> CreateEulerRotationParams(flatbuffers::FlatBufferBuilder &_fbb,
171  double r1 = 0,
172  double r2 = 0,
173  double r3 = 0,
174  EulerOrder eulerOrder = EulerOrder_xyz) {
175  EulerRotationParamsBuilder builder_(_fbb);
176  builder_.add_r3(r3);
177  builder_.add_r2(r2);
178  builder_.add_r1(r1);
179  builder_.add_eulerOrder(eulerOrder);
180  return builder_.Finish();
181 }
182 
183 struct EulerPoseParams FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
184  const grl::flatbuffer::Vector3d *position() const { return GetStruct<const grl::flatbuffer::Vector3d *>(4); }
185  const EulerRotation *rotation() const { return GetStruct<const EulerRotation *>(6); }
186  bool Verify(flatbuffers::Verifier &verifier) const {
187  return VerifyTableStart(verifier) &&
188  VerifyField<grl::flatbuffer::Vector3d>(verifier, 4 /* position */) &&
189  VerifyField<EulerRotation>(verifier, 6 /* rotation */) &&
190  verifier.EndTable();
191  }
192 };
193 
195  flatbuffers::FlatBufferBuilder &fbb_;
196  flatbuffers::uoffset_t start_;
197  void add_position(const grl::flatbuffer::Vector3d *position) { fbb_.AddStruct(4, position); }
198  void add_rotation(const EulerRotation *rotation) { fbb_.AddStruct(6, rotation); }
199  EulerPoseParamsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
201  flatbuffers::Offset<EulerPoseParams> Finish() {
202  auto o = flatbuffers::Offset<EulerPoseParams>(fbb_.EndTable(start_, 2));
203  return o;
204  }
205 };
206 
207 inline flatbuffers::Offset<EulerPoseParams> CreateEulerPoseParams(flatbuffers::FlatBufferBuilder &_fbb,
208  const grl::flatbuffer::Vector3d *position = 0,
209  const EulerRotation *rotation = 0) {
210  EulerPoseParamsBuilder builder_(_fbb);
211  builder_.add_rotation(rotation);
212  builder_.add_position(position);
213  return builder_.Finish();
214 }
215 
216 } // namespace flatbuffer
217 } // namespace grl
218 
219 #endif // FLATBUFFERS_GENERATED_EULER_GRL_FLATBUFFER_H_
void add_eulerOrder(EulerOrder eulerOrder)
MANUALLY_ALIGNED_STRUCT(8) EulerXYZd FLATBUFFERS_FINAL_CLASS
flatbuffers::Offset< EulerPoseParams > CreateEulerPoseParams(flatbuffers::FlatBufferBuilder &_fbb, const grl::flatbuffer::Vector3d *position=0, const EulerRotation *rotation=0)
flatbuffers::Offset< EulerPoseParams > Finish()
flatbuffers::FlatBufferBuilder & fbb_
flatbuffers::Offset< EulerTranslationParams > Finish()
flatbuffers::FlatBufferBuilder & fbb_
EulerRotationParamsBuilder(flatbuffers::FlatBufferBuilder &_fbb)
const char ** EnumNamesEulerOrder()
bool Verify(flatbuffers::Verifier &verifier) const
flatbuffers::Offset< EulerTranslationParams > CreateEulerTranslationParams(flatbuffers::FlatBufferBuilder &_fbb, double x=0, double y=0, double z=0)
void add_rotation(const EulerRotation *rotation)
flatbuffers::Offset< EulerRotationParams > CreateEulerRotationParams(flatbuffers::FlatBufferBuilder &_fbb, double r1=0, double r2=0, double r3=0, EulerOrder eulerOrder=EulerOrder_xyz)
STRUCT_END(EulerXYZd, 24)
const EulerRotation * rotation() const
flatbuffers::FlatBufferBuilder & fbb_
const grl::flatbuffer::Vector3d * position() const
EulerPoseParamsBuilder(flatbuffers::FlatBufferBuilder &_fbb)
const char * EnumNameEulerOrder(EulerOrder e)
flatbuffers::Offset< EulerRotationParams > Finish()
void add_position(const grl::flatbuffer::Vector3d *position)
EulerTranslationParamsBuilder(flatbuffers::FlatBufferBuilder &_fbb)