Daily update on 20230413 by nitload youmu
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
public class Polygon : IGeometryCombination
|
||||
{
|
||||
internal Point[] pointsArray;
|
||||
|
||||
public Polygon(uint bornTime) : base(bornTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Polygon(int pointNum)
|
||||
{
|
||||
pointsArray = new Point[pointNum];
|
||||
this.toSimpleGeometry();
|
||||
}
|
||||
|
||||
public Polygon(Point[] pointsArray)
|
||||
{
|
||||
PointsArray = pointsArray;
|
||||
this.toSimpleGeometry();
|
||||
}
|
||||
|
||||
internal override void toSimpleGeometry()
|
||||
{
|
||||
Point begin = pointsArray[0];
|
||||
for (int i = 1; i <= pointsArray.Length; i++)
|
||||
{
|
||||
Triangle a = new Triangle(this._bornTick);
|
||||
this.Add(a);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Point[] PointsArray
|
||||
{
|
||||
get { return pointsArray; }
|
||||
set { pointsArray = value; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user