MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / resize

Method resize

framework/scene_graph/scripts/free_camera.cpp:227–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227void 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

Callers 5

generate_mipmapsMethod · 0.45
generate_mipmapsMethod · 0.45
decodeMethod · 0.45
AstcMethod · 0.45
KtxMethod · 0.45

Calls 1

set_aspect_ratioMethod · 0.80

Tested by

no test coverage detected