| 48 | } |
| 49 | |
| 50 | int DynamicLightCollection::AddLight(const vec3& pos, const vec3& color, float radius) { |
| 51 | dynamic_lights.resize(dynamic_lights.size() + 1); |
| 52 | DynamicLight& light = dynamic_lights.back(); |
| 53 | light.pos = pos; |
| 54 | light.id = next_id++; |
| 55 | light.color = color; |
| 56 | light.radius = radius; |
| 57 | return light.id; |
| 58 | } |
| 59 | |
| 60 | bool DynamicLightCollection::MoveLight(int id, const vec3& pos) { |
| 61 | DynamicLight* light = GetLightFromID(id); |
no test coverage detected