Loads and loads of small improvements I added while developing on my game
This commit is contained in:
parent
41421b1df9
commit
a7c71e7ea1
107 changed files with 2278 additions and 1023 deletions
35
SMCode/SM2D/Object/PolyLine.cs
Normal file
35
SMCode/SM2D/Object/PolyLine.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System.Collections.Generic;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
using SM.Base.Objects;
|
||||
using SM.OGL.Mesh;
|
||||
|
||||
namespace SM2D.Object
|
||||
{
|
||||
public enum PolyLineType
|
||||
{
|
||||
NotConnected = 1,
|
||||
Connected = 3,
|
||||
ConnectedLoop = 2
|
||||
}
|
||||
|
||||
public class PolyLine : Polygon, ILineMesh
|
||||
{
|
||||
public float LineWidth { get; set; } = 1;
|
||||
|
||||
public PolyLine(ICollection<Vector2> vertices, PolyLineType lineType = PolyLineType.NotConnected) : base(vertices)
|
||||
{
|
||||
UVs.Active = false;
|
||||
|
||||
PrimitiveType = (PrimitiveType)lineType;
|
||||
}
|
||||
|
||||
public PolyLine(ICollection<PolygonVertex> vertices, PolyLineType lineType = PolyLineType.NotConnected) : base(vertices)
|
||||
{
|
||||
UVs.Active = false;
|
||||
PrimitiveType = (PrimitiveType)lineType;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue