Added ImGuizmo.

This commit is contained in:
Branimir Karadžić 2016-08-27 16:44:09 -07:00
parent c0f91f9d1c
commit 055402f78e
5 changed files with 1194 additions and 1 deletions

View File

@ -80,7 +80,7 @@
- read the FAQ below this section!
- your code creates the UI, if your code doesn't run the UI is gone! == very dynamic UI, no construction/destructions steps, less data retention on your side, no state duplication, less sync, less bugs.
- call and read ImGui::ShowTestWindow() for demo code demonstrating most features.
- see examples/ folder for standalone sample applications. Prefer reading examples/opengl_example/ first as it is the simplest.
- see examples/ folder for standalone sample applications. Prefer reading examples/opengl2_example/ first as it is the simplest.
you may be able to grab and copy a ready made imgui_impl_*** file from the examples/.
- customization: PushStyleColor()/PushStyleVar() or the style editor to tweak the look of the interface (e.g. if you want a more compact UI or a different color scheme).

View File

@ -44,3 +44,4 @@ namespace ImGui
#include "widgets/file_list.h"
#include "widgets/memory_editor.h"
#include "widgets/gizmo.h"

View File

@ -74,3 +74,4 @@ namespace ImGui
#include "widgets/file_list.inl"
#include "widgets/memory_editor.inl"
#include "widgets/gizmo.inl"

28
3rdparty/ocornut-imgui/widgets/gizmo.h vendored Normal file
View File

@ -0,0 +1,28 @@
namespace ImGuizmo
{
// call BeginFrame right after ImGui_XXXX_NewFrame();
void BeginFrame();
// return true if mouse cursor is over any gizmo control (axis, plan or screen component)
bool IsOver();
// return true if mouse IsOver or if the gizmo is in moving state
bool IsUsing();
// enable/disable the gizmo. Stay in the state until next call to Enable.
// gizmo is rendered with gray half transparent color when disabled
void Enable(bool enable);
// call it when you want a gizmo
// Needs view and projection matrices.
// matrix parameter is the source matrix (where will be gizmo be drawn) and might be transformed by the function. Return deltaMatrix is optional
// translation is applied in world space
enum MODE
{
TRANSLATE,
ROTATE,
SCALE
};
void Mogwai(const float *view, const float *projection, MODE mode, float *matrix, float *deltaMatrix = 0);
} // namespace ImGuizmo

1163
3rdparty/ocornut-imgui/widgets/gizmo.inl vendored Normal file

File diff suppressed because it is too large Load Diff