Drawing an advance line

Started by zammbi, February 28, 2012, 09:54:32 PM

Previous topic - Next topic

EgonOlsen

I've updated the beta-jar with a method update(<SimpleVector[]>) in Polyline. You can update a line with any array of SimpleVectors which length is equals or lower than the one that was used to create the Polyline. The update performance isn't tweaked for performance, but it might be fast enough as it is. If it isn't, please let me know and i'll see if i can improve it slightly.

zammbi

Thanks Egon.

And I was right, work asked about animating the line. Which I just thought of an easy idea if you want to add it in :P Would save me from updating the points themselves.
A "setVisableLength(float length)" which could accept 0 to 1.0f. 0 meaning seeing nothing and 1 seeing 100% of the line.
It's not important atm, but would make animating the lines optimised/easier once I get to that.



EgonOlsen

I've updated the jar and added a method to Polyline called setPercentage(<float> [0..1]); It defines how much of the line is visible (0= nothing, 1=fully visible). Only full segments can be visible/invisible, i.e. if the line contains only one segment, everyhing below 1 will render it invisible.

zammbi

Awesome stuff. That will make things easier once I get to the animating of lines.