Help with arrays.
Hi, say for example you have a cube and you divide each cube into different sections, or into smaller cubes. Each small cube can start off the same color, is it possible to figure out which array element the block is, for example...
say i have something like this
int front[4][1]= {{RED},{RED},{RED},{RED}};
that just says the front of the cube has for smaller squares in it. And each starts off red, how can i find out which element is which when it is displayed on the screen, I want to do some translations with it using opengl, the translations aren''t a problem, I just need to figure out which one to translate, if this isn''t stated clear enough i will try and make it more clear if someone asks. Thanks in advance.
explain a little better... I''m not shure that I''m getting what you mean by finding it... do you mean mouse click to the poloygon or what?
The Great Milenko"Don't stick a pretzel up your ass, it might get stuck in there.""Computer Programming is findding the right wrench to hammer in the correct screw."
OK, i''m not talking about mouse clicks or anything, i just want to find the location in the array that each piece is, like i want to know which block is the upper left hand cube in the array. If it''s [2][1] or whatever, i just want to know how i can figure this out.
Your array looks more like a line than a cube, since it''s [4][1].
I''d imagine that the lower elements are, the farther to the upper left. Does that sound sound right?
-Forcas
"Elvis is alive. He is Barney the purple dinosaur. He is the pied piper that leads our children into the wages of sin and eternal damnation."
I''d imagine that the lower elements are, the farther to the upper left. Does that sound sound right?
-Forcas
"Elvis is alive. He is Barney the purple dinosaur. He is the pied piper that leads our children into the wages of sin and eternal damnation."
-Forcaswriteln("Does this actually work?");
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement