libigl v2.5.0
Loading...
Searching...
No Matches
ImGuizmoWidget.h
Go to the documentation of this file.
1#ifndef IGL_OPENGL_GFLW_IMGUI_IMGUIZMOPLUGIN_H
2#define IGL_OPENGL_GFLW_IMGUI_IMGUIZMOPLUGIN_H
3#include "../../../igl_inline.h"
4#include "ImGuiMenu.h"
5#include <imgui.h>
6#include <imgui_internal.h>
7#include <ImGuizmo.h>
8#include <Eigen/Dense>
9
10namespace igl{ namespace opengl{ namespace glfw{ namespace imgui{
11
14{
15public:
16 // callback(T) called when the stored transform T changes
17 std::function<void(const Eigen::Matrix4f &)> callback;
18 // Whether to display
19 bool visible = true;
20 // whether rotating, translating or scaling
21 ImGuizmo::OPERATION operation;
22 // stored transformation
23 Eigen::Matrix4f T;
24 // Initilize with rotate operation on an identity transform (at origin)
25 ImGuizmoWidget():operation(ImGuizmo::ROTATE),T(Eigen::Matrix4f::Identity()){};
26 IGL_INLINE virtual void init(Viewer *_viewer, ImGuiPlugin *_plugin) override;
27 IGL_INLINE virtual void draw() override;
28};
29
30}}}}
31
32#ifndef IGL_STATIC_LIBRARY
33# include "ImGuizmoWidget.cpp"
34#endif
35
36#endif
Definition Viewer.h:43
Plugin for the viewer to enable imgui widgets.
Definition ImGuiPlugin.h:32
Abstract class for imgui "widgets".
Definition ImGuiWidget.h:31
Widget for a guizmo (3D transform manipulator)
Definition ImGuizmoWidget.h:14
ImGuizmoWidget()
Definition ImGuizmoWidget.h:25
virtual void init(Viewer *_viewer, ImGuiPlugin *_plugin) override
bool visible
Definition ImGuizmoWidget.h:19
Eigen::Matrix4f T
Definition ImGuizmoWidget.h:23
ImGuizmo::OPERATION operation
Definition ImGuizmoWidget.h:21
std::function< void(const Eigen::Matrix4f &)> callback
Definition ImGuizmoWidget.h:17
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17