code: public double z(double[] xyz) {
          return cosPhi * sinTheta * xyz[1] + sinPhi * xyz[2] + cosPhi * cosTheta * xyz[0];
      }
docs: Returns z-axis value in the camera coordinates.
  @param xyz the world coordinates.
  @return z-axis value in the camera coordinates.