Filter class
class Filter { /** * Collision category bits. */ int categoryBits; /** * Collision mask bits. These are the categories that this shape would accept * for collision. */ int maskBits; /** * Collision groups allow a certain group of objects to never collide * (negative) or always collide (positive). A groupIndex value of 0 means no * collision group. */ int groupIndex; /** * Constructs a new filter with everything set to 0. */ Filter() : categoryBits = 0, maskBits = 0, groupIndex = 0 { } /** * Constructs a new Filter that is a copy of the other filter. */ Filter.copy(Filter other) : categoryBits = other.categoryBits, maskBits = other.maskBits, groupIndex = other.groupIndex { } /** * Sets this filter equal to the given filter. */ void setFrom(Filter other) { categoryBits = other.categoryBits; maskBits = other.maskBits; groupIndex = other.groupIndex; } }
Constructors
new Filter() #
Constructs a new filter with everything set to 0.
Filter() : categoryBits = 0, maskBits = 0, groupIndex = 0 { }