Advertisement

question: different dimensional arrays?

Started by October 12, 2003 08:48 AM
0 comments, last by norleaf 21 years, 4 months ago
Hi all, hope this isn´t the wrong place... then plz point me in the right direction... I wonder if I can take a simple layer out of an 3 dimensional array and store it in a 2d array... I have no idea what the code should look like unless I copy one number at a time... something like : my2dArray[x][y] = my3dArray[x][y][3]; but this works only if inside two for-loops running through numbers x and y... but isn´t there any smarter solution?] [edited by - norleaf on October 12, 2003 11:33:14 AM]
--------------------------------------------------------------What's the problem? I don't got a problem, I got fuckin' problems! plurum!-Tim Roth, Four Rooms
using Array3D[128][128][128] - to get a 128x128 slice do:

memcpy(Array3D[slicex], Array2D, 128x128);



[ My Site ]
''I wish life was not so short,'' he thought. ''Languages take such a time, and so do all the things one wants to know about.'' - J.R.R Tolkien
/*ilici*/

This topic is closed to new replies.

Advertisement