MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / copy

Method copy

Samples/NiSimpleViewer/glh/glh_array.h:236–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234
235
236 void copy(const array3<T> & src,
237 int i_offset = 0, int j_offset = 0, int k_offset = 0,
238 int width = 0, int height = 0, int depth = 0)
239 {
240
241 int io = i_offset;
242 int jo = j_offset;
243 int ko = k_offset;
244
245 if(width == 0)
246 width = src.get_width();
247 if(height == 0)
248 height = src.get_height();
249 if(depth == 0)
250 depth = src.get_depth();
251
252 if(io + width > w || jo + height > h || ko + depth > d)
253 return;
254
255 for(int i=0; i < width; i++)
256 for(int j=0; j < height; j++)
257 for(int k=0; k < depth; k++)
258 (*this)(io+i, jo+j, ko+k) = src(i,j,k);
259 }
260
261
262

Callers

nothing calls this directly

Calls 3

get_widthMethod · 0.45
get_heightMethod · 0.45
get_depthMethod · 0.45

Tested by

no test coverage detected