Fixed the '1st pass' flag check for the draw loop. Previously was trying to draw at negative infinity
- this *may* have been the reason this routine appeared to occaionally crash the emulator
Modified the draw so it only draws lines which are partially or completely on-screen
This routine is now optimal as far as minimising draw goes
- first cull based on limits of entire track
- second cull on per-segment basis based on screen visibility
Sitations with low point-counts may have been problematic. Now, 0, 1 and 2 point arrays are explicitly handled.
Added a copy constructor to WptPt to allow copies to be made, rather than returning original array.
Cases where no data is returned always returns a zero-sized array rather than a null array.
Just occurred to me that when zooming out (away) then the culled line we have is suitable for display. Previously when
zooming in or out, the culled line was discarded and the original line was drawn. That was to prevent you seeing really
low-resolution stuff while you wait for the asynchroous line cull to finish (can be in the order of several seconds).
However, with this modification, that is now only done when you are zooming in. This improves dramatically the "busy"
look when too much stuff is drawn for the given resolution. Anyway, simple fix but great effect. :P
This gives a simple GPX track that is drawn with asynchronous point reduction to improve the speed of display.
Also, the simple region-based culling gets rid of entire tracks from the draw pipeline for further sppedups.
Reworked all the renderers to be much more object oriented.
Got the sample arrow and conveyor renderers working
Tracked down a few bugs - particularly one still there - TrkSegment with 0 points!
This in my opinion should never happen - it's coming in from "outside" to my code.