Home | History | Annotate | Download | only in Example
      1 // automatically generated by the FlatBuffers compiler, do not modify
      2 
      3 package MyGame.Example;
      4 
      5 import java.nio.*;
      6 import java.lang.*;
      7 import java.util.*;
      8 import com.google.flatbuffers.*;
      9 
     10 @SuppressWarnings("unused")
     11 public final class Vec3 extends Struct {
     12   public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _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 byte test2() { return bb.get(bb_pos + 24); }
     24   public void mutateTest2(byte test2) { bb.put(bb_pos + 24, test2); }
     25   public Test test3() { return test3(new Test()); }
     26   public Test test3(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, byte test2, short test3_a, byte test3_b) {
     29     builder.prep(16, 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(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 
     46