MCPcopy Create free account
hub / github.com/MethanePowered/MethaneKit / Animate

Method Animate

Apps/03-TexturedCube/TexturedCubeApp.cpp:177–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177bool TexturedCubeApp::Animate(double, double delta_seconds)
178{
179 const float rotation_angle_rad = Methane::Data::DegreeToRadians(static_cast<float>(delta_seconds * 360.F / 4.F));
180 const hlslpp::float3x3 light_rotate_matrix = hlslpp::float3x3::rotation_axis(m_camera.GetOrientation().up, rotation_angle_rad);
181 m_shader_uniforms.light_position = hlslpp::mul(m_shader_uniforms.light_position, light_rotate_matrix);
182 m_camera.Rotate(m_camera.GetOrientation().up, static_cast<float>(delta_seconds * 360.F / 8.F));
183 return true;
184}
185
186bool TexturedCubeApp::Resize(const gfx::FrameSize& frame_size, bool is_minimized)
187{

Callers

nothing calls this directly

Calls 2

DegreeToRadiansFunction · 0.85
RotateMethod · 0.80

Tested by

no test coverage detected