on-internet
← Community

ALL_CATEGORIES() vs ALL_MASKS() in pymunk.ShapeFilter

Stack Overflow ·

pymunk.ShapeFilter has two staticmethods: ALL_CATEGORIES() and ALL_MASKS(). They aren't explained in the docs, so I visited their source: class ShapeFilter(NamedTuple): <snip> @staticmethod def ALL_MASKS() -> int: return 0xFFFFFFFF @staticmethod def ALL_CATEGORIES() -> int: return 0xFFFFFFFF They both return 0xFFFFFFFF. What's the difference between these two statics? When should I use each? Note: the docs include a code example containing ALL_MASKS(). Snippet: filter = pymunk.ShapeFilter(mask=pymunk.ShapeFilter.ALL_MASKS() ^ 0b1)

Comments

Sign in or sign up to comment and upvote.

No comments yet.