Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create OSG shapes as polygons instead of triangles? #148

Open
ptlprg opened this issue Apr 29, 2019 · 1 comment
Open

Create OSG shapes as polygons instead of triangles? #148

ptlprg opened this issue Apr 29, 2019 · 1 comment

Comments

@ptlprg
Copy link

ptlprg commented Apr 29, 2019

Hi,

My app currently "untriangulate" the objects' meshsets to obtain one polygon for each face, but the process can take up to 2 seconds per object if the meshset is large (over 3200 triangles in this case).

My code could probably use some more optimization but I was wondering if there were a way to directly get the objects as polygonal faces instead of triangles.

I know I can render the edges instead, but I assume it's not always trivial to generate the faces from them either.

Thanks for the great work!

@ifcquery
Copy link
Owner

Hi,
take a look at the method computeCreaseEdgesFromMeshset(...)
It is very fast, takes only milliseconds for meshes of thousands of triangles. And it can be run in parallel easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants