MCPcopy Create free account
hub / github.com/brenocq/implot3d / SetupBoxScale

Function SetupBoxScale

implot3d.cpp:2072–2081  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2070}
2071
2072void 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
2083void SetupLegend(ImPlot3DLocation location, ImPlot3DLegendFlags flags) {
2084 ImPlot3DContext& gp = *GImPlot3D;

Callers 1

DemoBoxScaleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected