BEPUutilities2.ConvexHullHelper.VerifyWindings C# (CSharp) Method

VerifyWindings() private static method

private static VerifyWindings ( QuickList &newIndices, QuickList &points, Vector3 &centroid ) : void
newIndices QuickList
points QuickList
centroid Vector3
return void
        private static void VerifyWindings(ref QuickList<int> newIndices, ref QuickList<Vector3> points, ref Vector3 centroid)
        {
            //Go through every triangle.
            for (int k = 0; k < newIndices.Count; k += 3)
            {
                //Check if the triangle faces away or towards the centroid.

                if (IsTriangleVisibleFromPoint(ref newIndices, ref points, k, ref centroid))
                {
                    //If it's towards, flip the winding.
                    int temp = newIndices[k + 1];
                    newIndices[k + 1] = newIndices[k + 2];
                    newIndices[k + 2] = temp;
                }
            }
        }