Ejemplo n.º 1
0
        public Fixture AddCollisionLoopShape(CollisionDefinitionEntry entry)
        {
            Vertices verts = new Vertices();

            foreach (var point in entry.Vertices)
            {
                verts.Add(ConvertUnits.ToSimUnits(point));
            }
            return(FixtureFactory.AttachLoopShape(verts, m_body));
        }
Ejemplo n.º 2
0
        public void AddCollisionPolygon(CollisionDefinitionEntry entry)
        {
            var path = new Path();

            foreach (var point in entry.Vertices)
            {
                path.Add(ConvertUnits.ToSimUnits(point));
            }
            path.Closed = true;

            PathManager.ConvertPathToPolygon(path, m_body, 0, entry.Vertices.Length);
        }