2 using System
.Collections
.Generic
;
6 public static void Main()
10 private static IEnumerable
<float> FindIntersections
<TVector
>(
11 IBezier
<TVector
> bezier
,
15 int depth
) where TVector
: IVector
<TVector
>
17 var bounds
= bezier
.GetBounds();
18 if (Intersect
.s(ray
, bounds
))
20 var intersections1
= new float[] { }
;
21 var intersections2
= new float[] { }
;
22 foreach (var t
in intersections1
) { yield return t; }
23 foreach (var t
in intersections2
) { yield return t; }
27 public static class Intersect
29 public static bool s
<TVector
>(Ray
<TVector
> ray
, BoundingBoxN
<TVector
> box
) where TVector
: IVector
<TVector
>
31 throw new NotImplementedException();
35 public struct Range
<T
>
39 public class Ray
<TVector
> where TVector
: IVector
<TVector
>
43 public interface IBezier
<TVector
>
44 where TVector
: IVector
<TVector
>
46 BoundingBoxN
<TVector
> GetBounds();
49 public interface IVector
<T
> : IEpsilonEquatable
<T
, float>
54 public interface IEpsilonEquatable
<TType
, TEpsilon
> // ReSharper enable TypeParameterCanBeVariant
58 public struct BoundingBoxN
<T
>