| 135 | |
| 136 | |
| 137 | private fun claim(track: Track, best: RectWithName, frameNum: Int) { |
| 138 | track.x0.newNode(frameNum.toDouble(), Vec3(Math.min(best.x, best.x + best.w), 0.0, 0.0)) |
| 139 | track.y0.newNode(frameNum.toDouble(), Vec3(Math.min(best.y, best.y + best.h), 0.0, 0.0)) |
| 140 | track.x1.newNode(frameNum.toDouble(), Vec3(Math.max(best.x, best.x + best.w), 0.0, 0.0)) |
| 141 | track.y1.newNode(frameNum.toDouble(), Vec3(Math.max(best.y, best.y + best.h), 0.0, 0.0)) |
| 142 | best.track = track |
| 143 | track.seen = true |
| 144 | track.lostFor = 0 |
| 145 | best.name = track.name |
| 146 | } |
| 147 | |
| 148 | fun rectsAt(t: Double): List<Rect> { |
| 149 | var frame = (t * frames.size).toInt() |