23 use GetTypeIdFromConstTrait;
25 public const ID = PrimitiveShapeType::PAYLOAD_TYPE_CIRCLE_OR_SPHERE;
27 public function __construct(
28 private int $segments,
31 public function getSegments() :
int{
return $this->segments; }
33 public static function read(ByteBufferReader $in) :
self{
34 $segments = Byte::readUnsigned($in);
35 return new self($segments);
38 public function write(ByteBufferWriter $out) :
void{
39 Byte::writeUnsigned($out, $this->segments);