| 1445 | //----------------------------------------------------------------------------- |
| 1446 | |
| 1447 | template <typename _Getter> void PlotSurfaceEx(const char* label_id, const _Getter& getter, int x_count, int y_count, double scale_min, |
| 1448 | double scale_max, const ImPlot3DSpec& spec) { |
| 1449 | if (BeginItemEx(label_id, getter, spec, spec.FillColor, spec.Marker)) { |
| 1450 | const ImPlot3DNextItemData& n = GetItemData(); |
| 1451 | const ImPlot3DSpec& s = n.Spec; |
| 1452 | |
| 1453 | // Render fill |
| 1454 | if (getter.Count >= 4 && n.RenderFill && !ImHasFlag(spec.Flags, ImPlot3DSurfaceFlags_NoFill)) { |
| 1455 | const ImU32 col_fill = ImGui::GetColorU32(s.FillColor); |
| 1456 | RenderPrimitives<RendererSurfaceFill>(getter, x_count, y_count, col_fill, scale_min, scale_max); |
| 1457 | } |
| 1458 | |
| 1459 | // Render lines |
| 1460 | if (getter.Count >= 2 && n.RenderLine && !ImHasFlag(spec.Flags, ImPlot3DSurfaceFlags_NoLines)) { |
| 1461 | if (s.LineColors != nullptr) |
| 1462 | RenderPrimitives2<RendererLineSegments>(GetterSurfaceLines<_Getter>(getter, x_count, y_count), |
| 1463 | GetterIdxColor(s.LineColors, getter.Count), s.LineWeight); |
| 1464 | else |
| 1465 | RenderPrimitives2<RendererLineSegments>(GetterSurfaceLines<_Getter>(getter, x_count, y_count), |
| 1466 | GetterConstColor(ImGui::GetColorU32(s.LineColor)), s.LineWeight); |
| 1467 | } |
| 1468 | |
| 1469 | // Render markers |
| 1470 | if (s.Marker != ImPlot3DMarker_None && !ImHasFlag(spec.Flags, ImPlot3DSurfaceFlags_NoMarkers)) |
| 1471 | RenderColoredMarkers(getter, n); |
| 1472 | |
| 1473 | EndItem(); |
| 1474 | } |
| 1475 | } |
| 1476 | |
| 1477 | IMPLOT3D_TMP void PlotSurface(const char* label_id, const T* xs, const T* ys, const T* zs, int x_count, int y_count, double scale_min, |
| 1478 | double scale_max, const ImPlot3DSpec& spec) { |
no test coverage detected