102103104105106107108109110111112
VectorXYZ toAfter = vAfter.subtract(vAt); if (triangle % 2 == 0 || fan) { normals[i+1] = toBefore.crossNormalized(toAfter); } else { normals[i+1] = toAfter.crossNormalized(toBefore); } } normals[0] = normals[2];
6364656667686970717273
private void setLookAt(VectorXYZ lookAt) { this.lookAt = lookAt; VectorXYZ right = getRight(); up = right.crossNormalized(getViewDirection()); } private void setLookAt(double x, double y, double z) { this.setLookAt(new VectorXYZ(x, y, z)); }