From 12a6316ffa897b4ce4205f545b88359195b386d6 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期三, 25 九月 2024 17:34:24 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/BoundingBox3d.cs | 31 ++++++++++++++++++++++++------- 1 files changed, 24 insertions(+), 7 deletions(-) diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/BoundingBox3d.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/BoundingBox3d.cs index 34c8d38..43c5f76 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/BoundingBox3d.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/BoundingBox3d.cs @@ -1,7 +1,4 @@ -锘縰sing DevExpress.CodeParser; -using DevExpress.Mvvm.POCO; - -namespace Yw.WinFrmUI.HydroL3d +锘縩amespace Yw.WinFrmUI.HydroL3d { /// <summary> /// @@ -44,12 +41,32 @@ { return new Point3d() { - X = (this.Min.X + this.Max.X) / 2f, - Y = (this.Min.Y + this.Max.Y) / 2f, - Z = (this.Min.Z + this.Max.Z) / 2f + X = (this.Max.X + this.Min.X) / 2f, + Y = (this.Max.Y + this.Min.Y) / 2f, + Z = (this.Max.Z + this.Min.Z) / 2f }; } + /// <summary> + /// 鏄惁鍖呭惈 + /// </summary> + public bool Contains(Point3d pt) + { + if (pt.X > this.Max.X || pt.X < this.Min.X) + { + return false; + } + if (pt.Y > this.Max.Y || pt.Y < this.Min.Y) + { + return false; + } + if (pt.Z > this.Max.Z || pt.Z < this.Min.Z) + { + return false; + } + + return true; + } } } -- Gitblit v1.9.3