diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-08-21 23:28:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-08-21 23:48:10 +0300 |
commit | 189aa32a3ac0e949275d16ffb19576a1306d1780 (patch) | |
tree | ff75826925b4b26f6b4aa8928fe3c5d3c799a98f /source/blender/blenkernel/intern/pbvh.c | |
parent | 4a2d1953f3ca3e1160a3ce767df15e481658bdf6 (diff) |
Cleanup: vertex coordinate access, naming & minor changes
This also splits vertex access and allocation so it's possible
to copy coordinates into an existing array without allocating it.
Diffstat (limited to 'source/blender/blenkernel/intern/pbvh.c')
-rw-r--r-- | source/blender/blenkernel/intern/pbvh.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 81e4537964b..cea68a0c525 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -533,7 +533,7 @@ static void pbvh_build(PBVH *bvh, BB *cb, BBC *prim_bbc, int totprim) * Do a full rebuild with on Mesh data structure. * * \note Unlike mpoly/mloop/verts, looptri is **totally owned** by PBVH - * (which means it may rewrite it if needed, see #BKE_pbvh_apply_vertCos(). + * (which means it may rewrite it if needed, see #BKE_pbvh_vert_coords_apply(). */ void BKE_pbvh_build_mesh(PBVH *bvh, const MPoly *mpoly, @@ -2306,7 +2306,7 @@ void BKE_pbvh_node_layer_disp_free(PBVHNode *node) } } -float (*BKE_pbvh_get_vertCos(PBVH *pbvh))[3] +float (*BKE_pbvh_vert_coords_alloc(PBVH *pbvh))[3] { float(*vertCos)[3] = NULL; @@ -2324,7 +2324,7 @@ float (*BKE_pbvh_get_vertCos(PBVH *pbvh))[3] return vertCos; } -void BKE_pbvh_apply_vertCos(PBVH *pbvh, const float (*vertCos)[3], const int totvert) +void BKE_pbvh_vert_coords_apply(PBVH *pbvh, const float (*vertCos)[3], const int totvert) { if (totvert != pbvh->totvert) { BLI_assert(!"PBVH: Given deforming vcos number does not natch PBVH vertex number!"); @@ -2368,7 +2368,7 @@ void BKE_pbvh_apply_vertCos(PBVH *pbvh, const float (*vertCos)[3], const int tot } } -bool BKE_pbvh_isDeformed(PBVH *pbvh) +bool BKE_pbvh_is_deformed(PBVH *pbvh) { return pbvh->deformed; } |