| 225 | } |
| 226 | |
| 227 | void FreeCamera::resize(uint32_t width, uint32_t height) |
| 228 | { |
| 229 | auto &camera_node = get_node(); |
| 230 | |
| 231 | if (camera_node.has_component<Camera>()) |
| 232 | { |
| 233 | if (auto camera = dynamic_cast<PerspectiveCamera *>(&camera_node.get_component<Camera>())) |
| 234 | { |
| 235 | camera->set_aspect_ratio(static_cast<float>(width) / height); |
| 236 | } |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | } // namespace sg |
| 241 | } // namespace vkb |
no test coverage detected