--- ray/src/cv/bsdfmesh.c 2014/03/09 01:51:48 2.21 +++ 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.21 2014/03/09 01:51:48 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,7 +553,7 @@ 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; @@ -606,11 +603,12 @@ check_normal_incidence(void) memcpy(mir_rbf, near_rbf, n); mir_rbf->ord = near_rbf->ord - 1; /* not used, I think */ mir_rbf->next = NULL; + mir_rbf->ejl = NULL; rev_rbf_symmetry(mir_rbf, MIRROR_X|MIRROR_Y); nprocs = 1; /* compute migration matrix */ - if (mig_list != create_migration(mir_rbf, near_rbf)) + 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);