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

Function PixelsToPlotRay

implot3d.cpp:2116–2120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2114ImVec2 PlotToPixels(double x, double y, double z) { return PlotToPixels(ImPlot3DPoint(x, y, z)); }
2115
2116ImPlot3DRay PixelsToPlotRay(const ImVec2& pix) {
2117 ImPlot3DContext& gp = *GImPlot3D;
2118 IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "PixelsToPlotRay() needs to be called between BeginPlot() and EndPlot()!");
2119 return NDCRayToPlotRay(PixelsToNDCRay(pix));
2120}
2121
2122ImPlot3DRay PixelsToPlotRay(double x, double y) { return PixelsToPlotRay(ImVec2((float)x, (float)y)); }
2123

Callers 1

DemoMousePickingFunction · 0.85

Calls 2

NDCRayToPlotRayFunction · 0.85
PixelsToNDCRayFunction · 0.85

Tested by

no test coverage detected