• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // <auto-generated>
2 //  automatically generated by the FlatBuffers compiler, do not modify
3 // </auto-generated>
4 
5 namespace MyGame.Example
6 {
7 
8 using global::System;
9 using global::FlatBuffers;
10 
11 public struct Vec3 : IFlatbufferObject
12 {
13   private Struct __p;
14   public ByteBuffer ByteBuffer { get { return __p.bb; } }
__initMyGame.Example.Vec315   public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; }
__assignMyGame.Example.Vec316   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); } }
MutateXMyGame.Example.Vec319   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); } }
MutateYMyGame.Example.Vec321   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); } }
MutateZMyGame.Example.Vec323   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); } }
MutateTest1MyGame.Example.Vec325   public void MutateTest1(double test1) { __p.bb.PutDouble(__p.bb_pos + 16, test1); }
26   public Color Test2 { get { return (Color)__p.bb.GetSbyte(__p.bb_pos + 24); } }
MutateTest2MyGame.Example.Vec327   public void MutateTest2(Color test2) { __p.bb.PutSbyte(__p.bb_pos + 24, (sbyte)test2); }
28   public Test Test3 { get { return (new Test()).__assign(__p.bb_pos + 26, __p.bb); } }
29 
CreateVec3MyGame.Example.Vec330   public static Offset<Vec3> CreateVec3(FlatBufferBuilder builder, float X, float Y, float Z, double Test1, 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.PutSbyte((sbyte)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<Vec3>(builder.Offset);
45   }
46 };
47 
48 
49 }
50