public final void processPoint(final double x, final double y, final double z, final double w) { if (pointShader == null) return; VecMat.transform(matrix, x, y, z, w, point0, 0); VecMat.transformUnNormalized(matrix, 0, 0, pointRadius, normal0, 0); double[] mat = matrix; double[] tmat = inverseTransposeMatrix; matrix = substMatrix; double d = 1 - outlineFraction; // inner point : double l = VecMat.norm(normal0); VecMat.assignScale(matrix, l * d); matrix[4 * 0 + 3] = point0[0]; matrix[4 * 1 + 3] = point0[1]; matrix[4 * 2 + 3] = point0[2] + pointRadius; Rn.transpose(inverseTransposeMatrix, matrix); Rn.inverse(inverseTransposeMatrix, inverseTransposeMatrix); shader = pointShader.getCoreShader(); computeArray(pointVertices, pointIndices, zNormal, pointNormals); // outline : if (outlineFraction > 0 /*&& pointShader!= null*/) { shader = pointShader.getOutlineShader(); d = 1 / d; for (int i = 0; i < 24; i += 3) { pointVertices[24 + i] = pointVertices[i] * d; pointVertices[25 + i] = pointVertices[i + 1] * d; pointVertices[26 + i] = -d; } for (int i = 0; i < 8; i++) { computeArray(pointVertices, pointOutlineIndices[i], zNormal, pointOutlineNormals[i]); } } // reset the matrix: matrix = mat; inverseTransposeMatrix = tmat; }