MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / claim

Method claim

src/main/java/trace/util/PersonDetector.kt:137–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 4

newNodeMethod · 0.80
Vec3Class · 0.50
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected