Feature description
This feature proposes adding a Gizmo Tool to implot3d, allowing users to intuitively manipulate data points or objects directly within the plot area. Instead of relying on external sliders or input fields, users can drag interactive handles to translate, rotate, or scale elements.
Key Requirements:
- Modes: Support for Translation (arrows), Rotation (rings), and Scaling (cubes/bars).
- 3D View: A full 3-axis gizmo is rendered when navigating in 3D.
- 2D View: When the plot is in a 2D view mode (e.g., restricted to a plane or
ImPlot3DFlags_GroundOnly), the gizmo should automatically adapt to a 2D version (e.g., hiding the Z-axis handles when viewing the XY plane).
- Immediate Mode: The API should follow the immediate mode paradigm, taking pointers to position, rotation, and scale variables to update them in real-time.
Proposed API:
// Renders a gizmo and updates the transform values based on user input
bool PlotGizmo(const char* label_id, float* translation, float* rotation, float* scale, ImPlot3DGizmoFlags flags = 0);
Tasks
Feature description
This feature proposes adding a Gizmo Tool to
implot3d, allowing users to intuitively manipulate data points or objects directly within the plot area. Instead of relying on external sliders or input fields, users can drag interactive handles to translate, rotate, or scale elements.Key Requirements:
ImPlot3DFlags_GroundOnly), the gizmo should automatically adapt to a 2D version (e.g., hiding the Z-axis handles when viewing the XY plane).Proposed API:
Tasks
implot3d.h)ImPlot3DGizmoFlags(e.g.,Translate,Rotate,Scale,Local,World).PlotGizmofunction.implot3d_gizmo.cpp)plane_2dvs 3D) and hide irrelevant axes for the 2D view.implot3d_gizmo.cpp)translation,rotation, orscalearrays.implot3d_demo.cpp)