예제 #1
0
 /**
  * @return int offset
  */
 public static function createStructInNestedNS(FlatBufferBuilder $builder, $a, $b)
 {
     $builder->prep(4, 8);
     $builder->putInt($b);
     $builder->putInt($a);
     return $builder->offset();
 }
예제 #2
0
파일: Test.php 프로젝트: MindFy/flatbuffers
 /**
  * @return int offset
  */
 public static function createTest(FlatBufferBuilder $builder, $a, $b)
 {
     $builder->prep(2, 4);
     $builder->pad(1);
     $builder->putSbyte($b);
     $builder->putShort($a);
     return $builder->offset();
 }
예제 #3
0
 /**
  * @return int offset
  */
 public static function createVec3(FlatBufferBuilder $builder, $x, $y, $z, $test1, $test2, $test3_a, $test3_b)
 {
     $builder->prep(16, 32);
     $builder->pad(2);
     $builder->prep(2, 4);
     $builder->pad(1);
     $builder->putSbyte($test3_b);
     $builder->putShort($test3_a);
     $builder->pad(1);
     $builder->putSbyte($test2);
     $builder->putDouble($test1);
     $builder->pad(4);
     $builder->putFloat($z);
     $builder->putFloat($y);
     $builder->putFloat($x);
     return $builder->offset();
 }