setEdgeIndices() bug

Found a bug? Post here.
Post Reply
User avatar
gunn
Posts: 323
Joined: Thu 14. Dec 2006, 09:56
Location: TU Berlin
Contact:

setEdgeIndices() bug

Post by gunn » Mon 15. Dec 2008, 18:59

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.
jReality core developer

Post Reply