void expandVertices(int n) { float temp[] = new float[3 * n]; PApplet.arrayCopy(vertices, 0, temp, 0, 3 * vertexCount); vertices = temp; }
void expandTexCoords(int n) { float temp[] = new float[2 * n]; PApplet.arrayCopy(texcoords, 0, temp, 0, 2 * vertexCount); texcoords = temp; }
void expandStrokeWeights(int n) { float temp[] = new float[n]; PApplet.arrayCopy(strokeWeights, 0, temp, 0, vertexCount); strokeWeights = temp; }
void expandSpecular(int n) { int temp[] = new int[n]; PApplet.arrayCopy(specular, 0, temp, 0, vertexCount); specular = temp; }
void expandEmissive(int n) { int temp[] = new int[n]; PApplet.arrayCopy(emissive, 0, temp, 0, vertexCount); emissive = temp; }
void trimNormals() { float temp[] = new float[3 * vertexCount]; PApplet.arrayCopy(normals, 0, temp, 0, 3 * vertexCount); normals = temp; }
void trimSpecular() { int temp[] = new int[vertexCount]; PApplet.arrayCopy(specular, 0, temp, 0, vertexCount); specular = temp; }
void expandAmbient(int n) { int temp[] = new int[n]; PApplet.arrayCopy(ambient, 0, temp, 0, vertexCount); ambient = temp; }
void trimColors() { int temp[] = new int[vertexCount]; PApplet.arrayCopy(colors, 0, temp, 0, vertexCount); colors = temp; }
void trimStrokeColors() { int temp[] = new int[vertexCount]; PApplet.arrayCopy(strokeColors, 0, temp, 0, vertexCount); strokeColors = temp; }
void expandRawIndices(int n) { int temp[] = new int[n]; PApplet.arrayCopy(rawIndices, 0, temp, 0, rawSize); rawIndices = temp; }
void expandFloatAttribute(VertexAttribute attrib, int n) { float[] array = fpolyAttribs.get(attrib.name); float temp[] = new float[attrib.tessSize * n]; PApplet.arrayCopy(array, 0, temp, 0, attrib.tessSize * polyVertexCount); fpolyAttribs.put(attrib.name, temp); polyAttribBuffers.put(attrib.name, PGL.allocateFloatBuffer(temp)); }
void expandBoolAttribute(VertexAttribute attrib, int n) { byte[] array = bpolyAttribs.get(attrib.name); byte temp[] = new byte[attrib.tessSize * n]; PApplet.arrayCopy(array, 0, temp, 0, attrib.tessSize * polyVertexCount); bpolyAttribs.put(attrib.name, temp); polyAttribBuffers.put(attrib.name, PGL.allocateByteBuffer(temp)); }
void expandPolyIndices(int n) { short temp[] = new short[n]; PApplet.arrayCopy(polyIndices, 0, temp, 0, polyIndexCount); polyIndices = temp; polyIndicesBuffer = PGL.allocateShortBuffer(polyIndices); }
void expandPointIndices(int n) { short temp[] = new short[n]; PApplet.arrayCopy(pointIndices, 0, temp, 0, pointIndexCount); pointIndices = temp; pointIndicesBuffer = PGL.allocateShortBuffer(pointIndices); }
void trimPolyColors() { int temp[] = new int[polyVertexCount]; PApplet.arrayCopy(polyColors, 0, temp, 0, polyVertexCount); polyColors = temp; polyColorsBuffer = PGL.allocateIntBuffer(polyColors); }
void trimPolySpecular() { int temp[] = new int[polyVertexCount]; PApplet.arrayCopy(polySpecular, 0, temp, 0, polyVertexCount); polySpecular = temp; polySpecularBuffer = PGL.allocateIntBuffer(polySpecular); }
void trimLineColors() { int temp[] = new int[lineVertexCount]; PApplet.arrayCopy(lineColors, 0, temp, 0, lineVertexCount); lineColors = temp; lineColorsBuffer = PGL.allocateIntBuffer(lineColors); }
void trimPolyVertices() { float temp[] = new float[4 * polyVertexCount]; PApplet.arrayCopy(polyVertices, 0, temp, 0, 4 * polyVertexCount); polyVertices = temp; polyVerticesBuffer = PGL.allocateFloatBuffer(polyVertices); }
void trimLineDirections() { float temp[] = new float[4 * lineVertexCount]; PApplet.arrayCopy(lineDirections, 0, temp, 0, 4 * lineVertexCount); lineDirections = temp; lineDirectionsBuffer = PGL.allocateFloatBuffer(lineDirections); }