Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/BKE_pbvh.h')
-rw-r--r--source/blender/blenkernel/BKE_pbvh.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h
index 4badd1bc269..05cde99e276 100644
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@ -32,7 +32,6 @@ struct IsectRayPrecalc;
struct MLoop;
struct MLoopTri;
struct MPoly;
-struct MVert;
struct Mesh;
struct MeshElemMap;
struct PBVH;
@@ -250,7 +249,7 @@ void BKE_pbvh_build_mesh(PBVH *pbvh,
struct Mesh *mesh,
const struct MPoly *mpoly,
const struct MLoop *mloop,
- struct MVert *verts,
+ float (*positions)[3],
int totvert,
struct CustomData *vdata,
struct CustomData *ldata,
@@ -457,10 +456,7 @@ void BKE_pbvh_node_get_grids(PBVH *pbvh,
int *gridsize,
struct CCGElem ***r_griddata);
void BKE_pbvh_node_num_verts(PBVH *pbvh, PBVHNode *node, int *r_uniquevert, int *r_totvert);
-void BKE_pbvh_node_get_verts(PBVH *pbvh,
- PBVHNode *node,
- const int **r_vert_indices,
- struct MVert **r_verts);
+const int *BKE_pbvh_node_get_vert_indices(PBVHNode *node);
void BKE_pbvh_node_get_loops(PBVH *pbvh,
PBVHNode *node,
const int **r_loop_indices,
@@ -561,12 +557,13 @@ typedef struct PBVHVertexIter {
int gridsize;
/* mesh */
- struct MVert *mverts;
+ float (*mesh_positions)[3];
float (*vert_normals)[3];
const bool *hide_vert;
int totvert;
const int *vert_indices;
float *vmask;
+ bool is_mesh;
/* bmesh */
struct GSetIterator bm_unique_verts;
@@ -576,7 +573,6 @@ typedef struct PBVHVertexIter {
/* result: these are all computed in the macro, but we assume
* that compiler optimization's will skip the ones we don't use */
- struct MVert *mvert;
struct BMVert *bm_vert;
float *co;
float *no;
@@ -621,8 +617,7 @@ void pbvh_vertex_iter_init(PBVH *pbvh, PBVHNode *node, PBVHVertexIter *vi, int m
} \
} \
} \
- else if (vi.mverts) { \
- vi.mvert = &vi.mverts[vi.vert_indices[vi.gx]]; \
+ else if (vi.mesh_positions) { \
if (vi.respect_hide) { \
vi.visible = !(vi.hide_vert && vi.hide_vert[vi.vert_indices[vi.gx]]); \
if (mode == PBVH_ITER_UNIQUE && !vi.visible) { \
@@ -632,7 +627,7 @@ void pbvh_vertex_iter_init(PBVH *pbvh, PBVHNode *node, PBVHVertexIter *vi, int m
else { \
BLI_assert(vi.visible); \
} \
- vi.co = vi.mvert->co; \
+ vi.co = vi.mesh_positions[vi.vert_indices[vi.gx]]; \
vi.no = vi.vert_normals[vi.vert_indices[vi.gx]]; \
vi.index = vi.vertex.i = vi.vert_indices[vi.i]; \
if (vi.vmask) { \
@@ -697,7 +692,7 @@ void BKE_pbvh_parallel_range_settings(struct TaskParallelSettings *settings,
bool use_threading,
int totnode);
-struct MVert *BKE_pbvh_get_verts(const PBVH *pbvh);
+float (*BKE_pbvh_get_positions(const PBVH *pbvh))[3];
const float (*BKE_pbvh_get_vert_normals(const PBVH *pbvh))[3];
const bool *BKE_pbvh_get_vert_hide(const PBVH *pbvh);
bool *BKE_pbvh_get_vert_hide_for_write(PBVH *pbvh);