| 1138 | //----------------------------------------------------------------------------- |
| 1139 | |
| 1140 | void DemoBoxScale() { |
| 1141 | IMGUI_DEMO_MARKER("Axes/Box Scale"); |
| 1142 | constexpr int N = 100; |
| 1143 | float xs[N], ys[N], zs[N]; |
| 1144 | for (int i = 0; i < N; i++) { |
| 1145 | float t = i / (float)(N - 1); |
| 1146 | xs[i] = sinf(t * 2.0f * IM_PI); |
| 1147 | ys[i] = cosf(t * 4.0f * IM_PI); |
| 1148 | zs[i] = t * 2.0f - 1.0f; |
| 1149 | } |
| 1150 | |
| 1151 | static float scale[3] = {1.0f, 1.0f, 1.0f}; |
| 1152 | ImGui::SliderFloat3("Box Scale", scale, 0.1f, 2.0f, "%.2f"); |
| 1153 | |
| 1154 | if (ImPlot3D::BeginPlot("##BoxScale")) { |
| 1155 | ImPlot3D::SetupBoxScale(scale[0], scale[1], scale[2]); |
| 1156 | ImPlot3D::PlotLine("3D Curve", xs, ys, zs, N); |
| 1157 | ImPlot3D::EndPlot(); |
| 1158 | } |
| 1159 | } |
| 1160 | |
| 1161 | void DemoBoxRotation() { |
| 1162 | IMGUI_DEMO_MARKER("Axes/Box Rotation"); |
nothing calls this directly
no test coverage detected