MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/MaterialX / toggleTurntable

Method toggleTurntable

source/MaterialXView/Viewer.cpp:2608–2624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2606}
2607
2608void Viewer::toggleTurntable(bool enable)
2609{
2610 _turntableEnabled = enable;
2611
2612 if (enable)
2613 {
2614 _turntableTimer.startTimer();
2615 }
2616 else
2617 {
2618 float turntableRotation = fmod((360.0f / _turntableSteps) * _turntableStep, 360.0f);
2619 _meshRotation[1] = fmod(_meshRotation[1] + turntableRotation, 360.0f);
2620 _turntableTimer.endTimer();
2621 }
2622 invalidateShadowMap();
2623 _turntableStep = 0;
2624}
2625
2626void Viewer::setShaderInterfaceType(mx::ShaderInterfaceType interfaceType)
2627{

Callers

nothing calls this directly

Calls 3

startTimerMethod · 0.80
endTimerMethod · 0.80
fmodFunction · 0.50

Tested by

no test coverage detected