lixiaojun
2024-09-25 21c97aab9153758bebfc9b3944859b0eec271c76
WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/BoundingBox3d.cs
@@ -1,7 +1,4 @@
using DevExpress.CodeParser;
using DevExpress.Mvvm.POCO;
namespace Yw.WinFrmUI.HydroL3d
namespace 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;
        }
    }
}