BrutPitt / imGuIZMO.quat

ImGui GIZMO widget - 3D object manipulator / orientator
BSD 2-Clause "Simplified" License
378 stars 41 forks source link

In dual mode the arrow goes outside of the widget area #1

Closed DiligentGraphics closed 4 years ago

DiligentGraphics commented 4 years ago

Hi! Thanks for sharing you great widget!

For some reason in dual mode, the arrow does not get clipped by the widget area:

image image

BrutPitt commented 4 years ago

Hi @DiligentGraphics Thanks for letting me know: I had forgotten to clip it.

I have correct the bug, let me know if is all right.

Now, the spot part outside widget area is (should be) clipped.

If You want/need also that ALL the spot is visible inside the widget area, also in the boundary condition, just reduce the axes length of 2/3:

    imguiGizmo::resizeAxesOf(2.0/3.0); // resize axes length of 2/3 -> 0.67
    ImGui::gizmo3D("##RotB1", quat, light);   // your control in dual mode
    imguiGizmo::restoreAxes();   // restore sizes for others

This because I had thought the "dual-mode" widget just a little more bigger of clipping area, because the limit cases are only those in which the spot is (almost) aligned to the X and Y axes, and the widget axes can always be reduced.

DiligentGraphics commented 4 years ago

Thanks!