| | |
| | | using System; |
| | | using RichCreator.Utility.Maps; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | { |
| | | public HousePathInfoObj() |
| | | { |
| | | |
| | | this.NextGates = new List<ParametersPointObj>(); |
| | | this.PathGuides = new List<ZTTargetPolygonObj>(); |
| | | } |
| | | public HousePathInfoObj(Int32 width, Int32 height) |
| | | { |
| | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 循逻线 |
| | | /// 巡逻点 |
| | | /// </summary> |
| | | public List<ZTLinePointObj> LoopLines { get; set; } |
| | | public ZTPointObj LoopPoint { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 寻路线 |
| | | /// </summary> |
| | | public List<ZTLinePointObj> FindPathLines { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 下一关进门点 |
| | | /// 参数意义 0:上 1:右 2:下 3:左 |
| | | /// </summary> |
| | | public List<ParametersPointObj> NextGates { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 路径向导,把某一区域的点导向某一点 |
| | | /// </summary> |
| | | public List<ZTTargetPolygonObj> PathGuides { get; set; } |
| | | |
| | | public HousePathInfo To() |
| | | { |
| | |
| | | info.FindPathPoints.Add(item.To()); |
| | | } |
| | | |
| | | info.LoopLines = new List<ZTLinePoint>(); |
| | | foreach (var item in this.LoopLines) |
| | | if (this.LoopPoint == null) |
| | | { |
| | | info.LoopLines.Add(item.To()); |
| | | info.LoopPoint = ZTPoint.Empty; |
| | | } |
| | | else |
| | | { |
| | | info.LoopPoint = this.LoopPoint.To(); |
| | | } |
| | | |
| | | |
| | | info.FindPathLines = new List<ZTLinePoint>(); |
| | | foreach (var item in this.FindPathLines) |
| | | { |
| | | info.FindPathLines.Add(item.To()); |
| | | } |
| | | |
| | | info.NextGates = new List<ParametersPoint>(); |
| | | foreach (var item in this.NextGates) |
| | | { |
| | | info.NextGates.Add(item.To()); |
| | | } |
| | | |
| | | info.PathGuides = new List<ZTTargetPolygon>(); |
| | | foreach (var item in this.PathGuides) |
| | | { |
| | | info.PathGuides.Add(item.To()); |
| | | } |
| | | |
| | | |
| | | return info; |
| | | } |
| | |
| | | infoObj.FindPathPoints.Add(ZTPointObj.From(item)); |
| | | } |
| | | |
| | | infoObj.LoopLines = new List<ZTLinePointObj>(); |
| | | foreach (var item in info.LoopLines) |
| | | { |
| | | infoObj.LoopLines.Add(ZTLinePointObj.From(item)); |
| | | } |
| | | infoObj.LoopPoint = ZTPointObj.From(info.LoopPoint); |
| | | |
| | | infoObj.FindPathLines = new List<ZTLinePointObj>(); |
| | | foreach (var item in info.FindPathLines) |
| | |
| | | infoObj.FindPathLines.Add(ZTLinePointObj.From(item)); |
| | | } |
| | | |
| | | infoObj.NextGates = new List<ParametersPointObj>(); |
| | | foreach (var item in info.NextGates) |
| | | { |
| | | infoObj.NextGates.Add(ParametersPointObj.From(item)); |
| | | } |
| | | |
| | | |
| | | infoObj.PathGuides = new List<ZTTargetPolygonObj>(); |
| | | foreach (var item in info.PathGuides) |
| | | { |
| | | infoObj.PathGuides.Add(ZTTargetPolygonObj.From(item)); |
| | | } |
| | | |
| | | |
| | | return infoObj; |
| | | |