Generate a mask for the given direction. Examples:
The direction to generate the mask.
Returns the mask.
Generate a mask for the given direction. Examples: