/// <summary> /// 点导几何元素的投影点 /// </summary> /// <param name="pt"></param> /// <returns></returns> public virtual Double3 ProjectPoint(Double3 pt) { Double3 diff = pt - this.Pt; return(pt - Double3.ProjectOnPlane(diff, this.NormalizedNormal)); }
/// <summary> /// 点导几何元素的距离 /// </summary> /// <param name="pt"></param> /// <returns></returns> public virtual double CalcDistance(Double3 pt) { Double3 diff = pt - this.Pt; return(Double3.ProjectOnPlane(diff, this.NormalizedNormal).magnitude); }