Cleanup: Use const pbvh node pointers for some accessor functions
This commit is contained in:
@@ -403,9 +403,12 @@ void BKE_pbvh_node_get_grids(PBVH *pbvh,
|
||||
int *maxgrid,
|
||||
int *gridsize,
|
||||
CCGElem ***r_griddata);
|
||||
void BKE_pbvh_node_num_verts(PBVH *pbvh, PBVHNode *node, int *r_uniquevert, int *r_totvert);
|
||||
blender::Span<int> BKE_pbvh_node_get_vert_indices(PBVHNode *node);
|
||||
blender::Span<int> BKE_pbvh_node_get_unique_vert_indices(PBVHNode *node);
|
||||
void BKE_pbvh_node_num_verts(const PBVH *pbvh,
|
||||
const PBVHNode *node,
|
||||
int *r_uniquevert,
|
||||
int *r_totvert);
|
||||
blender::Span<int> BKE_pbvh_node_get_vert_indices(const PBVHNode *node);
|
||||
blender::Span<int> BKE_pbvh_node_get_unique_vert_indices(const PBVHNode *node);
|
||||
void BKE_pbvh_node_get_loops(PBVH *pbvh,
|
||||
PBVHNode *node,
|
||||
const int **r_loop_indices,
|
||||
|
||||
@@ -1958,17 +1958,20 @@ int BKE_pbvh_num_faces(const PBVH *pbvh)
|
||||
return 0;
|
||||
}
|
||||
|
||||
blender::Span<int> BKE_pbvh_node_get_vert_indices(PBVHNode *node)
|
||||
blender::Span<int> BKE_pbvh_node_get_vert_indices(const PBVHNode *node)
|
||||
{
|
||||
return node->vert_indices;
|
||||
}
|
||||
|
||||
blender::Span<int> BKE_pbvh_node_get_unique_vert_indices(PBVHNode *node)
|
||||
blender::Span<int> BKE_pbvh_node_get_unique_vert_indices(const PBVHNode *node)
|
||||
{
|
||||
return node->vert_indices.as_span().take_front(node->uniq_verts);
|
||||
}
|
||||
|
||||
void BKE_pbvh_node_num_verts(PBVH *pbvh, PBVHNode *node, int *r_uniquevert, int *r_totvert)
|
||||
void BKE_pbvh_node_num_verts(const PBVH *pbvh,
|
||||
const PBVHNode *node,
|
||||
int *r_uniquevert,
|
||||
int *r_totvert)
|
||||
{
|
||||
int tot;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user