I have a list of Vector() objects
pointList =
[(1688, 25), (1349.75, 25), (1349.75, 395), (1688, 395), (900, 395),
(900, 25), (450.25, 25), (450.25, 395), (8, 395), (8, 25)]
and I would like to orginize them in an array of array of objects which first index correspond to line and second index correspont to column
matrix = [];
matrix[0] = [(8, 25), (450.25, 25), (900, 25), (1349.75, 25), (1688, 25)]
matrix[1] = [(8, 395), (450.25, 395), (900, 395), (1349.75, 395), (1688, 395)]
matrix[2] = [...]
and so on
The point list Vector() object come from here
var pointList = new Array();
for (var i = 0; i < getNumberOfCyclePoints(); ++i) {
pointList.push(getCyclePoint(i));
}
getNumberOfCyclePoints() return me int with the total number of points getCyclePoint(int) return me a Vector() objects