public static boolean isValidVector(Vector4f vector) {
      if (vector == null) return false;
      if (Float.isNaN(vector.x) ||
          Float.isNaN(vector.y) ||
          Float.isNaN(vector.z)||
          Float.isNaN(vector.w)) return false;
      if (Float.isInfinite(vector.x) ||
          Float.isInfinite(vector.y) ||
          Float.isInfinite(vector.z) ||
          Float.isInfinite(vector.w)) return false;
      return true;
    }