James Kuszmaul | 3b15b0c | 2022-11-08 14:03:16 -0800 | [diff] [blame^] | 1 | #[ MyGame.Example.Vec3 |
| 2 | Automatically generated by the FlatBuffers compiler, do not modify. |
| 3 | Or modify. I'm a message, not a cop. |
| 4 | |
| 5 | flatc version: 22.10.26 |
| 6 | |
| 7 | Declared by : |
| 8 | Rooting type : MyGame.Example.Monster () |
| 9 | ]# |
| 10 | |
| 11 | import Color as MyGame_Example_Color |
| 12 | import Test as MyGame_Example_Test |
| 13 | import flatbuffers |
| 14 | |
| 15 | type Vec3* = object of FlatObj |
| 16 | func x*(self: Vec3): float32 = |
| 17 | return Get[float32](self.tab, self.tab.Pos + 0) |
| 18 | func `x=`*(self: var Vec3, n: float32): bool = |
| 19 | return self.tab.Mutate(self.tab.Pos + 0, n) |
| 20 | func y*(self: Vec3): float32 = |
| 21 | return Get[float32](self.tab, self.tab.Pos + 4) |
| 22 | func `y=`*(self: var Vec3, n: float32): bool = |
| 23 | return self.tab.Mutate(self.tab.Pos + 4, n) |
| 24 | func z*(self: Vec3): float32 = |
| 25 | return Get[float32](self.tab, self.tab.Pos + 8) |
| 26 | func `z=`*(self: var Vec3, n: float32): bool = |
| 27 | return self.tab.Mutate(self.tab.Pos + 8, n) |
| 28 | func test1*(self: Vec3): float64 = |
| 29 | return Get[float64](self.tab, self.tab.Pos + 16) |
| 30 | func `test1=`*(self: var Vec3, n: float64): bool = |
| 31 | return self.tab.Mutate(self.tab.Pos + 16, n) |
| 32 | func test2*(self: Vec3): MyGame_Example_Color.Color = |
| 33 | return MyGame_Example_Color.Color(Get[uint8](self.tab, self.tab.Pos + 24)) |
| 34 | func `test2=`*(self: var Vec3, n: MyGame_Example_Color.Color): bool = |
| 35 | return self.tab.Mutate(self.tab.Pos + 24, n) |
| 36 | func test3*(self: Vec3): MyGame_Example_Test.Test = |
| 37 | return MyGame_Example_Test.Test(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + 26)) |
| 38 | proc Vec3Create*(self: var Builder, x: float32, y: float32, z: float32, test1: float64, test2: MyGame_Example_Color.Color, test3_a: int16, test3_b: int8): uoffset = |
| 39 | self.Prep(8, 32) |
| 40 | self.Pad(2) |
| 41 | self.Prep(2, 4) |
| 42 | self.Pad(1) |
| 43 | self.Prepend(test3_b) |
| 44 | self.Prepend(test3_a) |
| 45 | self.Pad(1) |
| 46 | self.Prepend(test2) |
| 47 | self.Prepend(test1) |
| 48 | self.Pad(4) |
| 49 | self.Prepend(z) |
| 50 | self.Prepend(y) |
| 51 | self.Prepend(x) |
| 52 | return self.Offset() |