Literally, it means the gaze had spun and spin. However, the gaze doesn't have to be spinning around.
It another way of saying the cogs in the mind are turning.
目光 = gaze
转 = turn/spin/circle
了 = a past tense marker in this case
Best way of understanding this phrase is imagine that you are a detective. You are stuck, so you got to look around to get clues and come up with ideas.