distribution.add(new Triangle(x1, y1, z1, x2, y2, z2, x3, y3, z3), area); float x1 = vertices[p1Offset], y1 = vertices[p1Offset + 1], z1 = vertices[p1Offset + 2], x2 = vertices[p2Offset], y2 = vertices[p2Offset + 1], z2 = vertices[p2Offset + 2], x3 = vertices[p3Offset], y3 = vertices[p3Offset + 1], z3 = vertices[p3Offset + 2]; float area = Math.abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2f); distribution.add(new Triangle(x1, y1, z1, x2, y2, z2, x3, y3, z3), area);
distribution.add(new Triangle(x1, y1, z1, x2, y2, z2, x3, y3, z3), area); float x1 = vertices[p1Offset], y1 = vertices[p1Offset + 1], z1 = vertices[p1Offset + 2], x2 = vertices[p2Offset], y2 = vertices[p2Offset + 1], z2 = vertices[p2Offset + 2], x3 = vertices[p3Offset], y3 = vertices[p3Offset + 1], z3 = vertices[p3Offset + 2]; float area = Math.abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2f); distribution.add(new Triangle(x1, y1, z1, x2, y2, z2, x3, y3, z3), area);
distribution.add(new Triangle(x1, y1, z1, x2, y2, z2, x3, y3, z3), area); float x1 = vertices[p1Offset], y1 = vertices[p1Offset + 1], z1 = vertices[p1Offset + 2], x2 = vertices[p2Offset], y2 = vertices[p2Offset + 1], z2 = vertices[p2Offset + 2], x3 = vertices[p3Offset], y3 = vertices[p3Offset + 1], z3 = vertices[p3Offset + 2]; float area = Math.abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2f); distribution.add(new Triangle(x1, y1, z1, x2, y2, z2, x3, y3, z3), area);