-
-
Notifications
You must be signed in to change notification settings - Fork 83
[Feature] Distance Measurement Tool #158
Copy link
Copy link
Open
Labels
prio:mediumMedium priorityMedium prioritystatus:todoTask identified but not startedTask identified but not startedtype:featNew feature or requestNew feature or request
Description
Activity
Metadata
Metadata
Assignees
Labels
prio:mediumMedium priorityMedium prioritystatus:todoTask identified but not startedTask identified but not startedtype:featNew feature or requestNew feature or request
Feature description
Users may need to verify dimensions or analyze the spatial relationship between specific areas of a plot. This feature proposes a Measurement Tool that allows users to determine the precise distance between two points on the plot's bounding box planes.
Workflow:
ESCor right-clicking cancels the operation or clears the current measurement.Constraints:
Tasks
implot3d_internal.h)ImPlot3DPlotto track the measurement status:MeasureMode(Enum: None, SelectingP1, SelectingP2, Finished).MeasureP1andMeasureP2(ImPlot3DPoint).implot3d.cpp)ShowPlotContextMenuto toggle the mode.implot3d.cpp)HandleInput, implement logic to detect mouse clicks whenMeasureModeis active.GetMouseOverPlaneandPixelsToPlotPlaneto calculate the 3D coordinate of the mouse cursor projected onto the hovered plot face.MeasureP1andMeasureP2on click events.implot3d.cpp)MeasureP1(andMeasureP2if set).dX: ...dY: ...dZ: ...Len: ...implot3d_demo.cpp)implot3d_demo.cpp(can be implicitly tested via the context menu on existing plots).