Flip Vertices Array

Posted by James on Stack Overflow See other posts from Stack Overflow or by James
Published on 2011-03-17T07:35:35Z Indexed on 2011/03/17 8:09 UTC
Read the original article Hit count: 178

Filed under:
|
|
|

Hi, I have an array of position vertices that make up a 2D polygon.

        Vector2[] _chassisConcaveVertices =
        {
            new Vector2(5.122f, 0.572f),
            new Vector2(3.518f, 0.572f),
            new Vector2(3.458f, 0.169f),
            new Vector2(2.553f, 0.169f),
            new Vector2(2.013f, 0.414f),
            new Vector2(0.992f, 0.769f),
            new Vector2(0.992f, 1.363f),
            new Vector2(5.122f, 1.363f),
        };

What algorithm can I use to modify the positions so the resultant polygon is flipped? I need to flip the polygon both horizontally and vertically.

© Stack Overflow or respective owner

Related posts about c#

Related posts about algorithm