| | |
| | | namespace Yw.WinFrmUI.HydroL3d |
| | | using DevExpress.CodeParser; |
| | | using DevExpress.DataAccess.MongoDB; |
| | | |
| | | namespace Yw.WinFrmUI.HydroL3d |
| | | { |
| | | /// <summary> |
| | | /// |
| | |
| | | return _parters.Exists(x => x.Id == id); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 绘制 |
| | | /// 获取包围盒 |
| | | /// </summary> |
| | | public void Draw() |
| | | public BoundingBox3d GetBoundingBox() |
| | | { |
| | | foreach (var link in this.Links) |
| | | { |
| | | link.Draw(); |
| | | } |
| | | var bd = new BoundingBox3d(); |
| | | bd.Min = new Point3d(); |
| | | bd.Max = new Point3d(); |
| | | |
| | | foreach (var node in this.Nodes) |
| | | { |
| | | node.Draw(); |
| | | bd.Min.X = Math.Min(bd.Min.X, node.Position.X); |
| | | bd.Max.X = Math.Max(bd.Max.X, node.Position.X); |
| | | bd.Min.Y = Math.Min(bd.Min.Y, node.Position.Y); |
| | | bd.Max.Y = Math.Max(bd.Max.Y, node.Position.Y); |
| | | bd.Min.Z = Math.Min(bd.Min.Z, node.Position.Z); |
| | | bd.Max.Z = Math.Max(bd.Max.Z, node.Position.Z); |
| | | } |
| | | |
| | | return bd; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |