Example #1
0
 private void AddLine(CircleType type, Coordinate start, Coordinate end, Plane test, CachedLines cache)
 {
     var line = new Line(start, end);
     var cls = line.ClassifyAgainstPlane(test);
     if (cls == PlaneClassification.Back) return;
     if (cls == PlaneClassification.Spanning)
     {
         var isect = test.GetIntersectionPoint(line, true);
         var first = test.OnPlane(line.Start) > 0 ? line.Start : line.End;
         line = new Line(first, isect);
     }
     cache.Cache[type].Add(new Line(cache.Viewport3D.WorldToScreen(line.Start), cache.Viewport3D.WorldToScreen(line.End)));
 }