A direct kinematical derivation of the relativistic Sagnac effect for light or matter beams