From 132783328209f24873629113665f01b35364fdd0 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 6 Nov 2009 16:46:35 +0000 Subject: Sculpt: WIP brush behavior changes * Draw/Inflate/Layer now keep working on the original mesh coordinates and normals from when the stroke started. This helps avoid the mesh blowing up, but can still be better. The old behavior is still available as "Accumulate" in the UI. * This requires some more memory usage for the BVH, would like to find a way to avoid that. * Smooth falloff is now the default. * Spacing is now enabled by default, with a value of 7.5. * Anchored now stores normals per node to save some memory. --- source/blender/blenlib/BLI_pbvh.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'source/blender/blenlib/BLI_pbvh.h') diff --git a/source/blender/blenlib/BLI_pbvh.h b/source/blender/blenlib/BLI_pbvh.h index ba9de462b3d..360a9937498 100644 --- a/source/blender/blenlib/BLI_pbvh.h +++ b/source/blender/blenlib/BLI_pbvh.h @@ -37,8 +37,7 @@ typedef struct PBVHNode PBVHNode; /* Callbacks */ /* returns 1 if the search should continue from this node, 0 otherwise */ -typedef int (*BLI_pbvh_SearchCallback)(PBVHNode *node, - float bb_min[3], float bb_max[3], void *data); +typedef int (*BLI_pbvh_SearchCallback)(PBVHNode *node, void *data); typedef void (*BLI_pbvh_HitCallback)(PBVHNode *node, void *data); @@ -69,7 +68,7 @@ void BLI_pbvh_search_gather(PBVH *bvh, hit first */ void BLI_pbvh_raycast(PBVH *bvh, BLI_pbvh_HitCallback cb, void *data, - float ray_start[3], float ray_normal[3]); + float ray_start[3], float ray_normal[3], int original); /* Node Access */ @@ -78,20 +77,25 @@ typedef enum { PBVH_UpdateNormals = 2, PBVH_UpdateBB = 4, + PBVH_UpdateOriginalBB = 4, PBVH_UpdateDrawBuffers = 8, PBVH_UpdateRedraw = 16 } PBVHNodeFlags; void BLI_pbvh_node_mark_update(PBVHNode *node); -void BLI_pbvh_node_get_verts(PBVHNode *node, int **vert_indices, int *totvert); -void BLI_pbvh_node_get_faces(PBVHNode *node, int **face_indices, int *totface); +void BLI_pbvh_node_get_verts(PBVHNode *node, int **vert_indices, + int *totvert, int *allverts); +void BLI_pbvh_node_get_faces(PBVHNode *node, int **face_indices, + int **face_vert_indices, int *totface); void *BLI_pbvh_node_get_draw_buffers(PBVHNode *node); +void BLI_pbvh_node_get_BB(PBVHNode *node, float bb_min[3], float bb_max[3]); +void BLI_pbvh_node_get_original_BB(PBVHNode *node, float bb_min[3], float bb_max[3]); /* Update Normals/Bounding Box/Draw Buffers/Redraw and clear flags */ void BLI_pbvh_update(PBVH *bvh, int flags, float (*face_nors)[3]); -void BLI_pbvh_redraw_bounding_box(PBVH *bvh, float bb_min[3], float bb_max[3]); +void BLI_pbvh_redraw_BB(PBVH *bvh, float bb_min[3], float bb_max[3]); #endif /* BLI_PBVH_H */ -- cgit v1.2.3