A method of scanning a surface, comprising - transmitting, by means of a light source, a light beam to the surface to be scanned; - receiving a light beam reflected on the surface by a system for receiving a light beam comprising a pixelated light switch array being a Digital Micromirror Device, DMD, and an array of light sensors, the array of light sensors being photodiode sensors; the pixelated light switch array comprising a higher number of switches than the number of light sensors comprised in the array of light sensors; said method of receiving a light beam comprising, for each switch of said pixelated light switch array: - receiving at least one portion of the light beam reflected by the surface to be scanned at the pixelated light switch array; - deflecting the received portion of the light beam towards said array of light sensors, by deflecting a selected micromirror of the pixelated light switch array; - determining the time of flight value of each received portion of light beam; - determining a distance-related parameter for each received portion of the light beam taking into account its determined time of flight value; - wherein the determined distance-related parameter of each portion of the light beam is indicative of a spatial point of the scanned surface; characterized in that - when a switch of the pixelated light switch array is not in use, it deflects its corresponding incoming portion of light beam towards a dump element. - transmitting, by means of a light source, a light beam to the surface to be scanned; - receiving a light beam reflected on the surface by a system for receiving a light beam comprising a pixelated light switch array being a Digital Micromirror Device, DMD, and an array of light sensors, the array of light sensors being photodiode sensors; the pixelated light switch array comprising a higher number of switches than the number of light sensors comprised in the array of light sensors; said method of receiving a light beam comprising, for each switch of said pixelated light switch array: - receiving at least one portion of the light beam reflected by the surface to be scanned at the pixelated light switch array; - deflecting the received portion of the light beam towards said array of light sensors, by deflecting a selected micromirror of the pixelated light switch array; - determining the time of flight value of each received portion of light beam; - determining a distance-related parameter for each received portion of the light beam taking into account its determined time of flight value; - wherein the determined distance-related parameter of each portion of the light beam is indicative of a spatial point of the scanned surface; - receiving at least one portion of the light beam reflected by the surface to be scanned at the pixelated light switch array; - deflecting the received portion of the light beam towards said array of light sensors, by deflecting a selected micromirror of the pixelated light switch array; - determining the time of flight value of each received portion of light beam; - determining a distance-related parameter for each received portion of the light beam taking into account its determined time of flight value; - wherein the determined distance-related parameter of each portion of the light beam is indicative of a spatial point of the scanned surface; characterized in that - when a switch of the pixelated light switch array is not in use, it deflects its corresponding incoming portion of light beam towards a dump element. - when a switch of the pixelated light switch array is not in use, it deflects its corresponding incoming portion of light beam towards a dump element.