Data Transfer: very minor cleanup...

This commit is contained in:
Bastien Montagne 2015-07-14 11:13:20 +02:00
parent 85004461ea
commit 6ba4a917a3
1 changed files with 2 additions and 2 deletions

View File

@ -1443,7 +1443,7 @@ void BKE_mesh_remap_calc_loops_from_dm(
bool pcent_dst_valid = false;
if ((size_t)mp_dst->totloop > islands_res_buff_size) {
islands_res_buff_size = (size_t)mp_dst->totloop;
islands_res_buff_size = (size_t)mp_dst->totloop + MREMAP_DEFAULT_BUFSIZE;
for (tindex = 0; tindex < num_trees; tindex++) {
islands_res[tindex] = MEM_reallocN(islands_res[tindex], sizeof(**islands_res) * islands_res_buff_size);
}
@ -1539,7 +1539,7 @@ void BKE_mesh_remap_calc_loops_from_dm(
}
}
best_nor_dot = (best_nor_dot + 1.0f) * 0.5f;
islands_res[tindex][plidx_dst].factor = hit_dist ? (1.0f / hit_dist * best_nor_dot) : 1e18f;
islands_res[tindex][plidx_dst].factor = hit_dist ? (best_nor_dot / hit_dist) : 1e18f;
islands_res[tindex][plidx_dst].hit_dist = hit_dist;
islands_res[tindex][plidx_dst].index_src = best_index_src;
}