예제 #1
0
        public static double LineToPointDistance2D(AKT_Line l, AKT_Point3d p, bool isSegment = true)
        {
            AKT_Point3d  pointA = l.To;
            AKT_Point3d  pointB = l.To;
            AKT_Point3d  pointC = p;
            AKT_Vector3d pA     = new AKT_Vector3d(p, pointA);

            throw new NotImplementedException();
            //AKT_Vector3d dist = AKT_Vector3d.CrossProduct(l.Direction, pA) / l.Length;
            //if (isSegment)
            //{
            //    double dot1 = DotProduct(pointA, pointB, p);
            //    if (dot1 > 0)
            //        return Distance(pointB, p);

            //    double dot2 = DotProduct(pointB, pointA, p);
            //    if (dot2 > 0)
            //        return Distance(pointA, p);
            //}
            //return Math.Abs(dist);
        }
예제 #2
0
 /// <summary>
 /// Determines whether a AKT_Line has the same value as this AKT_Line.
 /// </summary>
 /// <param name="other">A AKT_Line.</param>
 /// <returns>true if other has the same coordinates as this; otherwise false.</returns>
 public bool Equals(AKT_Line other)
 {
     return(this == other);
 }