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

Method Render

implot3d_items.cpp:400–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398 void Init(ImDrawList3D& draw_list_3d) const { GetLineRenderProps(draw_list_3d, HalfWeight, UV0, UV1); }
399
400 IMPLOT3D_INLINE bool Render(ImDrawList3D& draw_list_3d, const ImPlot3DBox& cull_box, int prim) const {
401 ImPlot3DPoint p_plot = Getter(prim);
402 if (!cull_box.Contains(p_plot))
403 return false;
404 ImVec2 p = PlotToPixels(p_plot);
405 ImU32 col = ColGetter(prim);
406 float size = SizeGetter(prim);
407 for (int i = 0; i < Count; i = i + 2) {
408 ImVec2 p1(p.x + Marker[i].x * size, p.y + Marker[i].y * size);
409 ImVec2 p2(p.x + Marker[i + 1].x * size, p.y + Marker[i + 1].y * size);
410 PrimLine(draw_list_3d, p1, p2, HalfWeight, col, UV0, UV1, GetPointDepth(p_plot));
411 }
412 return true;
413 }
414
415 const _Getter& Getter;
416 const _GetterColor ColGetter;

Callers

nothing calls this directly

Calls 4

PlotToPixelsFunction · 0.85
PrimLineFunction · 0.85
GetPointDepthFunction · 0.85
ContainsMethod · 0.80

Tested by

no test coverage detected