Skip to content

Conversation

@brenocq
Copy link
Owner

@brenocq brenocq commented Nov 17, 2025

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 dialog

Bug Fixes:
- Wrong negative offset handling
- Wrong ray direction for PixelsToPlotRay

Breaking Changes:
- GetPlotPos()GetPlotRectPos()
- GetPlotSize()GetPlotRectSize()

@brenocq brenocq requested a review from Copilot November 17, 2025 19:08
@brenocq brenocq self-assigned this Nov 17, 2025
@brenocq brenocq linked an issue Nov 17, 2025 that may be closed by this pull request
7 tasks
@github-actions github-actions bot added status:review The task is under review prio:high High priority type:docs Improvements or additions to documentation labels Nov 17, 2025
Copilot finished reviewing on behalf of brenocq November 17, 2025 19:11
Copy link

Copilot AI left a 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(), and ShowAboutWindow() 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
@brenocq brenocq force-pushed the docs/improve-documentation branch from d90194c to 0be6212 Compare November 28, 2025 03:56
@brenocq brenocq force-pushed the docs/improve-documentation branch from 0be6212 to 862b128 Compare November 28, 2025 03:59
@brenocq brenocq merged commit 1f50276 into main Nov 28, 2025
9 checks passed
@brenocq brenocq deleted the docs/improve-documentation branch November 28, 2025 04:18
@github-actions github-actions bot added status:done Task completed successfully and removed status:review The task is under review labels Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

prio:high High priority status:done Task completed successfully type:docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Improve documentation

2 participants