Example 5 In $\triangle A B C$, if $h_{a}+h_{b}+h_{c}=9 r$, where $h_{a} 、 h_{b} 、 h_{c}$ are the altitudes to the three sides, and $r$ is the radius of the inscribed circle of the triangle, determine the shape of the triangle.
Let the area of $\triangle ABC$ be $S$, then $h_{a}=\frac{2 S}{a}, h_{b}=\frac{2 S}{b}, h_{c}=\frac{2 S}{c}$,
and $S=\frac{1}{2}(a+b+c) r$, so $r=\frac{2 S}{a+b+c}$. Thus,
$$
\begin{array}{l}
h_{a}+h_{b}+h_{c}=9 r \Leftrightarrow 2 S\left(\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right)=9 \cdot \frac{2 S}{a+b+c} \\
\Leftrightarrow\left(\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right)(a+b+c)=9 \Leftrightarrow(a+b+c)(b c+c a+a b)=9 a b c \\
\Leftrightarrow a(b-c)^{2}+b(c-a)^{2}+c(a-b)^{2}=0 \\
\Leftrightarrow a=b=c .
\end{array}
$$

That is, $\triangle ABC$ is an equilateral triangle.