PolygonCreationAssistance in FP 3

Topics: Developer Forum
Nov 8, 2010 at 8:45 PM

Hi all,

I'm porting the code for generating polygons from textures from my old engine to Farseer 3.0.

1st question: is the PolygonCreationAssistance class still recommended use for Farseer 3.0 texture to vertices?

2nd question: the property HoleDetectionLineStepSize seems to have been changed to have a private setter. Is there a particular reason? I checked all references and apparently it's still used but the only write-access is in the constructor where it is set to 1. Does this mean it's supposed to be fixed now?

Thanks again,


Nov 8, 2010 at 11:25 PM

I ended up figuring it out myself, sorry :-)

So basically you have to use PolygonTools.CreatePolygon(), scale the polygon to meters and then use one of the decomposers to get it to be a convex shape.

I ended up writing a content processor to do all this, as most of my textures are statically determined anyway and using a processor saves all the work from creating these in runtime. Would this be interesting for the engine or for anyone? I can post it somewhere if anyone finds it useful.



Nov 9, 2010 at 3:29 PM

I figured that no one used HoleDetectionLineStepSize - if you use it, I will make it public again.

Nov 9, 2010 at 4:52 PM

Actually I never used it, but since I made the custom content processor I included all available options at the time. For me it's fine if the property disappears, since I'm doing hole detection mostly offline anyway so I always want the step to be 1 really.