blob: 1dbb31584c244ee30287c6bbd15656b81e845778 [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// <auto-generated>
2// automatically generated by the FlatBuffers compiler, do not modify
3// </auto-generated>
4
5namespace MyGame.Example
6{
7
8using global::System;
9using global::FlatBuffers;
10
11public struct Vec3 : IFlatbufferObject
12{
13 private Struct __p;
14 public ByteBuffer ByteBuffer { get { return __p.bb; } }
15 public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); }
16 public Vec3 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
17
18 public float X { get { return __p.bb.GetFloat(__p.bb_pos + 0); } }
19 public void MutateX(float x) { __p.bb.PutFloat(__p.bb_pos + 0, x); }
20 public float Y { get { return __p.bb.GetFloat(__p.bb_pos + 4); } }
21 public void MutateY(float y) { __p.bb.PutFloat(__p.bb_pos + 4, y); }
22 public float Z { get { return __p.bb.GetFloat(__p.bb_pos + 8); } }
23 public void MutateZ(float z) { __p.bb.PutFloat(__p.bb_pos + 8, z); }
24 public double Test1 { get { return __p.bb.GetDouble(__p.bb_pos + 16); } }
25 public void MutateTest1(double test1) { __p.bb.PutDouble(__p.bb_pos + 16, test1); }
26 public MyGame.Example.Color Test2 { get { return (MyGame.Example.Color)__p.bb.Get(__p.bb_pos + 24); } }
27 public void MutateTest2(MyGame.Example.Color test2) { __p.bb.Put(__p.bb_pos + 24, (byte)test2); }
28 public MyGame.Example.Test Test3 { get { return (new MyGame.Example.Test()).__assign(__p.bb_pos + 26, __p.bb); } }
29
30 public static Offset<MyGame.Example.Vec3> CreateVec3(FlatBufferBuilder builder, float X, float Y, float Z, double Test1, MyGame.Example.Color Test2, short test3_A, sbyte test3_B) {
31 builder.Prep(8, 32);
32 builder.Pad(2);
33 builder.Prep(2, 4);
34 builder.Pad(1);
35 builder.PutSbyte(test3_B);
36 builder.PutShort(test3_A);
37 builder.Pad(1);
38 builder.PutByte((byte)Test2);
39 builder.PutDouble(Test1);
40 builder.Pad(4);
41 builder.PutFloat(Z);
42 builder.PutFloat(Y);
43 builder.PutFloat(X);
44 return new Offset<MyGame.Example.Vec3>(builder.Offset);
45 }
46};
47
48
49}