105 lines
2.2 KiB
C#
105 lines
2.2 KiB
C#
using System.Numerics;
|
|
|
|
namespace Quik
|
|
{
|
|
/// <summary>
|
|
/// A bezier curve segment.
|
|
/// </summary>
|
|
public struct QuikBezier
|
|
{
|
|
/// <summary>
|
|
/// Segment start point.
|
|
/// </summary>
|
|
public Vector2 Start;
|
|
|
|
/// <summary>
|
|
/// Start point control point.
|
|
/// </summary>
|
|
public Vector2 ControlA;
|
|
|
|
/// <summary>
|
|
/// End point control point.
|
|
/// </summary>
|
|
public Vector2 ControlB;
|
|
|
|
/// <summary>
|
|
/// Segment end point.
|
|
/// </summary>
|
|
public Vector2 End;
|
|
}
|
|
|
|
/// <summary>
|
|
/// A line segment.
|
|
/// </summary>
|
|
public struct QuikLine
|
|
{
|
|
/// <summary>
|
|
/// Start point.
|
|
/// </summary>
|
|
public Vector2 Start;
|
|
|
|
/// <summary>
|
|
/// End point.
|
|
/// </summary>
|
|
public Vector2 End;
|
|
}
|
|
|
|
/// <summary>
|
|
/// A rectangle.
|
|
/// </summary>
|
|
public struct QuikRectangle
|
|
{
|
|
/// <summary>
|
|
/// Rectangle minimum point.
|
|
/// </summary>
|
|
public Vector2 Min;
|
|
|
|
/// <summary>
|
|
/// Rectangle maximum point.
|
|
/// </summary>
|
|
public Vector2 Max;
|
|
}
|
|
|
|
/// <summary>
|
|
/// An ellipse.
|
|
/// </summary>
|
|
/// <remarks>It is undefined to have an ellipse with non-orthogonal axes.</remarks>
|
|
public struct QuikEllipse
|
|
{
|
|
/// <summary>
|
|
/// Ellipse center point.
|
|
/// </summary>
|
|
public Vector2 Center;
|
|
|
|
/// <summary>
|
|
/// First ellipse axis.
|
|
/// </summary>
|
|
public Vector2 AxisA;
|
|
|
|
/// <summary>
|
|
/// Second ellipse axis.
|
|
/// </summary>
|
|
public Vector2 AxisB;
|
|
}
|
|
|
|
/// <summary>
|
|
/// A triangle.
|
|
/// </summary>
|
|
public struct QuikTriangle
|
|
{
|
|
/// <summary>
|
|
/// First vertex.
|
|
/// </summary>
|
|
public Vector2 A;
|
|
|
|
/// <summary>
|
|
/// Second vertex.
|
|
/// </summary>
|
|
public Vector2 B;
|
|
|
|
/// <summary>
|
|
/// Third vertex.
|
|
/// </summary>
|
|
public Vector2 C;
|
|
}
|
|
} |