H
helpless_coder
Guest
You're probably confused by the title, it's a bit tricky to explain.
I'm drawing 3d squares at different distances, and I need a way to store all the information for each plane of the square.
So essentially I want to store planes in an array. These planes are defined by four points, in addition to the angle (possibly more).
Optimization wise,
should I create an instance of an object for each plane on the screen? (There are going to be a lot of them)
OR should I make a big string with comma separated values, and later split them into an array for each step.
Or possibly, something else.
Not sure what would be most performance costly, but I personally think the object method seems much cleaner. What do you guys think?
I'm drawing 3d squares at different distances, and I need a way to store all the information for each plane of the square.
So essentially I want to store planes in an array. These planes are defined by four points, in addition to the angle (possibly more).
Optimization wise,
should I create an instance of an object for each plane on the screen? (There are going to be a lot of them)
OR should I make a big string with comma separated values, and later split them into an array for each step.
Or possibly, something else.
Not sure what would be most performance costly, but I personally think the object method seems much cleaner. What do you guys think?