public static Body CreateChainShape(World world, Vertices vertices, TSVector2 position, object userData = null) { Body body = CreateBody(world, position); FixtureFactory.AttachChainShape(vertices, body, userData); return(body); }
public static Fixture AttachLineArc(FP radians, int sides, FP radius, TSVector2 position, FP angle, bool closed, Body body) { Vertices vertices = PolygonTools.CreateArc(radians, sides, radius); vertices.Rotate((MathHelper.Pi - radians) / 2 + angle); vertices.Translate(ref position); return(closed ? FixtureFactory.AttachLoopShape(vertices, body, null) : FixtureFactory.AttachChainShape(vertices, body, null)); }