1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
<?php
// automatically generated by the FlatBuffers compiler, do not modify
namespace MyGame\Example;
use \Google\FlatBuffers\Struct;
use \Google\FlatBuffers\Table;
use \Google\FlatBuffers\ByteBuffer;
use \Google\FlatBuffers\FlatBufferBuilder;
class Vec3 extends Struct
{
/**
* @param int $_i offset
* @param ByteBuffer $_bb
* @return Vec3
**/
public function init($_i, ByteBuffer $_bb)
{
$this->bb_pos = $_i;
$this->bb = $_bb;
return $this;
}
/**
* @return float
*/
public function GetX()
{
return $this->bb->getFloat($this->bb_pos + 0);
}
/**
* @return float
*/
public function GetY()
{
return $this->bb->getFloat($this->bb_pos + 4);
}
/**
* @return float
*/
public function GetZ()
{
return $this->bb->getFloat($this->bb_pos + 8);
}
/**
* @return double
*/
public function GetTest1()
{
return $this->bb->getDouble($this->bb_pos + 16);
}
/**
* @return byte
*/
public function GetTest2()
{
return $this->bb->getByte($this->bb_pos + 24);
}
/**
* @return Test
*/
public function getTest3()
{
$obj = new Test();
$obj->init($this->bb_pos + 26, $this->bb);
return $obj;
}
/**
* @return int offset
*/
public static function createVec3(FlatBufferBuilder $builder, $x, $y, $z, $test1, $test2, $test3_a, $test3_b)
{
$builder->prep(8, 32);
$builder->pad(2);
$builder->prep(2, 4);
$builder->pad(1);
$builder->putSbyte($test3_b);
$builder->putShort($test3_a);
$builder->pad(1);
$builder->putByte($test2);
$builder->putDouble($test1);
$builder->pad(4);
$builder->putFloat($z);
$builder->putFloat($y);
$builder->putFloat($x);
return $builder->offset();
}
}
|