<?phpnamespace App\Revisited\Render;/** A mesh being built with its skeleton (bones' parents and pivots). the bones of Bodies */final class Build{ public Mesh $m; /** @var list<int> */ public array $parents; /** @var list<float> */ public array $pivots; public function __construct() { $this->m = new Mesh(); $this->parents = array_fill(0, Bodies::BONES, -1); $this->pivots = array_fill(0, Bodies::BONES * 3, 0.0); } public function bone(int $b, int $parent, float $x, float $y, float $z): void { $this->parents[$b] = $parent; $this->pivots[$b * 3] = $x; $this->pivots[$b * 3 + 1] = $y; $this->pivots[$b * 3 + 2] = $z; }}