Skip to content

Check winding order of input triangles #13

Open
@kylebarron

Description

@kylebarron

It looks like (py)martini creates a mesh with vertices (at least sometimes) in clockwise order, while the Quantized Mesh spec requires counter-clockwise winding order.

e.g. here are the first three 2D vertices, and it looks like they define a clockwise triangle

image

So I should add an option, probably True by default, that checks the input geometries and flips the order of indices if the triangle is in clockwise winding order.

It looks like it shouldn't actually be too slow to check, though it might be best in Cython... not sure if I can vectorize it easily

This might solve #9 , #11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions