15
01/2012

Shape Designer

Written by arthur

Today I am going to show you one other tool I worked on for my physics engine. It's called ShapeDesigner, mainly because it helps to design shapes (really?!) or collision geometry for the engine. Well, I could have done it with triangulation from an image. But all geometry would have been made of triangles whereas circles save a lot of resources and increase accuracy.

shape designer

So here I am with this tool. It allows to load an image, and then we can draw all basics shapes (such as circle, triangle or quad), and export it in a compliant xml format for the physics engine.

<shape name="bloc_18.png">
  <triangle x1="0" y1="64" x2="0" y2="28" x3="55" y3="64" />
  <circle x="31" y="32" radius="31" />
  <triangle x1="55" y1="64" x2="62" y2="37" x3="0" y3="28" />
</shape>

You can also take a look at the code (it was made with visual studio 2010, in C#) if you want to fork it.

Classified in : Tools - Tags : iphone, opengl, C#, windows, atlas, packer

1 comment

saturday 20 april 2013 @ 14:06 gå hit said : #1

Tack. Jag har letat efter användbara råd om denna kod.

Write a comment

What is the third letter of the word cjaw? :