tmpVec.normalizeLocal(); lightData.setVector4InArray(tmpVec.getX(), tmpVec.getY(), tmpVec.getZ(), spotAngleCos, lightDataIndex); lightDataIndex++;
public Vector4f project(Vector4f other){ float n = this.dot(other); // A . B float d = other.lengthSquared(); // |B|^2 return new Vector4f(other).normalizeLocal().multLocal(n/d); }
tmpVec.normalizeLocal(); lightData.setVector4InArray(tmpVec.getX(), tmpVec.getY(), tmpVec.getZ(), spotAngleCos, lightDataIndex); lightDataIndex++;