Exemplo n.º 1
0
        public static Body CreateLoopShape(World world, Vertices vertices, TSVector2 position, object userData = null)
        {
            Body body = CreateBody(world, position);

            FixtureFactory.AttachLoopShape(vertices, body, userData);
            return(body);
        }
Exemplo n.º 2
0
        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));
        }