| 350 | } |
| 351 | |
| 352 | void PathCamera::pushBack(CameraSpline::Knot *knot) |
| 353 | { |
| 354 | // Make room at the end |
| 355 | if (mNodeCount == NodeWindow) { |
| 356 | delete mSpline.remove(mSpline.getKnot(0)); |
| 357 | mNodeBase++; |
| 358 | } |
| 359 | else |
| 360 | mNodeCount++; |
| 361 | |
| 362 | // Fill in the new node |
| 363 | mSpline.push_back(knot); |
| 364 | setMaskBits(WindowMask); |
| 365 | |
| 366 | // Make sure the position doesn't fall off |
| 367 | if (mPosition < mNodeBase) { |
| 368 | mPosition = (F32)mNodeBase; |
| 369 | setMaskBits(PositionMask); |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | void PathCamera::pushFront(CameraSpline::Knot *knot) |
| 374 | { |
no test coverage detected