| 304 | } |
| 305 | |
| 306 | void SL::DrawSplineTangents(Draw* dd, int numSplines, const Spline2 splines[], const Colour& colour) |
| 307 | { |
| 308 | dd->SetColour(colour); |
| 309 | |
| 310 | for (int i = 0; i < numSplines; i++) |
| 311 | { |
| 312 | const Spline2& spline = splines[i]; |
| 313 | |
| 314 | Vec2f p0 = Position0(spline); |
| 315 | Vec2f p1 = Position1(spline); |
| 316 | |
| 317 | Vec2f v0 = Velocity0(spline); |
| 318 | Vec2f v1 = Velocity1(spline); |
| 319 | |
| 320 | Vec2f p[] = |
| 321 | { |
| 322 | p0, |
| 323 | p0 + v0 / 3.0f, |
| 324 | p1, |
| 325 | p1 - v1 / 3.0f, |
| 326 | }; |
| 327 | |
| 328 | dd->DrawLines(SL_SIZE(p), p); |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | void SL::DrawSplineFrames(Draw* dd, int numSplines, const Spline2 splines[], float size, float step, bool consistent) |
| 333 | { |
nothing calls this directly
no outgoing calls
no test coverage detected