public MorphologyCraterCallback(VertexShaderCrater vShaderCrater) { p1 = new polynomial(); p2 = new polynomial(); g = new gaussian(); mVShaderCrater = vShaderCrater; }
// this should only be a casting, but c# sucks! public static void convertToFloatArray(float x,float y, polynomial mP1,polynomial mP2, gaussian mG,ref float[] o) { // float[] if(o==null) o = new float[21]; o[0] = 0; o[1] = x; o[2] = y; o[3] = mP1.min; o[4] = mP1.max; o[5] = mP1.w0; o[6] = mP1.w1; o[7] = mP1.w2; o[8] = mP1.w3; // second poly o[9] = mP2.min; o[10] = mP2.max; o[11] = mP2.w0; o[12] = mP2.w1; o[13] = mP2.w2; o[14] = mP2.w3; // first gaussian o[15] = mG.min ; o[16] = mG.max ; o[17] = mG.mean; o[18] = mG.sigma; o[19] = mG.h ; o[20] = mG.hs ; //return o; }
public void updatePolinomial(polynomial p1,polynomial p2,gaussian g) { mP1 = p1; mP2 = p2; mG = g; // SetFloat ("radious", p2.max); }