"EnTerr" wrote:
How do you imagine referencing a specific Point in a roList?
If roList is indeed a linked list, using [ ] should be extremely slow.
I've heard, “It's better to keep your mouth shut and appear stupid than open it and remove all doubt” ― Mark Twain ( Mark Twain?! Really? )
Anyway, ignoring that sage's advice... *ahem* ... If the Master List had all the points that objects could reference... and said objects were comprised of triangles that used roArray's could they access the same memory location? If so, wouldn't they access those address faster? We wouldn't be moving over the Master List's roList each time thru the loop, we'd be cycling over each Object's points -- aha! another gotcha! -- Not each Triangle's points as they share vertices with other Triangles in the same object!
The point being is to not duplicate points in memory and not do repeated calculations on the same point multiple times ( Think about the poles of a disco ball made out of triangles ).
This is probably all moot anyway as I'm not sure how big "our" 3D universe can be on a Roku. ( I still stand by my belief 2 spinning triangles is possible on a Roku 2XS in BrightScript.) I'm close, so very close!
FWIW, my other example, Master roList of Strings, isn't as time constrained and I'm hoping to keep an entire history of the game's session. Duplicating this would be much more likely to run into memory issues, I'd think, but I'm not sure. Furthermore, roArray's need contiguous memory, right?
Regardless, we don't want memory thrashing or garbage collection going on during the "action."
peace & 42