-
-
Notifications
You must be signed in to change notification settings - Fork 65
Docs: Improve documentation #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR significantly improves ImPlot3D's documentation and functionality by adding 8 new demos, introducing utility API functions, fixing critical bugs, and standardizing file headers with MIT license text.
- Adds comprehensive demos for offset/stride, colored scatter, equal axes, auto-fitting, mouse picking, and custom overlays
- Introduces
PlotDummy(),ShowStyleSelector(),ShowColormapSelector(), andShowAboutWindow()APIs - Fixes negative offset handling bug using proper modulo arithmetic and corrects ray direction for pixel-to-plot conversion
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| implot3d_meshes.cpp | Adds MIT license header |
| implot3d_items.cpp | Adds MIT license header, fixes negative offset handling with ImPosMod, implements PlotDummy |
| implot3d_internal.h | Adds MIT license header, introduces ImPosMod utility function for proper modulo |
| implot3d_demo.cpp | Adds MIT license, 8 new demos (offset/stride, legend options, equal axes, auto-fitting, mouse picking, custom overlay, per-point style, config tab), MetricFormatter, ShowAboutWindow |
| implot3d.h | Adds MIT license, extensive API documentation improvements, new API functions, deprecation section for renamed functions |
| implot3d.cpp | Adds MIT license, API breaking changes log, implements new selector functions, ray direction fix, obsolete API wrappers |
| example/main.cpp | Adds MIT license header |
| example/CMakeLists.txt | Updates ImPlot dependency to newer commit |
…tSize Rename GetPlotPos() -> GetPlotRectPos() and GetPlotSize() -> GetPlotRectSize() for better clarity in 3D context. The "Rect" suffix makes it explicit these functions return the 2D screen rectangle, not 3D plot space coordinates. Old functions are marked as deprecated using IMPLOT3D_DEPRECATED and will be removed in v1.0. Add IMPLOT3D_DISABLE_OBSOLETE_FUNCTIONS to stay ahead of removals, or IMPLOT3D_DISABLE_OBSOLETE_WARNINGS to suppress deprecation warnings. BREAKING CHANGE: GetPlotPos/GetPlotSize are deprecated (still work with warnings). Update code to use GetPlotRectPos/GetPlotRectSize.
- Add MetricFormatter helper for metric prefixes (G/M/k/m/u/n) - Demonstrate custom axis formatter callbacks - Show Y-axis as Hz and Z-axis as m with proper unit formatting
- Add ShowStyleSelector() and ShowColormapSelector() API functions - Create Config demo tab with font, style, and colormap selectors - Remove duplicate ShowStyleSelector from demo file
- Add "Custom Per-Point Style" demo with colored toruses - Add PlotDummy() API function for legend customization
d90194c to
0be6212
Compare
0be6212 to
862b128
Compare
Closes #99
This PR improves the documentation of the public and internal APIs, adds license information to all files, and implements many new demos. Below are the list of changes.
9 New Demos:
- Offset and Stride
- Legend Options
- Equal Axes
- Auto-Fitting Data
- Mouse Picking
- Custom Overlay (tooltips, gizmo, overlays)
- Colored Scatter (per-point coloring with toruses)
- Config Tab
- About Window
New API Functions:
-
PlotDummy()- Demoed to modify item color in legend-
ShowStyleSelector()/ShowColormapSelector()- Style/colormap-
ShowAboutWindow()- About dialogBug Fixes:
- Wrong negative offset handling
- Wrong ray direction for
PixelsToPlotRayBreaking Changes:
-
GetPlotPos()→GetPlotRectPos()-
GetPlotSize()→GetPlotRectSize()