MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / af_set_axes_limits_3d

Function af_set_axes_limits_3d

src/api/c/window.cpp:159–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159af_err af_set_axes_limits_3d(const af_window window, const float xmin,
160 const float xmax, const float ymin,
161 const float ymax, const float zmin,
162 const float zmax, const bool exact,
163 const af_cell* const props) {
164 try {
165 if (window == 0) { AF_ERROR("Not a valid window", AF_ERR_INTERNAL); }
166
167 ForgeManager& fgMngr = forgeManager();
168
169 fg_chart chart = nullptr;
170 // The ctype here below doesn't really matter as it is only fetching
171 // the chart. It will not set it.
172 // If this is actually being done, then it is extremely bad.
173 fg_chart_type ctype = FG_CHART_3D;
174
175 if (props->col > -1 && props->row > -1) {
176 chart = fgMngr.getChart(window, props->row, props->col, ctype);
177 } else {
178 chart = fgMngr.getChart(window, 0, 0, ctype);
179 }
180
181 double _xmin = xmin;
182 double _xmax = xmax;
183 double _ymin = ymin;
184 double _ymax = ymax;
185 double _zmin = zmin;
186 double _zmax = zmax;
187 if (!exact) {
188 _xmin = step_round(_xmin, false);
189 _xmax = step_round(_xmax, true);
190 _ymin = step_round(_ymin, false);
191 _ymax = step_round(_ymax, true);
192 _zmin = step_round(_zmin, false);
193 _zmax = step_round(_zmax, true);
194 }
195
196 fgMngr.setChartAxesOverride(chart);
197 FG_CHECK(forgePlugin().fg_set_chart_axes_limits(
198 chart, _xmin, _xmax, _ymin, _ymax, _zmin, _zmax));
199 }
200 CATCHALL;
201 return AF_SUCCESS;
202}
203
204af_err af_set_axes_titles(const af_window window, const char* const xtitle,
205 const char* const ytitle, const char* const ztitle,

Callers 1

setAxesLimitsMethod · 0.50

Calls 3

step_roundFunction · 0.85
getChartMethod · 0.80
setChartAxesOverrideMethod · 0.80

Tested by

no test coverage detected