| 1258 | |
| 1259 | |
| 1260 | public void bezierVertex(float x2, float y2, |
| 1261 | float x3, float y3, |
| 1262 | float x4, float y4) { |
| 1263 | if (vertices == null) { |
| 1264 | vertices = new float[10][]; |
| 1265 | } else if (vertexCount + 2 >= vertices.length) { |
| 1266 | vertices = (float[][]) PApplet.expand(vertices); |
| 1267 | } |
| 1268 | vertices[vertexCount++] = new float[] { x2, y2 }; |
| 1269 | vertices[vertexCount++] = new float[] { x3, y3 }; |
| 1270 | vertices[vertexCount++] = new float[] { x4, y4 }; |
| 1271 | |
| 1272 | // vertexCodes must be allocated because a vertex() call is required |
| 1273 | if (vertexCodes.length == vertexCodeCount) { |
| 1274 | vertexCodes = PApplet.expand(vertexCodes); |
| 1275 | } |
| 1276 | vertexCodes[vertexCodeCount++] = BEZIER_VERTEX; |
| 1277 | |
| 1278 | if (x4 > width) { |
| 1279 | width = x4; |
| 1280 | } |
| 1281 | if (y4 > height) { |
| 1282 | height = y4; |
| 1283 | } |
| 1284 | } |
| 1285 | |
| 1286 | |
| 1287 | public void bezierVertex(float x2, float y2, float z2, |