I am writing some code to generate filled (extruded) shapes from PostScript path info (essentially 3D strokes). I have it mostly working, but I am getting odd results
out of the tesellator. I suspect it is the combine callback code. It is not at all obvious to me what the combine method is supposed to do, exactly. My code looks like this:
public void combine(double[] coords, Object[] data, float[] weight, Object[] outData)
{
System.out.println(“Combine called!”);
double newData[] = new double[6];
newData[0] = coords[0];
newData[1] = coords[1];
newData[2] = coords[2];
for ( int i=3; i<6; i++ )
{
newData[i] = 0;
for ( int j=0; j<4; j++ )
{
newData[i] += weight[j] * Array.getDouble(data[j],i-3);
}
}
outData[0] = newData;
}
This doesn’t generate any errors, but I do get some odd tessellation results (missing bits) so it may not be correct. I didn’t find much about it on the web and much of that is obviously wrong. Any suggestions would be appreciated. TIA.