Hello everybody, I think I need some coaching with the handling of the libGDX Array. I play around for more understanding with the pathTest. Its a class which demonstrate how to use splines with libGDX. (by XOPPA)
Among other things there is an array like this:
Array<Path<Vector2>> paths = new Array<Path<Vector2>>();
paths.add(new Bezier<Vector2>(new Vector2(0,0), new Vector2(w, 0), new Vector2(0, h), new Vector2(w, h)));
For my part it could be also in this way:
Array<Vector2> vec = new Array<Vector>();
vec.add(new Vector2(110,110));
The first one is an array of a bezier pathes, the second one an array of vectors. The question is how can I reach and manipulate the values of the inner elements. Do I have to create everytime a complete new Vector2 object like this:
vec.set(0, new Vector2(120f,120f);
or how can I manipulate only one value from the vector? Same question for the first construct above with the path array. How can I manipulate only one value from the path element in the array?
Sorry for cumbersome explanation…and thank you for your helpfulness