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 interface IPolygon
10 {
11 /// <summary>
12 /// The vertices that define the axes spanned by this polygon in screen-space counter-clockwise orientation.
13 /// </summary>
14 /// <remarks>
15 /// Counter-clockwise orientation in screen-space coordinates is equivalent to a clockwise orientation in standard coordinates.
16 /// <para>
17 /// E.g. For the set of vertices { (0, 0), (1, 0), (0, 1), (1, 1) }, a counter-clockwise orientation is { (0, 0), (0, 1), (1, 1), (1, 0) }.
18 /// </para>
19 /// </remarks>
20 /// <returns>The vertices that define the axes spanned by this polygon.</returns>
21 ReadOnlySpan<Vector2> GetAxisVertices();
22
23 /// <summary>
24 /// Retrieves the vertices of this polygon in screen-space counter-clockwise orientation.
25 /// </summary>
26 /// <remarks>
27 /// Counter-clockwise orientation in screen-space coordinates is equivalent to a clockwise orientation in standard coordinates.
28 /// <para>
29 /// E.g. For the set of vertices { (0, 0), (1, 0), (0, 1), (1, 1) }, a counter-clockwise orientation is { (0, 0), (0, 1), (1, 1), (1, 0) }.
30 /// </para>
31 /// </remarks>
32 /// <returns>The vertices of this polygon.</returns>
33 ReadOnlySpan<Vector2> GetVertices();
34 }
35}