blob: 89d38a1211b8c381378e072775e02293279d4945 [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 }
Austin Schuh272c6132020-11-14 16:37:52 -080044
45 public static final class Vector extends BaseVector {
46 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
47
48 public Vec3 get(int j) { return get(new Vec3(), j); }
49 public Vec3 get(Vec3 obj, int j) { return obj.__assign(__element(j), bb); }
50 }
Austin Schuhe89fa2d2019-08-14 20:24:23 -070051}
52