Example 6. Let the three sides of $\triangle A B C$ be $a, b, c$ with opposite angles $A, B, C$, respectively, and satisfy the condition $a \cos A+b \cos B=c \cos C$. Then $\triangle A B C$ must be ( ).
(A) an equilateral triangle
(B) a right triangle with $a$ as the hypotenuse
(C) a right triangle with $b$ as the hypotenuse
(D) none of the above (A), (B), (C) is correct.
This is a problem from the 1983 Shanghai Junior High School Mathematics Competition, and book [7] uses it as an example of the application of the cosine rule, converting the condition in the problem into a relationship between the three sides using the cosine rule, and then simplifying it to make a judgment.