public override void ApplyPolygonList(List <DTPolygon> dtPolygonList)
        {
            if (dtPolygon == dtPolygonList[0])
            {
                return;
            }
            dtPolygon = dtPolygonList[0];

            DTProfilerMarkers.Triangulation.Begin();
            DTMesh triMesh = GetTriangulator().PolygonToMesh(dtPolygon);

            DTProfilerMarkers.Triangulation.End();

            DTConvexPolygroup triPolygroup = triMesh.ToPolygroup();

            // Collider from polygon
            DTProfilerMarkers.HertelMehlhorn.Begin();
            DTConvexPolygroup hmPolygroup = HertelMehlhorn.PolyPartitionHM.Instance.ExecuteToPolygroup(triPolygroup);

            DTProfilerMarkers.HertelMehlhorn.End();

            DTProfilerMarkers.ApplyCollider.Begin();
            ApplyCollider(hmPolygroup);
            DTProfilerMarkers.ApplyCollider.End();

            // Create mesh from triangulated polygon
            ApplyRenderMesh(triMesh);
        }
Example #2
0
 public DTConvexPolygroup ExecuteToPolygroup(DTMesh input)
 {
     return(ExecuteToPolygroup(input.ToPolygroup()));
 }
Example #3
0
 public DTMesh ExecuteToMesh(DTMesh input)
 {
     return(ExecuteToMesh(input.ToPolygroup()));
 }