***** NOT A TEACHER *****
(1) You said you would appreciate all replies, so ...
(2) First, I may be (and probably am) wrong, but I feel that the
original English sentence is incorrect. I feel that it should
read something like:
Luc had seen him twice at school just yesterday, having passed him
while walking between classes.
(3) My interpretation:
(a) Luc was walking from, say, English class to math class.
(b) While Luc was doing that, Luc passed him.
(I do not know the gender of Luc, so I didn't use any pronouns.)