Triangulator library


#1

I have ported Nick Gravelyn’s Triangulator from XNA to Paradox Game Engine and made it available as a nuget package. Thought I’d share it here, maybe someone else can find it useful aswell.

In a nutshell, it’s a small library where you send a set of 2D points in and get data required to build vertex and index buffers out. You can also cut arbitrarily shaped holes into existing geometry which allows to create complex 2D shapes.

Link to original XNA project.
Link to ported Paradox project.

All credit to Nick Gravelyn!

A little side note: I must say that porting this from XNA was a blast! The entire process was really easy, didn’t really need any modifications and took less than an hour. It’s a great thing Paradox Game Engine has a similar API :wink:


#2

Can you please provide some more visual examples?


#3

Nice work, both Nick and yourself.


#4

Looks pretty cool, I thought I should point out however that you can’t build this project without having the original textures which appear to be missing.


#5

Thanks for pointing this out!! I assumed the texture was copied to RawAssets when I added it, but it seems it was linked instead from its original location. I’ll have this fixed asap.


#6

I currently don’t have any other means to demonstrate this than what can be seen from the original post. It might be interesting to see the wireframe version of this where you can see how the triangles are generated for shapes such as those.