// Relie deux points en prenant leurs position en paramètre public void LinkTwoPoints(Vector3 A, Vector3 B) { HalfEdge firstPreviousA = FirstDartByPoint(A); HalfEdge firstPreviousB = FirstDartByPoint(B); //Debug.Log("fpA, fpB : " + firstPreviousA + " " + firstPreviousB); if (!firstPreviousA.IsDegenerated() && !firstPreviousB.IsDegenerated()) // si aucuns des points ne sont dégénérés { HalfEdge previousA = ComputePreviousDart(firstPreviousA, A, B); HalfEdge previousB = ComputePreviousDart(firstPreviousB, B, A); AddEdge(previousA, previousB, A, B); } else if (!firstPreviousA.IsDegenerated() && firstPreviousB.IsDegenerated()) // si le point B est dégénéré { HalfEdge previousA = ComputePreviousDart(firstPreviousA, A, B); LinkDegeneratedDart(previousA, firstPreviousB); } else if (firstPreviousA.IsDegenerated() && !firstPreviousB.IsDegenerated()) // si le point A est dégénéré { HalfEdge previousB = ComputePreviousDart(firstPreviousB, B, A); LinkDegeneratedDart(previousB, firstPreviousA); } else { LinkTwoDegeneratedDarts(firstPreviousA, firstPreviousB); } // TODO - faire la condition des deux points dégénérés }