CallCombine() public method

public CallCombine ( double v0, double v1, double v2, int data4, double weight4, int &outData ) : void
v0 double
v1 double
v2 double
data4 int
weight4 double
outData int
return void
Esempio n. 1
0
 static void CallCombine(Tesselator tess, ContourVertex intersectionVertex, int[] vertexIndexArray, double[] vertexWeights, bool needed)
 {
     /* Copy coord data in case the callback changes it. */
     double c0 = intersectionVertex.C_0;
     double c1 = intersectionVertex.C_1;
     double c2 = intersectionVertex.C_2;
     intersectionVertex.clientIndex = 0;
     tess.CallCombine(c0, c1, c2, vertexIndexArray, vertexWeights, out intersectionVertex.clientIndex);
     if (intersectionVertex.clientIndex == 0)
     {
         if (!needed)
         {
             intersectionVertex.clientIndex = vertexIndexArray[0];
         }
         else
         {
             /* The only fatal error is when two edges are found to intersect,
              * but the user has not provided the callback necessary to handle
              * generated intersection points.
              */
             throw new Exception("You need to provided a callback to handle generated intersection points.");
         }
     }
 }