git.s-ol.nu ~forks/DiligentTools / 3138bad
Added template ImGui::Checkbox function; few minor updates to Egor Yusov 2 years ago
2 changed file(s) with 18 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
5555 };
5656
5757 }
58
59 namespace ImGui
60 {
61
62 template<typename T>
63 inline bool Checkbox(const char* label, T* v)
64 {
65 bool b = *v != 0;
66 auto pressed = Checkbox(label, &b);
67 if (pressed)
68 *v = b ? 1 : 0;
69 return pressed;
70 }
71
72 }
381381 else if(io.KeyAlt || io.KeySuper) { rotationVector = Diligent::float3(0, 0, 1); }
382382
383383 Diligent::Quaternion qtStep = {0, 0, 0, 1};
384 if(!delta.x && !delta.y)
384 if(delta == Diligent::float2(0,0))
385385 {
386386 return;
387387 }
402402 vecFromPos(b);
403403
404404 auto axis = cross(a, b);
405 if(axis == Diligent::float3(0,0,0))
406 return;
405407 axis = normalize(axis);
406408
407409 auto AdotB = dot(a, b);