Beispiel #1
0
 public SegmentParametric(LineParametric line, float t1, float t2)
 {
     this.Line = line;
     this.T1 = t1;
     this.T2 = t2;
 }
Beispiel #2
0
        public static SegmentParametric GetParametricProjection(
            LineParametric line,
            List<Vector2> vertices)
        {
            PointParametric max = new PointParametric(line, -999999);
            PointParametric min = new PointParametric(line, 999999);
            PointParametric tempPoint;

            foreach (Vector2 Vector2 in vertices)
            {
                tempPoint = line.GetProjectionPoint(Vector2);
                if (tempPoint.T > max.T)
                {
                    max = tempPoint;
                }
                else if (tempPoint.T < min.T)
                {
                    min = tempPoint;
                }
            }

            return new SegmentParametric(line, min.T, max.T);
        }
Beispiel #3
0
 public PointParametric(LineParametric line, float t)
 {
     this.Line = line;
     this.T = t;
 }
Beispiel #4
0
 public static Vector2 ClosestPointOnLine1P(
     LineParametric line, 
     Vector2 point, 
     bool segmentClamp)
 {
     return ClosestPointOnLine1P(line.a, line.b, point, segmentClamp);
 }