| 947 | } |
| 948 | |
| 949 | float SL::Length(const Spline2& s, float maxError) |
| 950 | { |
| 951 | float error; |
| 952 | float length = LengthEstimate(s, &error); |
| 953 | |
| 954 | if (error > maxError) |
| 955 | { |
| 956 | Spline2 s0; |
| 957 | Spline2 s1; |
| 958 | |
| 959 | Split(s, &s0, &s1); |
| 960 | |
| 961 | return Length(s0, maxError) + Length(s1, maxError); |
| 962 | } |
| 963 | |
| 964 | return length; |
| 965 | } |
| 966 | |
| 967 | float SL::Length(const Spline2& s, float t0, float t1, float maxError) |
| 968 | { |