ImGui GIZMO widget - 3D object manipulator / orientator
setPanModifier
and setDollyModifier
helper functions.rotation around X | rotation around Y | rotation around Z | Pan / move | Dolly / zoom |
---|---|---|---|---|
Please, read main-page for more information: imGuIZMO.quat
NOTE Already from v.2.2 is changed capitalization of search "include" path:
ImGui
to imgui
, to adapt it to the ImGui repository directoryNow you can set it from IMGUIZMO_IMGUI_FOLDER
define in vgConfig.h
, for more flexibility (#5)
//------------------------------------------------------------------------------
// imGuiZmo.quat - v3.0 and later - (used only inside it)
//
// used to specify where ImGui include files should be searched
// #define IMGUIZMO_IMGUI_FOLDER
// is equivalent to use:
// #include <imgui.h>
// #include <imgui_internal.h>
// #define IMGUIZMO_IMGUI_FOLDER myLibs/ImGui/
// (final slash is REQUIRED) is equivalent to use:
// #include <myLib/ImGui/imgui.h>
// #include <myLib/ImGui/imgui_internal.h>
// Default: IMGUIZMO_IMGUI_FOLDER commented/undefined
// is equivalent to use:
// #include <imgui/imgui.h>
// #include <imgui/imgui_internal.h>
//
// N.B. Final slash to end of path is REQUIRED!
//------------------------------------------------------------------------------
// #define IMGUIZMO_IMGUI_FOLDER ImGui/
Or to use -D
compiler flag, as described here: 5#-issue-comment
setGizmoFeelingRot(float)
*You can try/view these new feature via live demo, accessible from main page
Changes / Fixes / Improvements
ImGui
to imgui
, to adapt to the ImGui repository directory, anyway you can use the IMGUIZMO_USE_ImGui_FOLDER
define to maintain olden behaviorBINARYEN_METHOD
no more supported)Bugs fixed
Comple/Build issues fixed
Example fixes/improvements
Now the math library has been inserted in a proper repository, so I changed its name from vGizmoMath.h
in vgMath.h
.
Anyway users no need to change anything in own source code, if they don't want, a vGizmoMath.h
"frontend" has been created to load vgMath.h
.
(although I recommend to change anyway the #include
name in your code)
The vGizmoConfig.h
file name also changes in vgConfig.h
, but it's used only internally: you don't have to do anything.
Is need only to copy your changes made in vGizmoConfig.h
in the new file vgConfig.h
.
It contains also 2 new options described in Configure imGuIZMO.quat section to homepage
Also two #defines
name are changed to do explicit reference to VGM and not more to VGIZMO:
VGIZMO_USES_LEFT_HAND_AXES
==> VGM_USES_LEFT_HAND_AXES
VGIZMO_USES_TEMPLATE
==> VGM_USES_TEMPLATE
(it's important if you have used external defines to pass to compiler)
In vgMath the following constructors change:
Vec3(const VEC2_T& v, T s=T(0))
==> Vec3(const VEC2_T& v, T s)
Vec4(const VEC3_T& v, T s=T(0))
==> Vec4(const VEC3_T& v, T s)
(to avoid errors has been removed default assignment: now you explicitly need to add the "scalar".)
MAT4_T scale(MAT4_T const& m, VEC3_T const& v)
functionfrustum
function nameUsers of the previous versions need:
#include <imGuIZMO.h>
==> #include <imGuIZMOquat.h>
vGizmoConfig.h
uncomment #define VGIZMO_USES_GLM
to continue to use glm, or add VGIZMO_USES_GLM
to compiler preprocessor defines.In anticipation of some and future changes, I freeze and make available this release