Example 7 In a cube, among the 8 vertices, the midpoints of the 12 edges, the centers of the 6 faces, and the center of the cube, a total of 27 points, the number of groups of three collinear points is ( ).
(A) 57
(B) 49
(C) 43
(D) 37
(1998, National High School Competition)
Solution: Classify and discuss the collinear three-point groups according to the different situations of the two endpoints as follows:
(1) The number of collinear three-point groups with both endpoints being vertices is
$$
\frac{8 \times 7}{2}=28 \text { (groups); }
$$
(2) The number of collinear three-point groups with both endpoints being the centers of faces is
$$
\frac{6 \times 1}{2}=3 \text { (groups); }
$$
(3) The number of collinear three-point groups with both endpoints being the midpoints of edges is
$$
\frac{12 \times 3}{2}=18 \text { (groups); }
$$

And there are no other types of collinear three-point groups.
Therefore, the total number is $28+3+18=49$ (groups).
Hence, the answer is (B).