--- ray/src/cv/bsdfmesh.c 2014/03/12 00:39:43 2.23 +++ ray/src/cv/bsdfmesh.c 2014/03/24 06:07:46 2.25 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: bsdfmesh.c,v 2.23 2014/03/12 00:39:43 greg Exp $"; +static const char RCSid[] = "$Id: bsdfmesh.c,v 2.25 2014/03/24 06:07:46 greg Exp $"; #endif /* * Create BSDF advection mesh from radial basis functions. @@ -165,9 +165,6 @@ neighborhood_dist2(int x0, int y0, int x1, int y1) double d; int p[4]; int i, j; - - if ((x0 == x1) & (y0 == y1)) - return(0.); /* check radius */ p[0] = x0; p[1] = y0; p[2] = x1; p[3] = y1; for (i = 4; i--; ) { @@ -556,13 +553,12 @@ mesh_from_edge(MIGRATION *edge) static void check_normal_incidence(void) { - static const FVECT norm_vec = {.0, .0, 1.}; + static FVECT norm_vec = {.0, .0, 1.}; const int saved_nprocs = nprocs; RBFNODE *near_rbf, *mir_rbf, *rbf; double bestd; int n; - if (dsf_list == NULL) return; /* XXX should be error? */ near_rbf = dsf_list; @@ -612,7 +608,7 @@ check_normal_incidence(void) nprocs = 1; /* compute migration matrix */ if (create_migration(mir_rbf, near_rbf) == NULL) exit(1); /* XXX should never happen! */ - /* interpolate normal dist. */ + norm_vec[2] = input_orient; /* interpolate normal dist. */ rbf = e_advect_rbf(mig_list, norm_vec, 2*near_rbf->nrbf); nprocs = saved_nprocs; /* final clean-up */ free(mir_rbf);