MCPcopy Create free account
hub / github.com/arrayfire/forge / fg_add_surface_to_chart

Function fg_add_surface_to_chart

src/api/c/chart.cpp:282–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282fg_err fg_add_surface_to_chart(fg_surface* pSurface, fg_chart pChart,
283 const unsigned pXPoints, const unsigned pYPoints, const fg_dtype pType,
284 const fg_plot_type pPlotType, const fg_marker_type pMarkerType)
285{
286 try {
287 ARG_ASSERT(1, (pChart!=0));
288 ARG_ASSERT(2, (pXPoints>0));
289 ARG_ASSERT(3, (pYPoints>0));
290
291 common::Chart* chrt = getChart(pChart);
292
293 // Surface is only allowed in FG_CHART_3D
294 ARG_ASSERT(5, chrt->chartType() == FG_CHART_3D);
295
296 common::Surface* surf = new common::Surface(pXPoints, pYPoints, (forge::dtype)pType,
297 pPlotType, pMarkerType);
298 chrt->addRenderable(surf->impl());
299 *pSurface = getHandle(surf);
300 }
301 CATCHALL
302
303 return FG_ERR_NONE;
304}
305
306fg_err fg_add_vector_field_to_chart(fg_vector_field* pField, fg_chart pChart,
307 const unsigned pNPoints, const fg_dtype pType)

Callers 1

surfaceMethod · 0.85

Calls 4

getChartFunction · 0.85
getHandleFunction · 0.85
chartTypeMethod · 0.80
addRenderableMethod · 0.45

Tested by

no test coverage detected