| 42 | } |
| 43 | |
| 44 | void CROS_impl::add(light* source) |
| 45 | { |
| 46 | // Search |
| 47 | for (auto& I : track) |
| 48 | if (source == I.source) |
| 49 | { |
| 50 | I.frame_touched = Device.dwFrame; |
| 51 | return; |
| 52 | } |
| 53 | |
| 54 | // Register _new_ |
| 55 | auto& L = track.emplace_back(); |
| 56 | L.frame_touched = Device.dwFrame; |
| 57 | L.source = source; |
| 58 | L.cache.verts[0].set(0, 0, 0); |
| 59 | L.cache.verts[1].set(0, 0, 0); |
| 60 | L.cache.verts[2].set(0, 0, 0); |
| 61 | L.test = 0.f; |
| 62 | L.energy = 0.f; |
| 63 | } |
| 64 | |
| 65 | IC bool pred_energy(const CROS_impl::Light& L1, const CROS_impl::Light& L2) { return L1.energy > L2.energy; } |
| 66 | ////////////////////////////////////////////////////////////////////////// |
no test coverage detected