14. august 2001 - 08:59Der er
4 kommentarer og 1 løsning
Problems with LineStripArray
Hello!
I try to create an LineStripArray like: LineStripArray lineStripArray = new LineStripArray(size, GeometryArray.COORDINATES | GeometryArray.COLOR_3, new int[size]); But I only get this: java.lang.IllegalArgumentException: Illegal stripVertexCounts
size is 360 for a circle, I can\'t get this to work!!.
public LineStripArray(int vertexCount, int vertexFormat, int[] stripVertexCounts) Throws: java.lang.IllegalArgumentException - if vertexCount is less than 2 or the sum of all stripVertexCounts is not equal to vertexCount
Hello! Yes, I have read it, but as a see it if: vertexCount = 360, stripVertexCounts = int[360] stripVertexCounts Then: vertexCount is NOT less than 2 AND stripVertexCounts is equal to vertexCount! Or am I wrong?
Isn\'t the sum of all stripVertexCounts same as stripVertexCounts.length()???
The problem was that they (of course) refer to the value inside the array, like: int[] stripVertexCounts = new int[size/2]; for(int h = 0; h < size/2; h++) { stripVertexCounts[h] = 2; } LineStripArray lineStripArray = new LineStripArray(size, LineStripArray.COORDINATES| LineStripArray.COLOR_3, stripVertexCounts);
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.