using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace RichCreator.Utility.Structs
|
{
|
public class ZTTargetPolygonObj
|
{
|
public ZTTargetPolygonObj()
|
{
|
|
}
|
public ZTTargetPolygonObj(ZTPolygonObj polygon,ZTPointObj target)
|
{
|
this.Polygon = polygon;
|
this.Target = target;
|
}
|
|
|
/// <summary>
|
/// 多边形
|
/// </summary>
|
public ZTPolygonObj Polygon { get; set; }
|
|
/// <summary>
|
/// 目标点
|
/// </summary>
|
public ZTPointObj Target { get; set; }
|
|
|
public ZTTargetPolygon To()
|
{
|
|
ZTPolygon polygon=this.Polygon.To();
|
ZTPoint target = this.Target.To();
|
return new ZTTargetPolygon(polygon, target);
|
}
|
|
public static ZTTargetPolygonObj From(ZTTargetPolygon obj)
|
{
|
ZTPolygonObj polygon = ZTPolygonObj.From(obj.Polygon);
|
ZTPointObj target = ZTPointObj.From(obj.Target);
|
|
return new ZTTargetPolygonObj(polygon, target);
|
}
|
}
|
}
|