Neodroid  0.2.0
Machine Learning Environment Prototyping Tool
NeodroidFBSShared.cs
Go to the documentation of this file.
1 // <auto-generated>
2 // automatically generated by the FlatBuffers compiler, do not modify
3 // </auto-generated>
4 
5 using FlatBuffers;
6 
7 namespace droid.Runtime.Messaging.FBS
8 {
9  public enum FSimulationType : byte
10 {
11  Independent = 0,
12  FrameDependent = 1,
13  PhysicsDependent = 2,
14  EventDependent = 3,
15 };
16 
17 public struct FUnobservables : IFlatbufferObject
18 {
19  private Table __p;
20  public ByteBuffer ByteBuffer { get { return this.__p.bb; } }
21  public static FUnobservables GetRootAsFUnobservables(ByteBuffer _bb) { return GetRootAsFUnobservables(_bb, new FUnobservables()); }
22  public static FUnobservables GetRootAsFUnobservables(ByteBuffer _bb, FUnobservables obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
23  public void __init(int _i, ByteBuffer _bb) { this.__p.bb_pos = _i; this.__p.bb = _bb; }
24  public FUnobservables __assign(int _i, ByteBuffer _bb) { this.__init(_i, _bb); return this; }
25 
26  public FQuaternionTransform? Poses(int j) { int o = this.__p.__offset(4); return o != 0 ? (FQuaternionTransform?)(new FQuaternionTransform()).__assign(this.__p.__vector(o) + j * 56, this.__p.bb) : null; }
27  public int PosesLength { get { int o = this.__p.__offset(4); return o != 0 ? this.__p.__vector_len(o) : 0; } }
28  public FBody? Bodies(int j) { int o = this.__p.__offset(6); return o != 0 ? (FBody?)(new FBody()).__assign(this.__p.__vector(o) + j * 48, this.__p.bb) : null; }
29  public int BodiesLength { get { int o = this.__p.__offset(6); return o != 0 ? this.__p.__vector_len(o) : 0; } }
30 
31  public static Offset<FUnobservables> CreateFUnobservables(FlatBufferBuilder builder,
32  VectorOffset posesOffset = default(VectorOffset),
33  VectorOffset bodiesOffset = default(VectorOffset)) {
34  builder.StartObject(2);
35  AddBodies(builder, bodiesOffset);
36  AddPoses(builder, posesOffset);
37  return EndFUnobservables(builder);
38  }
39 
40  public static void StartFUnobservables(FlatBufferBuilder builder) { builder.StartObject(2); }
41  public static void AddPoses(FlatBufferBuilder builder, VectorOffset posesOffset) { builder.AddOffset(0, posesOffset.Value, 0); }
42  public static void StartPosesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(56, numElems, 8); }
43  public static void AddBodies(FlatBufferBuilder builder, VectorOffset bodiesOffset) { builder.AddOffset(1, bodiesOffset.Value, 0); }
44  public static void StartBodiesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(48, numElems, 8); }
45  public static Offset<FUnobservables> EndFUnobservables(FlatBufferBuilder builder) {
46  int o = builder.EndObject();
47  return new Offset<FUnobservables>(o);
48  }
49 };
50 
51 public struct FVector2 : IFlatbufferObject
52 {
53  private Struct __p;
54  public ByteBuffer ByteBuffer { get { return this.__p.bb; } }
55  public void __init(int _i, ByteBuffer _bb) { this.__p.bb_pos = _i; this.__p.bb = _bb; }
56  public FVector2 __assign(int _i, ByteBuffer _bb) { this.__init(_i, _bb); return this; }
57 
58  public double X { get { return this.__p.bb.GetDouble(this.__p.bb_pos + 0); } }
59  public double Y { get { return this.__p.bb.GetDouble(this.__p.bb_pos + 8); } }
60 
61  public static Offset<FVector2> CreateFVector2(FlatBufferBuilder builder, double X, double Y) {
62  builder.Prep(8, 16);
63  builder.PutDouble(Y);
64  builder.PutDouble(X);
65  return new Offset<FVector2>(builder.Offset);
66  }
67 };
68 
69 public struct FVector3 : IFlatbufferObject
70 {
71  private Struct __p;
72  public ByteBuffer ByteBuffer { get { return this.__p.bb; } }
73  public void __init(int _i, ByteBuffer _bb) { this.__p.bb_pos = _i; this.__p.bb = _bb; }
74  public FVector3 __assign(int _i, ByteBuffer _bb) { this.__init(_i, _bb); return this; }
75 
76  public double X { get { return this.__p.bb.GetDouble(this.__p.bb_pos + 0); } }
77  public double Y { get { return this.__p.bb.GetDouble(this.__p.bb_pos + 8); } }
78  public double Z { get { return this.__p.bb.GetDouble(this.__p.bb_pos + 16); } }
79 
80  public static Offset<FVector3> CreateFVector3(FlatBufferBuilder builder, double X, double Y, double Z) {
81  builder.Prep(8, 24);
82  builder.PutDouble(Z);
83  builder.PutDouble(Y);
84  builder.PutDouble(X);
85  return new Offset<FVector3>(builder.Offset);
86  }
87 };
88 
89 public struct FQuaternion : IFlatbufferObject
90 {
91  private Struct __p;
92  public ByteBuffer ByteBuffer { get { return this.__p.bb; } }
93  public void __init(int _i, ByteBuffer _bb) { this.__p.bb_pos = _i; this.__p.bb = _bb; }
94  public FQuaternion __assign(int _i, ByteBuffer _bb) { this.__init(_i, _bb); return this; }
95 
96  public double X { get { return this.__p.bb.GetDouble(this.__p.bb_pos + 0); } }
97  public double Y { get { return this.__p.bb.GetDouble(this.__p.bb_pos + 8); } }
98  public double Z { get { return this.__p.bb.GetDouble(this.__p.bb_pos + 16); } }
99  public double W { get { return this.__p.bb.GetDouble(this.__p.bb_pos + 24); } }
100 
101  public static Offset<FQuaternion> CreateFQuaternion(FlatBufferBuilder builder, double X, double Y, double Z, double W) {
102  builder.Prep(8, 32);
103  builder.PutDouble(W);
104  builder.PutDouble(Z);
105  builder.PutDouble(Y);
106  builder.PutDouble(X);
107  return new Offset<FQuaternion>(builder.Offset);
108  }
109 };
110 
111 public struct FQuaternionTransform : IFlatbufferObject
112 {
113  private Struct __p;
114  public ByteBuffer ByteBuffer { get { return this.__p.bb; } }
115  public void __init(int _i, ByteBuffer _bb) { this.__p.bb_pos = _i; this.__p.bb = _bb; }
116  public FQuaternionTransform __assign(int _i, ByteBuffer _bb) { this.__init(_i, _bb); return this; }
117 
118  public FVector3 Position { get { return (new FVector3()).__assign(this.__p.bb_pos + 0, this.__p.bb); } }
119  public FQuaternion Rotation { get { return (new FQuaternion()).__assign(this.__p.bb_pos + 24, this.__p.bb); } }
120 
121  public static Offset<FQuaternionTransform> CreateFQuaternionTransform(FlatBufferBuilder builder, double position_X, double position_Y, double position_Z, double rotation_X, double rotation_Y, double rotation_Z, double rotation_W) {
122  builder.Prep(8, 56);
123  builder.Prep(8, 32);
124  builder.PutDouble(rotation_W);
125  builder.PutDouble(rotation_Z);
126  builder.PutDouble(rotation_Y);
127  builder.PutDouble(rotation_X);
128  builder.Prep(8, 24);
129  builder.PutDouble(position_Z);
130  builder.PutDouble(position_Y);
131  builder.PutDouble(position_X);
132  return new Offset<FQuaternionTransform>(builder.Offset);
133  }
134 };
135 
136 public struct FEulerTransform : IFlatbufferObject
137 {
138  private Struct __p;
139  public ByteBuffer ByteBuffer { get { return this.__p.bb; } }
140  public void __init(int _i, ByteBuffer _bb) { this.__p.bb_pos = _i; this.__p.bb = _bb; }
141  public FEulerTransform __assign(int _i, ByteBuffer _bb) { this.__init(_i, _bb); return this; }
142 
143  public FVector3 Position { get { return (new FVector3()).__assign(this.__p.bb_pos + 0, this.__p.bb); } }
144  public FVector3 Rotation { get { return (new FVector3()).__assign(this.__p.bb_pos + 24, this.__p.bb); } }
145  public FVector3 Direction { get { return (new FVector3()).__assign(this.__p.bb_pos + 48, this.__p.bb); } }
146 
147  public static Offset<FEulerTransform> CreateFEulerTransform(FlatBufferBuilder builder, double position_X, double position_Y, double position_Z, double rotation_X, double rotation_Y, double rotation_Z, double direction_X, double direction_Y, double direction_Z) {
148  builder.Prep(8, 72);
149  builder.Prep(8, 24);
150  builder.PutDouble(direction_Z);
151  builder.PutDouble(direction_Y);
152  builder.PutDouble(direction_X);
153  builder.Prep(8, 24);
154  builder.PutDouble(rotation_Z);
155  builder.PutDouble(rotation_Y);
156  builder.PutDouble(rotation_X);
157  builder.Prep(8, 24);
158  builder.PutDouble(position_Z);
159  builder.PutDouble(position_Y);
160  builder.PutDouble(position_X);
161  return new Offset<FEulerTransform>(builder.Offset);
162  }
163 };
164 
165 public struct FBody : IFlatbufferObject
166 {
167  private Struct __p;
168  public ByteBuffer ByteBuffer { get { return this.__p.bb; } }
169  public void __init(int _i, ByteBuffer _bb) { this.__p.bb_pos = _i; this.__p.bb = _bb; }
170  public FBody __assign(int _i, ByteBuffer _bb) { this.__init(_i, _bb); return this; }
171 
172  public FVector3 Velocity { get { return (new FVector3()).__assign(this.__p.bb_pos + 0, this.__p.bb); } }
173  public FVector3 AngularVelocity { get { return (new FVector3()).__assign(this.__p.bb_pos + 24, this.__p.bb); } }
174 
175  public static Offset<FBody> CreateFBody(FlatBufferBuilder builder, double velocity_X, double velocity_Y, double velocity_Z, double angular_velocity_X, double angular_velocity_Y, double angular_velocity_Z) {
176  builder.Prep(8, 48);
177  builder.Prep(8, 24);
178  builder.PutDouble(angular_velocity_Z);
179  builder.PutDouble(angular_velocity_Y);
180  builder.PutDouble(angular_velocity_X);
181  builder.Prep(8, 24);
182  builder.PutDouble(velocity_Z);
183  builder.PutDouble(velocity_Y);
184  builder.PutDouble(velocity_X);
185  return new Offset<FBody>(builder.Offset);
186  }
187 };
188 
189 public struct FRange : IFlatbufferObject
190 {
191  private Struct __p;
192  public ByteBuffer ByteBuffer { get { return this.__p.bb; } }
193  public void __init(int _i, ByteBuffer _bb) { this.__p.bb_pos = _i; this.__p.bb = _bb; }
194  public FRange __assign(int _i, ByteBuffer _bb) { this.__init(_i, _bb); return this; }
195 
196  public int DecimalGranularity { get { return this.__p.bb.GetInt(this.__p.bb_pos + 0); } }
197  public float MaxValue { get { return this.__p.bb.GetFloat(this.__p.bb_pos + 4); } }
198  public float MinValue { get { return this.__p.bb.GetFloat(this.__p.bb_pos + 8); } }
199 
200  public static Offset<FRange> CreateFRange(FlatBufferBuilder builder, int DecimalGranularity, float MaxValue, float MinValue) {
201  builder.Prep(4, 12);
202  builder.PutFloat(MinValue);
203  builder.PutFloat(MaxValue);
204  builder.PutInt(DecimalGranularity);
205  return new Offset<FRange>(builder.Offset);
206  }
207 };
208 
209 public struct FSimulatorConfiguration : IFlatbufferObject
210 {
211  private Struct __p;
212  public ByteBuffer ByteBuffer { get { return this.__p.bb; } }
213  public void __init(int _i, ByteBuffer _bb) { this.__p.bb_pos = _i; this.__p.bb = _bb; }
214  public FSimulatorConfiguration __assign(int _i, ByteBuffer _bb) { this.__init(_i, _bb); return this; }
215 
216  public int Width { get { return this.__p.bb.GetInt(this.__p.bb_pos + 0); } }
217  public int Height { get { return this.__p.bb.GetInt(this.__p.bb_pos + 4); } }
218  public bool FullScreen { get { return 0!=this.__p.bb.Get(this.__p.bb_pos + 8); } }
219  public int QualityLevel { get { return this.__p.bb.GetInt(this.__p.bb_pos + 12); } }
220  public float TimeScale { get { return this.__p.bb.GetFloat(this.__p.bb_pos + 16); } }
221  public float TargetFrameRate { get { return this.__p.bb.GetFloat(this.__p.bb_pos + 20); } }
222  public FSimulationType SimulationType { get { return (FSimulationType)this.__p.bb.Get(this.__p.bb_pos + 24); } }
223  public int FrameSkips { get { return this.__p.bb.GetInt(this.__p.bb_pos + 28); } }
224  public int ResetIterations { get { return this.__p.bb.GetInt(this.__p.bb_pos + 32); } }
225  public int NumOfEnvironments { get { return this.__p.bb.GetInt(this.__p.bb_pos + 36); } }
226  public bool DoSerialiseIndividualSensors { get { return 0!=this.__p.bb.Get(this.__p.bb_pos + 40); } }
227  public bool DoSerialiseUnobservables { get { return 0!=this.__p.bb.Get(this.__p.bb_pos + 41); } }
228 
229  public static Offset<FSimulatorConfiguration> CreateFSimulatorConfiguration(FlatBufferBuilder builder, int Width, int Height, bool FullScreen, int QualityLevel, float TimeScale, float TargetFrameRate, FSimulationType SimulationType, int FrameSkips, int ResetIterations, int NumOfEnvironments, bool DoSerialiseIndividualSensors, bool DoSerialiseUnobservables) {
230  builder.Prep(4, 44);
231  builder.Pad(2);
232  builder.PutBool(DoSerialiseUnobservables);
233  builder.PutBool(DoSerialiseIndividualSensors);
234  builder.PutInt(NumOfEnvironments);
235  builder.PutInt(ResetIterations);
236  builder.PutInt(FrameSkips);
237  builder.Pad(3);
238  builder.PutByte((byte)SimulationType);
239  builder.PutFloat(TargetFrameRate);
240  builder.PutFloat(TimeScale);
241  builder.PutInt(QualityLevel);
242  builder.Pad(3);
243  builder.PutBool(FullScreen);
244  builder.PutInt(Height);
245  builder.PutInt(Width);
246  return new Offset<FSimulatorConfiguration>(builder.Offset);
247  }
248 };
249 
250 
251 }
FQuaternion __assign(int _i, ByteBuffer _bb)
static Offset< FEulerTransform > CreateFEulerTransform(FlatBufferBuilder builder, double position_X, double position_Y, double position_Z, double rotation_X, double rotation_Y, double rotation_Z, double direction_X, double direction_Y, double direction_Z)
static void StartFUnobservables(FlatBufferBuilder builder)
static void AddBodies(FlatBufferBuilder builder, VectorOffset bodiesOffset)
static Offset< FBody > CreateFBody(FlatBufferBuilder builder, double velocity_X, double velocity_Y, double velocity_Z, double angular_velocity_X, double angular_velocity_Y, double angular_velocity_Z)
FEulerTransform __assign(int _i, ByteBuffer _bb)
static void StartPosesVector(FlatBufferBuilder builder, int numElems)
static Offset< FRange > CreateFRange(FlatBufferBuilder builder, int DecimalGranularity, float MaxValue, float MinValue)
FVector2 __assign(int _i, ByteBuffer _bb)
static Offset< FUnobservables > EndFUnobservables(FlatBufferBuilder builder)
static Offset< FQuaternionTransform > CreateFQuaternionTransform(FlatBufferBuilder builder, double position_X, double position_Y, double position_Z, double rotation_X, double rotation_Y, double rotation_Z, double rotation_W)
static Offset< FQuaternion > CreateFQuaternion(FlatBufferBuilder builder, double X, double Y, double Z, double W)
FRange __assign(int _i, ByteBuffer _bb)
static Offset< FVector3 > CreateFVector3(FlatBufferBuilder builder, double X, double Y, double Z)
static Offset< FVector2 > CreateFVector2(FlatBufferBuilder builder, double X, double Y)
void __init(int _i, ByteBuffer _bb)
static Offset< FUnobservables > CreateFUnobservables(FlatBufferBuilder builder, VectorOffset posesOffset=default(VectorOffset), VectorOffset bodiesOffset=default(VectorOffset))
static FUnobservables GetRootAsFUnobservables(ByteBuffer _bb, FUnobservables obj)
FVector3 __assign(int _i, ByteBuffer _bb)
void __init(int _i, ByteBuffer _bb)
void __init(int _i, ByteBuffer _bb)
static FUnobservables GetRootAsFUnobservables(ByteBuffer _bb)
static Offset< FSimulatorConfiguration > CreateFSimulatorConfiguration(FlatBufferBuilder builder, int Width, int Height, bool FullScreen, int QualityLevel, float TimeScale, float TargetFrameRate, FSimulationType SimulationType, int FrameSkips, int ResetIterations, int NumOfEnvironments, bool DoSerialiseIndividualSensors, bool DoSerialiseUnobservables)
FUnobservables __assign(int _i, ByteBuffer _bb)
FBody __assign(int _i, ByteBuffer _bb)
SimulationType
Determines the discrete timesteps of the simulation environment.
static void StartBodiesVector(FlatBufferBuilder builder, int numElems)
FSimulatorConfiguration __assign(int _i, ByteBuffer _bb)
void __init(int _i, ByteBuffer _bb)
static void AddPoses(FlatBufferBuilder builder, VectorOffset posesOffset)
void __init(int _i, ByteBuffer _bb)
FQuaternionTransform __assign(int _i, ByteBuffer _bb)