Subdiv: Inline grid to face map lookup function
I've seen this appear in profiles sometimes, which it really shouldn't, since it's just a single array access. I didn't detect an observable difference, but we don't have to think about that anymore anyway.
This commit is contained in:
parent
0b9ae3df4c
commit
d73868d5a1
|
@ -276,7 +276,11 @@ void BKE_subdiv_ccg_neighbor_coords_get(const SubdivCCG &subdiv_ccg,
|
|||
bool include_duplicates,
|
||||
SubdivCCGNeighbors &r_neighbors);
|
||||
|
||||
int BKE_subdiv_ccg_grid_to_face_index(const SubdivCCG &subdiv_ccg, int grid_index);
|
||||
inline int BKE_subdiv_ccg_grid_to_face_index(const SubdivCCG &subdiv_ccg, const int grid_index)
|
||||
{
|
||||
return subdiv_ccg.grid_to_face_map[grid_index];
|
||||
}
|
||||
|
||||
void BKE_subdiv_ccg_eval_limit_point(const SubdivCCG &subdiv_ccg,
|
||||
const SubdivCCGCoord &coord,
|
||||
float r_point[3]);
|
||||
|
|
|
@ -1556,11 +1556,6 @@ void BKE_subdiv_ccg_neighbor_coords_get(const SubdivCCG &subdiv_ccg,
|
|||
#endif
|
||||
}
|
||||
|
||||
int BKE_subdiv_ccg_grid_to_face_index(const SubdivCCG &subdiv_ccg, const int grid_index)
|
||||
{
|
||||
return subdiv_ccg.grid_to_face_map[grid_index];
|
||||
}
|
||||
|
||||
const int *BKE_subdiv_ccg_start_face_grid_index_ensure(SubdivCCG &subdiv_ccg)
|
||||
{
|
||||
if (subdiv_ccg.cache_.start_face_grid_index.is_empty()) {
|
||||
|
|
Loading…
Reference in New Issue