| 2070 | } |
| 2071 | |
| 2072 | void SetupBoxScale(double x, double y, double z) { |
| 2073 | ImPlot3DContext& gp = *GImPlot3D; |
| 2074 | IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked, |
| 2075 | "SetupBoxScale() needs to be called after BeginPlot() and before any setup locking functions (e.g. PlotX)!"); |
| 2076 | IM_ASSERT_USER_ERROR(x > 0.0 && y > 0.0 && z > 0.0, "SetupBoxScale() requires all aspect ratios to be greater than 0!"); |
| 2077 | ImPlot3DPlot& plot = *gp.CurrentPlot; |
| 2078 | plot.Axes[0].NDCScale = x; |
| 2079 | plot.Axes[1].NDCScale = y; |
| 2080 | plot.Axes[2].NDCScale = z; |
| 2081 | } |
| 2082 | |
| 2083 | void SetupLegend(ImPlot3DLocation location, ImPlot3DLegendFlags flags) { |
| 2084 | ImPlot3DContext& gp = *GImPlot3D; |