MarchingSquares
Declaration
public static class tainicom.Aether.Physics2D.Common.TextureTools.MarchingSquares
Methods
DetectSquares static
Marching squares over the given domain using the mesh defined via the dimensions (wid,hei) to build a set of polygons such that f(x,y) less than 0, using the given number 'bin' for recursive linear inteprolation along cell boundaries. if 'comb' is true, then the polygons will also be composited into larger possible concave polygons.
List<Vertices> DetectSquares(AABB domain, float cellWidth, float cellHeight, sbyte[,] f, int lerpCount, bool combine)
Parameters:
| Name | Type | Description |
|---|---|---|
domain |
tainicom.Aether.Physics2D.Collision.AABB |
|
cellWidth |
System.Single |
|
cellHeight |
System.Single |
|
f |
System.SByte[,] |
|
lerpCount |
System.Int32 |
|
combine |
System.Boolean |