A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using System;
5using osuTK;
6
7namespace osu.Framework.Graphics.Primitives
8{
9 public class SimpleConvexPolygon : IConvexPolygon
10 {
11 private readonly Vector2[] vertices;
12
13 public SimpleConvexPolygon(Vector2[] vertices)
14 {
15 this.vertices = vertices;
16 }
17
18 public ReadOnlySpan<Vector2> GetAxisVertices() => vertices;
19
20 public ReadOnlySpan<Vector2> GetVertices() => vertices;
21
22 public int MaxClipVertices => vertices.Length * 2;
23 }
24}