blob: 0b67c746a8afc3fd1e8d71c2e93461bc3689cfd4 [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// automatically generated by the FlatBuffers compiler, do not modify
2
3package MyGame.Example;
4
5import java.nio.*;
6import java.lang.*;
7import java.util.*;
8import com.google.flatbuffers.*;
9
10@SuppressWarnings("unused")
11public final class Vec3 extends Struct {
12 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
13 public Vec3 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
14
15 public float x() { return bb.getFloat(bb_pos + 0); }
16 public void mutateX(float x) { bb.putFloat(bb_pos + 0, x); }
17 public float y() { return bb.getFloat(bb_pos + 4); }
18 public void mutateY(float y) { bb.putFloat(bb_pos + 4, y); }
19 public float z() { return bb.getFloat(bb_pos + 8); }
20 public void mutateZ(float z) { bb.putFloat(bb_pos + 8, z); }
21 public double test1() { return bb.getDouble(bb_pos + 16); }
22 public void mutateTest1(double test1) { bb.putDouble(bb_pos + 16, test1); }
23 public int test2() { return bb.get(bb_pos + 24) & 0xFF; }
24 public void mutateTest2(int test2) { bb.put(bb_pos + 24, (byte)test2); }
25 public MyGame.Example.Test test3() { return test3(new MyGame.Example.Test()); }
26 public MyGame.Example.Test test3(MyGame.Example.Test obj) { return obj.__assign(bb_pos + 26, bb); }
27
28 public static int createVec3(FlatBufferBuilder builder, float x, float y, float z, double test1, int test2, short test3_a, byte test3_b) {
29 builder.prep(8, 32);
30 builder.pad(2);
31 builder.prep(2, 4);
32 builder.pad(1);
33 builder.putByte(test3_b);
34 builder.putShort(test3_a);
35 builder.pad(1);
36 builder.putByte((byte)test2);
37 builder.putDouble(test1);
38 builder.pad(4);
39 builder.putFloat(z);
40 builder.putFloat(y);
41 builder.putFloat(x);
42 return builder.offset();
43 }
44}
45