public FixtureDef(Shape shape, float density, float restitution, float friction, FilterData filter, bool isSensor = false, object userData = null) { _realShape = shape; UserData = userData; _internalFixture._friction = friction; _internalFixture._restitution = restitution; _internalFixture._density = density; Filter = filter; _internalFixture._isSensor = isSensor; }
public virtual bool ShouldCollide(Fixture fixtureA, Fixture fixtureB) { FilterData filterA = fixtureA.FilterData; FilterData filterB = fixtureB.FilterData; if (filterA.GroupIndex == filterB.GroupIndex && filterA.GroupIndex != 0) { return(filterA.GroupIndex > 0); } bool collide = (filterA.MaskBits & filterB.CategoryBits) != 0 && (filterA.CategoryBits & filterB.MaskBits) != 0; return(collide); }
public static extern void b2fixture_getfilterdata(IntPtr fixture, [Out][In] FilterData filterData);
public FilterDataInternal(FilterData data) { _filterData = data; }