Page 1 of 1

setEdgeIndices() bug

Posted: Mon 15. Dec 2008, 18:59
by gunn
Some of you may have been bitten by this bug. The following correct code led to an exception:

Code: Select all

double[][] verts = new double[3][3];
        int[][] ind = new int[1][2];
        IndexedLineSetFactory ilsf = new IndexedLineSetFactory();
        ilsf.setVertexCount(3);
        ilsf.setVertexCoordinates(verts);
        ilsf.setEdgeCount(1);
        ilsf.setEdgeIndices(ind);
        ind[0] = new int[4];
        ilsf.setEdgeIndices(ind);
        ilsf.update();
I think I've located the problem and fixed it. But if you notice funny things with IndexedLineSetFactory, please let me know.