Encoder DC motor direction?

Working on my camera slider project again and came across a product that allows the user to pose the mechanics and save the position to memory to call back later. I know they are using optical encoder dc motors from their spec sheet.

How does one of these types of motors know what direction it is rotating?

A quadrature encoder creates two signals that can be used to determine the direction of shaft rotation, as well as the amount of rotation.

may this link can help.