|
Blender
V2.93
|
#include "MEM_guardedalloc.h"#include "BLI_utildefines.h"#include "BLI_bitmap.h"#include "BLI_ghash.h"#include "BLI_math.h"#include "BLI_rand.h"#include "BLI_task.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "BKE_ccg.h"#include "BKE_mesh.h"#include "BKE_paint.h"#include "BKE_pbvh.h"#include "BKE_subdiv_ccg.h"#include "PIL_time.h"#include "GPU_buffers.h"#include "bmesh.h"#include "atomic_ops.h"#include "pbvh_intern.h"#include <limits.h>Go to the source code of this file.
Classes | |
| struct | PBVHStack |
| struct | PBVHIter |
| struct | node_tree |
| struct | PBVHUpdateData |
| struct | RaycastData |
| struct | FindNearestRayData |
| struct | PBVHDrawSearchData |
Macros | |
| #define | LEAF_LIMIT 10000 |
| #define | STACK_FIXED_DEPTH 100 |
Typedefs | |
| typedef struct PBVHStack | PBVHStack |
| typedef struct PBVHIter | PBVHIter |
| typedef struct node_tree | node_tree |
| typedef struct PBVHUpdateData | PBVHUpdateData |
| typedef struct PBVHDrawSearchData | PBVHDrawSearchData |
Enumerations | |
| enum | PlaneAABBIsect { ISECT_INSIDE , ISECT_OUTSIDE , ISECT_INTERSECT } |
Functions | |
| void | BB_reset (BB *bb) |
| void | BB_expand (BB *bb, const float co[3]) |
| void | BB_expand_with_bb (BB *bb, BB *bb2) |
| int | BB_widest_axis (const BB *bb) |
| void | BBC_update_centroid (BBC *bbc) |
| static void | update_node_vb (PBVH *pbvh, PBVHNode *node) |
| static bool | face_materials_match (const MPoly *f1, const MPoly *f2) |
| static bool | grid_materials_match (const DMFlagMat *f1, const DMFlagMat *f2) |
| static int | partition_indices (int *prim_indices, int lo, int hi, int axis, float mid, BBC *prim_bbc) |
| static int | partition_indices_material (PBVH *pbvh, int lo, int hi) |
| void | pbvh_grow_nodes (PBVH *pbvh, int totnode) |
| static int | map_insert_vert (PBVH *pbvh, GHash *map, unsigned int *face_verts, unsigned int *uniq_verts, int vertex) |
| static void | build_mesh_leaf_node (PBVH *pbvh, PBVHNode *node) |
| static void | update_vb (PBVH *pbvh, PBVHNode *node, BBC *prim_bbc, int offset, int count) |
| int | BKE_pbvh_count_grid_quads (BLI_bitmap **grid_hidden, const int *grid_indices, int totgrid, int gridsize) |
| void | BKE_pbvh_sync_face_sets_to_grids (PBVH *pbvh) |
| static void | build_grid_leaf_node (PBVH *pbvh, PBVHNode *node) |
| static void | build_leaf (PBVH *pbvh, int node_index, BBC *prim_bbc, int offset, int count) |
| static bool | leaf_needs_material_split (PBVH *pbvh, int offset, int count) |
| static void | build_sub (PBVH *pbvh, int node_index, BB *cb, BBC *prim_bbc, int offset, int count) |
| static void | pbvh_build (PBVH *pbvh, BB *cb, BBC *prim_bbc, int totprim) |
| void | BKE_pbvh_build_mesh (PBVH *pbvh, const Mesh *mesh, const MPoly *mpoly, const MLoop *mloop, MVert *verts, int totvert, struct CustomData *vdata, struct CustomData *ldata, struct CustomData *pdata, const MLoopTri *looptri, int looptri_num) |
| void | BKE_pbvh_build_grids (PBVH *pbvh, CCGElem **grids, int totgrid, CCGKey *key, void **gridfaces, DMFlagMat *flagmats, BLI_bitmap **grid_hidden) |
| PBVH * | BKE_pbvh_new (void) |
| void | BKE_pbvh_free (PBVH *pbvh) |
| static void | pbvh_iter_begin (PBVHIter *iter, PBVH *pbvh, BKE_pbvh_SearchCallback scb, void *search_data) |
| static void | pbvh_iter_end (PBVHIter *iter) |
| static void | pbvh_stack_push (PBVHIter *iter, PBVHNode *node, bool revisiting) |
| static PBVHNode * | pbvh_iter_next (PBVHIter *iter) |
| static PBVHNode * | pbvh_iter_next_occluded (PBVHIter *iter) |
| void | BKE_pbvh_search_gather (PBVH *pbvh, BKE_pbvh_SearchCallback scb, void *search_data, PBVHNode ***r_array, int *r_tot) |
| void | BKE_pbvh_search_callback (PBVH *pbvh, BKE_pbvh_SearchCallback scb, void *search_data, BKE_pbvh_HitCallback hcb, void *hit_data) |
| static void | node_tree_insert (node_tree *tree, node_tree *new_node) |
| static void | traverse_tree (node_tree *tree, BKE_pbvh_HitOccludedCallback hcb, void *hit_data, float *tmin) |
| static void | free_tree (node_tree *tree) |
| float | BKE_pbvh_node_get_tmin (PBVHNode *node) |
| static void | BKE_pbvh_search_callback_occluded (PBVH *pbvh, BKE_pbvh_SearchCallback scb, void *search_data, BKE_pbvh_HitOccludedCallback hcb, void *hit_data) |
| static bool | update_search_cb (PBVHNode *node, void *data_v) |
| static void | pbvh_update_normals_accum_task_cb (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
| static void | pbvh_update_normals_store_task_cb (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
| static void | pbvh_faces_update_normals (PBVH *pbvh, PBVHNode **nodes, int totnode) |
| static void | pbvh_update_mask_redraw_task_cb (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
| static void | pbvh_update_mask_redraw (PBVH *pbvh, PBVHNode **nodes, int totnode, int flag) |
| static void | pbvh_update_visibility_redraw_task_cb (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
| static void | pbvh_update_visibility_redraw (PBVH *pbvh, PBVHNode **nodes, int totnode, int flag) |
| static void | pbvh_update_BB_redraw_task_cb (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
| void | pbvh_update_BB_redraw (PBVH *pbvh, PBVHNode **nodes, int totnode, int flag) |
| static int | pbvh_get_buffers_update_flags (PBVH *UNUSED(pbvh)) |
| static void | pbvh_update_draw_buffer_cb (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
| static void | pbvh_update_draw_buffers (PBVH *pbvh, PBVHNode **nodes, int totnode, int update_flag) |
| static int | pbvh_flush_bb (PBVH *pbvh, PBVHNode *node, int flag) |
| void | BKE_pbvh_update_bounds (PBVH *pbvh, int flag) |
| void | BKE_pbvh_update_vertex_data (PBVH *pbvh, int flag) |
| static void | pbvh_faces_node_visibility_update (PBVH *pbvh, PBVHNode *node) |
| static void | pbvh_grids_node_visibility_update (PBVH *pbvh, PBVHNode *node) |
| static void | pbvh_bmesh_node_visibility_update (PBVHNode *node) |
| static void | pbvh_update_visibility_task_cb (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
| static void | pbvh_update_visibility (PBVH *pbvh, PBVHNode **nodes, int totnode) |
| void | BKE_pbvh_update_visibility (PBVH *pbvh) |
| void | BKE_pbvh_redraw_BB (PBVH *pbvh, float bb_min[3], float bb_max[3]) |
| void | BKE_pbvh_get_grid_updates (PBVH *pbvh, bool clear, void ***r_gridfaces, int *r_totface) |
| PBVHType | BKE_pbvh_type (const PBVH *pbvh) |
| bool | BKE_pbvh_has_faces (const PBVH *pbvh) |
| void | BKE_pbvh_bounding_box (const PBVH *pbvh, float min[3], float max[3]) |
| BLI_bitmap ** | BKE_pbvh_grid_hidden (const PBVH *pbvh) |
| const CCGKey * | BKE_pbvh_get_grid_key (const PBVH *pbvh) |
| struct CCGElem ** | BKE_pbvh_get_grids (const PBVH *pbvh) |
| BLI_bitmap ** | BKE_pbvh_get_grid_visibility (const PBVH *pbvh) |
| int | BKE_pbvh_get_grid_num_vertices (const PBVH *pbvh) |
| int | BKE_pbvh_get_grid_num_faces (const PBVH *pbvh) |
| BMesh * | BKE_pbvh_get_bmesh (PBVH *pbvh) |
| void | BKE_pbvh_node_mark_update (PBVHNode *node) |
| void | BKE_pbvh_node_mark_update_mask (PBVHNode *node) |
| void | BKE_pbvh_node_mark_update_color (PBVHNode *node) |
| void | BKE_pbvh_node_mark_update_visibility (PBVHNode *node) |
| void | BKE_pbvh_node_mark_rebuild_draw (PBVHNode *node) |
| void | BKE_pbvh_node_mark_redraw (PBVHNode *node) |
| void | BKE_pbvh_node_mark_normals_update (PBVHNode *node) |
| void | BKE_pbvh_node_fully_hidden_set (PBVHNode *node, int fully_hidden) |
| bool | BKE_pbvh_node_fully_hidden_get (PBVHNode *node) |
| void | BKE_pbvh_node_fully_masked_set (PBVHNode *node, int fully_masked) |
| bool | BKE_pbvh_node_fully_masked_get (PBVHNode *node) |
| void | BKE_pbvh_node_fully_unmasked_set (PBVHNode *node, int fully_masked) |
| bool | BKE_pbvh_node_fully_unmasked_get (PBVHNode *node) |
| void | BKE_pbvh_node_get_verts (PBVH *pbvh, PBVHNode *node, const int **r_vert_indices, MVert **r_verts) |
| void | BKE_pbvh_node_num_verts (PBVH *pbvh, PBVHNode *node, int *r_uniquevert, int *r_totvert) |
| void | BKE_pbvh_node_get_grids (PBVH *pbvh, PBVHNode *node, int **r_grid_indices, int *r_totgrid, int *r_maxgrid, int *r_gridsize, CCGElem ***r_griddata) |
| void | BKE_pbvh_node_get_BB (PBVHNode *node, float bb_min[3], float bb_max[3]) |
| void | BKE_pbvh_node_get_original_BB (PBVHNode *node, float bb_min[3], float bb_max[3]) |
| void | BKE_pbvh_node_get_proxies (PBVHNode *node, PBVHProxyNode **proxies, int *proxy_count) |
| void | BKE_pbvh_node_get_bm_orco_data (PBVHNode *node, int(**r_orco_tris)[3], int *r_orco_tris_num, float(**r_orco_coords)[3]) |
| bool | BKE_pbvh_node_vert_update_check_any (PBVH *pbvh, PBVHNode *node) |
| static bool | ray_aabb_intersect (PBVHNode *node, void *data_v) |
| void | BKE_pbvh_raycast (PBVH *pbvh, BKE_pbvh_HitOccludedCallback cb, void *data, const float ray_start[3], const float ray_normal[3], bool original) |
| bool | ray_face_intersection_quad (const float ray_start[3], struct IsectRayPrecalc *isect_precalc, const float t0[3], const float t1[3], const float t2[3], const float t3[3], float *depth) |
| bool | ray_face_intersection_tri (const float ray_start[3], struct IsectRayPrecalc *isect_precalc, const float t0[3], const float t1[3], const float t2[3], float *depth) |
| static float | dist_squared_ray_to_tri_v3_fast (const float ray_origin[3], const float ray_direction[3], const float v0[3], const float v1[3], const float v2[3], float r_point[3], float *r_depth) |
| bool | ray_face_nearest_quad (const float ray_start[3], const float ray_normal[3], const float t0[3], const float t1[3], const float t2[3], const float t3[3], float *depth, float *dist_sq) |
| bool | ray_face_nearest_tri (const float ray_start[3], const float ray_normal[3], const float t0[3], const float t1[3], const float t2[3], float *depth, float *dist_sq) |
| static bool | pbvh_faces_node_raycast (PBVH *pbvh, const PBVHNode *node, float(*origco)[3], const float ray_start[3], const float ray_normal[3], struct IsectRayPrecalc *isect_precalc, float *depth, int *r_active_vertex_index, int *r_active_face_index, float *r_face_normal) |
| static bool | pbvh_grids_node_raycast (PBVH *pbvh, PBVHNode *node, float(*origco)[3], const float ray_start[3], const float ray_normal[3], struct IsectRayPrecalc *isect_precalc, float *depth, int *r_active_vertex_index, int *r_active_grid_index, float *r_face_normal) |
| bool | BKE_pbvh_node_raycast (PBVH *pbvh, PBVHNode *node, float(*origco)[3], bool use_origco, const float ray_start[3], const float ray_normal[3], struct IsectRayPrecalc *isect_precalc, float *depth, int *active_vertex_index, int *active_face_grid_index, float *face_normal) |
| void | BKE_pbvh_raycast_project_ray_root (PBVH *pbvh, bool original, float ray_start[3], float ray_end[3], float ray_normal[3]) |
| static bool | nearest_to_ray_aabb_dist_sq (PBVHNode *node, void *data_v) |
| void | BKE_pbvh_find_nearest_to_ray (PBVH *pbvh, BKE_pbvh_SearchNearestCallback cb, void *data, const float ray_start[3], const float ray_normal[3], bool original) |
| static bool | pbvh_faces_node_nearest_to_ray (PBVH *pbvh, const PBVHNode *node, float(*origco)[3], const float ray_start[3], const float ray_normal[3], float *depth, float *dist_sq) |
| static bool | pbvh_grids_node_nearest_to_ray (PBVH *pbvh, PBVHNode *node, float(*origco)[3], const float ray_start[3], const float ray_normal[3], float *depth, float *dist_sq) |
| bool | BKE_pbvh_node_find_nearest_to_ray (PBVH *pbvh, PBVHNode *node, float(*origco)[3], bool use_origco, const float ray_start[3], const float ray_normal[3], float *depth, float *dist_sq) |
| static PlaneAABBIsect | test_frustum_aabb (const float bb_min[3], const float bb_max[3], PBVHFrustumPlanes *frustum) |
| bool | BKE_pbvh_node_frustum_contain_AABB (PBVHNode *node, void *data) |
| bool | BKE_pbvh_node_frustum_exclude_AABB (PBVHNode *node, void *data) |
| void | BKE_pbvh_update_normals (PBVH *pbvh, struct SubdivCCG *subdiv_ccg) |
| void | BKE_pbvh_face_sets_color_set (PBVH *pbvh, int seed, int color_default) |
| static bool | pbvh_draw_search_cb (PBVHNode *node, void *data_v) |
| void | BKE_pbvh_draw_cb (PBVH *pbvh, bool update_only_visible, PBVHFrustumPlanes *update_frustum, PBVHFrustumPlanes *draw_frustum, void(*draw_fn)(void *user_data, GPU_PBVH_Buffers *buffers), void *user_data) |
| void | BKE_pbvh_draw_debug_cb (PBVH *pbvh, void(*draw_fn)(void *user_data, const float bmin[3], const float bmax[3], PBVHNodeFlags flag), void *user_data) |
| void | BKE_pbvh_grids_update (PBVH *pbvh, CCGElem **grids, void **gridfaces, DMFlagMat *flagmats, BLI_bitmap **grid_hidden) |
| float(* | BKE_pbvh_vert_coords_alloc (PBVH *pbvh))[3] |
| void | BKE_pbvh_vert_coords_apply (PBVH *pbvh, const float(*vertCos)[3], const int totvert) |
| bool | BKE_pbvh_is_deformed (PBVH *pbvh) |
| PBVHProxyNode * | BKE_pbvh_node_add_proxy (PBVH *pbvh, PBVHNode *node) |
| void | BKE_pbvh_node_free_proxies (PBVHNode *node) |
| void | BKE_pbvh_gather_proxies (PBVH *pbvh, PBVHNode ***r_array, int *r_tot) |
| PBVHColorBufferNode * | BKE_pbvh_node_color_buffer_get (PBVHNode *node) |
| void | BKE_pbvh_node_color_buffer_free (PBVH *pbvh) |
| void | pbvh_vertex_iter_init (PBVH *pbvh, PBVHNode *node, PBVHVertexIter *vi, int mode) |
| bool | pbvh_has_mask (PBVH *pbvh) |
| bool | pbvh_has_face_sets (PBVH *pbvh) |
| void | pbvh_show_mask_set (PBVH *pbvh, bool show_mask) |
| void | pbvh_show_face_sets_set (PBVH *pbvh, bool show_face_sets) |
| void | BKE_pbvh_set_frustum_planes (PBVH *pbvh, PBVHFrustumPlanes *planes) |
| void | BKE_pbvh_get_frustum_planes (PBVH *pbvh, PBVHFrustumPlanes *planes) |
| void | BKE_pbvh_parallel_range_settings (TaskParallelSettings *settings, bool use_threading, int totnode) |
| MVert * | BKE_pbvh_get_verts (const PBVH *pbvh) |
| void | BKE_pbvh_subdiv_cgg_set (PBVH *pbvh, SubdivCCG *subdiv_ccg) |
| void | BKE_pbvh_face_sets_set (PBVH *pbvh, int *face_sets) |
| void | BKE_pbvh_respect_hide_set (PBVH *pbvh, bool respect_hide) |
| typedef struct PBVHDrawSearchData PBVHDrawSearchData |
PBVH drawing, updating draw buffers as needed and culling any nodes outside the specified frustum.
| typedef struct PBVHUpdateData PBVHUpdateData |
| enum PlaneAABBIsect |
Definition at line 82 of file pbvh.c.
References BB::bmax, BB::bmin, max_ff(), and min_ff().
Referenced by BKE_pbvh_build_bmesh(), BKE_pbvh_build_grids(), BKE_pbvh_build_mesh(), build_sub(), pbvh_bmesh_node_finalize(), pbvh_bmesh_node_limit_ensure(), pbvh_bmesh_node_limit_ensure_fast(), pbvh_bmesh_node_split(), and update_node_vb().
Definition at line 91 of file pbvh.c.
References BB::bmax, BB::bmin, max_ff(), and min_ff().
Referenced by BKE_pbvh_redraw_BB(), pbvh_bmesh_create_nodes_fast_recursive(), pbvh_bmesh_node_split(), update_node_vb(), and update_vb().
| void BB_reset | ( | BB * | bb | ) |
Definition at line 75 of file pbvh.c.
References BB::bmax, and BB::bmin.
Referenced by BKE_pbvh_build_bmesh(), BKE_pbvh_build_grids(), BKE_pbvh_build_mesh(), BKE_pbvh_redraw_BB(), build_sub(), pbvh_bmesh_create_nodes_fast_recursive(), pbvh_bmesh_node_finalize(), pbvh_bmesh_node_limit_ensure(), pbvh_bmesh_node_limit_ensure_fast(), pbvh_bmesh_node_split(), update_node_vb(), and update_vb().
| int BB_widest_axis | ( | const BB * | bb | ) |
Definition at line 100 of file pbvh.c.
References BB::bmax, and BB::bmin.
Referenced by build_sub(), pbvh_bmesh_node_limit_ensure_fast(), and pbvh_bmesh_node_split().
| void BBC_update_centroid | ( | BBC * | bbc | ) |
Definition at line 123 of file pbvh.c.
References BBC::bcentroid, BBC::bmax, and BBC::bmin.
Referenced by BKE_pbvh_build_bmesh(), BKE_pbvh_build_grids(), BKE_pbvh_build_mesh(), and pbvh_bmesh_node_limit_ensure().
Definition at line 1675 of file pbvh.c.
References BB::bmax, BB::bmin, copy_v3_v3(), max, min, PBVH::nodes, PBVH::totnode, PBVHNode::vb, and zero_v3().
Referenced by sculpt_detail_flood_fill_exec(), and SCULPT_update_object_bounding_box().
| void BKE_pbvh_build_grids | ( | PBVH * | pbvh, |
| CCGElem ** | grids, | ||
| int | totgrid, | ||
| CCGKey * | key, | ||
| void ** | gridfaces, | ||
| DMFlagMat * | flagmats, | ||
| BLI_bitmap ** | grid_hidden | ||
| ) |
Definition at line 625 of file pbvh.c.
References BB_expand(), BB_reset(), BBC_update_centroid(), BBC::bcentroid, CCG_elem_offset_co(), PBVH::grid_flag_mats, PBVH::grid_hidden, CCGKey::grid_size, PBVH::gridfaces, PBVH::gridkey, PBVH::grids, LEAF_LIMIT, PBVH::leaf_limit, max_ii(), MEM_freeN, MEM_mallocN, pbvh_build(), PBVH_GRIDS, PBVH::totgrid, and PBVH::type.
Referenced by build_pbvh_from_ccg().
| void BKE_pbvh_build_mesh | ( | PBVH * | pbvh, |
| const Mesh * | mesh, | ||
| const MPoly * | mpoly, | ||
| const MLoop * | mloop, | ||
| MVert * | verts, | ||
| int | totvert, | ||
| struct CustomData * | vdata, | ||
| struct CustomData * | ldata, | ||
| struct CustomData * | pdata, | ||
| const MLoopTri * | looptri, | ||
| int | looptri_num | ||
| ) |
Do a full rebuild with on Mesh data structure.
Definition at line 564 of file pbvh.c.
References BB_expand(), BB_reset(), BBC_update_centroid(), BBC::bcentroid, BLI_BITMAP_NEW, PBVH::face_sets_color_default, Mesh::face_sets_color_default, PBVH::face_sets_color_seed, Mesh::face_sets_color_seed, PBVH::ldata, LEAF_LIMIT, PBVH::leaf_limit, PBVH::looptri, MEM_freeN, MEM_mallocN, PBVH::mesh, mesh, PBVH::mloop, PBVH::mpoly, NULL, pbvh_build(), PBVH_FACES, PBVH::pdata, PBVH::totvert, MLoopTri::tri, PBVH::type, MLoop::v, PBVH::vdata, PBVH::vert_bitmap, PBVH::verts, and verts.
| int BKE_pbvh_count_grid_quads | ( | BLI_bitmap ** | grid_hidden, |
| const int * | grid_indices, | ||
| int | totgrid, | ||
| int | gridsize | ||
| ) |
Definition at line 355 of file pbvh.c.
References paint_is_grid_face_hidden(), x, and y.
Referenced by build_grid_leaf_node(), and GPU_pbvh_grid_buffers_update().
| void BKE_pbvh_draw_cb | ( | PBVH * | pbvh, |
| bool | update_only_visible, | ||
| PBVHFrustumPlanes * | update_frustum, | ||
| PBVHFrustumPlanes * | draw_frustum, | ||
| void(*)(void *user_data, GPU_PBVH_Buffers *buffers) | draw_fn, | ||
| void * | user_data | ||
| ) |
Definition at line 2706 of file pbvh.c.
References BKE_pbvh_search_gather(), data, PBVHDrawSearchData::frustum, MEM_SAFE_FREE, node, pbvh_draw_search_cb(), PBVH_FullyHidden, PBVH_RebuildDrawBuffers, pbvh_update_draw_buffers(), PBVH_UpdateDrawBuffers, POINTER_FROM_INT, update_search_cb(), and user_data.
| void BKE_pbvh_draw_debug_cb | ( | PBVH * | pbvh, |
| void(*)(void *user_data, const float bmin[3], const float bmax[3], PBVHNodeFlags flag) | draw_fn, | ||
| void * | user_data | ||
| ) |
Definition at line 2752 of file pbvh.c.
References Freestyle::a, node, PBVH::nodes, PBVH::totnode, and user_data.
Referenced by drw_sculpt_generate_calls().
| void BKE_pbvh_face_sets_color_set | ( | PBVH * | pbvh, |
| int | seed, | ||
| int | color_default | ||
| ) |
Definition at line 2680 of file pbvh.c.
References PBVH::face_sets_color_default, PBVH::face_sets_color_seed, and seed.
Referenced by sculpt_face_set_create_exec(), sculpt_face_sets_randomize_colors_exec(), and sculpt_update_object().
| void BKE_pbvh_face_sets_set | ( | PBVH * | pbvh, |
| int * | face_sets | ||
| ) |
Definition at line 3061 of file pbvh.c.
References PBVH::face_sets.
Referenced by sculpt_update_object().
| void BKE_pbvh_find_nearest_to_ray | ( | PBVH * | pbvh, |
| BKE_pbvh_SearchNearestCallback | cb, | ||
| void * | data, | ||
| const float | ray_start[3], | ||
| const float | ray_normal[3], | ||
| bool | original | ||
| ) |
Definition at line 2430 of file pbvh.c.
References BKE_pbvh_search_callback_occluded(), data, FindNearestRayData::dist_ray_to_aabb_precalc, dist_squared_ray_to_aabb_v3_precalc(), nearest_to_ray_aabb_dist_sq(), and FindNearestRayData::original.
Referenced by SCULPT_stroke_get_location().
| void BKE_pbvh_free | ( | PBVH * | pbvh | ) |
Definition at line 679 of file pbvh.c.
References BLI_gset_free(), PBVH::deformed, GPU_pbvh_buffers_free(), PBVH::looptri, MEM_freeN, node, PBVH::nodes, NULL, PBVH_Leaf, PBVH::prim_indices, PBVH::totnode, and PBVH::verts.
Referenced by multires_force_sculpt_rebuild(), SCULPT_pbvh_clear(), and sculptsession_free_pbvh().
Definition at line 2882 of file pbvh.c.
References MEM_freeN, MEM_recallocN_id, node, PBVH::nodes, NULL, and PBVH::totnode.
Referenced by sculpt_combine_proxies().
Definition at line 1724 of file pbvh.c.
References BLI_assert, PBVH::bm, PBVH_BMESH, and PBVH::type.
Referenced by partialvis_update_bmesh(), SCULPT_vertex_co_get(), SCULPT_vertex_count_get(), SCULPT_vertex_mask_get(), and SCULPT_vertex_normal_get().
| void BKE_pbvh_get_frustum_planes | ( | PBVH * | pbvh, |
| PBVHFrustumPlanes * | planes | ||
| ) |
Definition at line 3034 of file pbvh.c.
References copy_v4_v4(), PBVHFrustumPlanes::num_planes, PBVH::num_planes, PBVHFrustumPlanes::planes, and PBVH::planes.
Referenced by drw_sculpt_generate_calls().
Definition at line 1694 of file pbvh.c.
References BLI_assert, PBVH::gridkey, PBVH_GRIDS, and PBVH::type.
Referenced by partialvis_update_grids(), pbvh_grids_node_visibility_update(), sculpt_expand_grids_to_faces_falloff(), SCULPT_vertex_all_face_sets_visible_get(), SCULPT_vertex_co_get(), SCULPT_vertex_face_set_get(), SCULPT_vertex_face_set_set(), SCULPT_vertex_has_face_set(), SCULPT_vertex_has_unique_face_set(), SCULPT_vertex_is_boundary(), SCULPT_vertex_limit_surface_get(), SCULPT_vertex_mask_get(), sculpt_vertex_neighbors_get_grids(), SCULPT_vertex_normal_get(), and SCULPT_vertex_visible_get().
| int BKE_pbvh_get_grid_num_faces | ( | const PBVH * | pbvh | ) |
Definition at line 1718 of file pbvh.c.
References BLI_assert, CCGKey::grid_size, PBVH::gridkey, PBVH_GRIDS, PBVH::totgrid, and PBVH::type.
Referenced by stats_object_sculpt().
| int BKE_pbvh_get_grid_num_vertices | ( | const PBVH * | pbvh | ) |
Definition at line 1712 of file pbvh.c.
References BLI_assert, CCGKey::grid_area, PBVH::gridkey, PBVH_GRIDS, PBVH::totgrid, and PBVH::type.
Referenced by SCULPT_vertex_count_get(), and stats_object_sculpt().
| void BKE_pbvh_get_grid_updates | ( | PBVH * | pbvh, |
| bool | clear, | ||
| void *** | r_gridfaces, | ||
| int * | r_totface | ||
| ) |
Definition at line 1614 of file pbvh.c.
References BLI_gset_add(), BLI_gset_free(), BLI_gset_len(), BLI_gset_ptr_new(), BLI_gsetIterator_getKey(), clear(), faces, PBVH::gridfaces, GSET_ITER_INDEX, MEM_mallocN, node, NULL, pbvh_iter_begin(), pbvh_iter_end(), pbvh_iter_next(), and PBVH_UpdateNormals.
Referenced by BKE_pbvh_update_normals(), and multires_stitch_grids().
| BLI_bitmap** BKE_pbvh_get_grid_visibility | ( | const PBVH * | pbvh | ) |
Definition at line 1706 of file pbvh.c.
References BLI_assert, PBVH::grid_hidden, PBVH_GRIDS, and PBVH::type.
Referenced by SCULPT_vertex_visible_get().
Definition at line 1700 of file pbvh.c.
References BLI_assert, PBVH::grids, PBVH_GRIDS, and PBVH::type.
Referenced by SCULPT_vertex_co_get(), SCULPT_vertex_mask_get(), and SCULPT_vertex_normal_get().
Definition at line 3050 of file pbvh.c.
References BLI_assert, PBVH_FACES, PBVH::type, and PBVH::verts.
Referenced by SCULPT_mesh_deformed_mverts_get(), SCULPT_vertex_co_for_grab_active_get(), SCULPT_vertex_co_get(), and SCULPT_vertex_normal_get().
| BLI_bitmap** BKE_pbvh_grid_hidden | ( | const PBVH * | pbvh | ) |
Definition at line 1688 of file pbvh.c.
References BLI_assert, PBVH::grid_hidden, PBVH_GRIDS, and PBVH::type.
Referenced by partialvis_update_grids(), pbvh_grids_node_visibility_update(), and sculpt_undo_alloc_and_store_hidden().
| void BKE_pbvh_grids_update | ( | PBVH * | pbvh, |
| CCGElem ** | grids, | ||
| void ** | gridfaces, | ||
| DMFlagMat * | flagmats, | ||
| BLI_bitmap ** | grid_hidden | ||
| ) |
Definition at line 2764 of file pbvh.c.
References Freestyle::a, BKE_pbvh_node_mark_rebuild_draw(), PBVH::grid_flag_mats, PBVH::grid_hidden, PBVH::gridfaces, PBVH::grids, PBVH::nodes, and PBVH::totnode.
Referenced by BKE_sculpt_bvh_update_from_ccg().
| bool BKE_pbvh_has_faces | ( | const PBVH * | pbvh | ) |
Definition at line 1666 of file pbvh.c.
References PBVH::bm, PBVH_BMESH, BMesh::totface, PBVH::totprim, and PBVH::type.
| bool BKE_pbvh_is_deformed | ( | PBVH * | pbvh | ) |
Definition at line 2842 of file pbvh.c.
References PBVH::deformed.
Referenced by sculpt_update_object().
| PBVH* BKE_pbvh_new | ( | void | ) |
Definition at line 672 of file pbvh.c.
References MEM_callocN, and PBVH::respect_hide.
Referenced by build_pbvh_for_dynamic_topology(), build_pbvh_from_ccg(), and build_pbvh_from_regular_mesh().
| PBVHProxyNode* BKE_pbvh_node_add_proxy | ( | PBVH * | pbvh, |
| PBVHNode * | node | ||
| ) |
Definition at line 2848 of file pbvh.c.
References BKE_pbvh_node_num_verts(), MEM_callocN, MEM_mallocN, MEM_reallocN, node, and NULL.
Referenced by do_clay_brush_task_cb_ex(), do_clay_strips_brush_task_cb_ex(), do_clay_thumb_brush_task_cb_ex(), do_crease_brush_task_cb_ex(), do_displacement_eraser_brush_task_cb_ex(), do_draw_brush_task_cb_ex(), do_draw_sharp_brush_task_cb_ex(), do_elastic_deform_brush_task_cb_ex(), do_fill_brush_task_cb_ex(), do_flatten_brush_task_cb_ex(), do_grab_brush_task_cb_ex(), do_gravity_task_cb_ex(), do_inflate_brush_task_cb_ex(), do_multiplane_scrape_brush_task_cb_ex(), do_nudge_brush_task_cb_ex(), do_pinch_brush_task_cb_ex(), do_rotate_brush_task_cb_ex(), do_scrape_brush_task_cb_ex(), do_snake_hook_brush_task_cb_ex(), do_thumb_brush_task_cb_ex(), do_topology_relax_task_cb_ex(), and do_topology_slide_task_cb_ex().
| void BKE_pbvh_node_color_buffer_free | ( | PBVH * | pbvh | ) |
Definition at line 2920 of file pbvh.c.
References BKE_pbvh_search_gather(), MEM_SAFE_FREE, and NULL.
Referenced by paint_mesh_restore_co(), and sculpt_stroke_done().
| PBVHColorBufferNode* BKE_pbvh_node_color_buffer_get | ( | PBVHNode * | node | ) |
Definition at line 2911 of file pbvh.c.
References MEM_callocN, and node.
Referenced by do_paint_brush_task_cb_ex().
| bool BKE_pbvh_node_find_nearest_to_ray | ( | PBVH * | pbvh, |
| PBVHNode * | node, | ||
| float(*) | origco[3], | ||
| bool | use_origco, | ||
| const float | ray_start[3], | ||
| const float | ray_normal[3], | ||
| float * | depth, | ||
| float * | dist_sq | ||
| ) |
Definition at line 2554 of file pbvh.c.
References node, PBVH_BMESH, pbvh_bmesh_node_nearest_to_ray(), PBVH_FACES, pbvh_faces_node_nearest_to_ray(), PBVH_FullyHidden, PBVH_GRIDS, pbvh_grids_node_nearest_to_ray(), and PBVH::type.
Referenced by sculpt_find_nearest_to_ray_cb().
| void BKE_pbvh_node_free_proxies | ( | PBVHNode * | node | ) |
| bool BKE_pbvh_node_frustum_contain_AABB | ( | PBVHNode * | node, |
| void * | data | ||
| ) |
Definition at line 2630 of file pbvh.c.
References data, ISECT_OUTSIDE, node, and test_frustum_aabb().
Referenced by get_pbvh_nodes(), pbvh_draw_search_cb(), sculpt_gesture_update_effected_nodes_by_clip_planes(), and sculpt_gesture_update_effected_nodes_by_line_plane().
| bool BKE_pbvh_node_frustum_exclude_AABB | ( | PBVHNode * | node, |
| void * | data | ||
| ) |
Definition at line 2640 of file pbvh.c.
References data, ISECT_INSIDE, node, and test_frustum_aabb().
Referenced by get_pbvh_nodes().
| bool BKE_pbvh_node_fully_hidden_get | ( | PBVHNode * | node | ) |
Definition at line 1781 of file pbvh.c.
References node, PBVH_FullyHidden, and PBVH_Leaf.
Referenced by SCULPT_search_sphere_cb().
| void BKE_pbvh_node_fully_hidden_set | ( | PBVHNode * | node, |
| int | fully_hidden | ||
| ) |
Definition at line 1769 of file pbvh.c.
References BLI_assert, node, PBVH_FullyHidden, and PBVH_Leaf.
Referenced by build_grid_leaf_node(), build_mesh_leaf_node(), partialvis_update_bmesh(), partialvis_update_grids(), partialvis_update_mesh(), pbvh_bmesh_create_nodes_fast_recursive(), pbvh_bmesh_node_finalize(), pbvh_bmesh_node_visibility_update(), pbvh_faces_node_visibility_update(), pbvh_grids_node_visibility_update(), pbvh_update_visibility_redraw_task_cb(), and update_cb().
| bool BKE_pbvh_node_fully_masked_get | ( | PBVHNode * | node | ) |
Definition at line 1798 of file pbvh.c.
References node, PBVH_FullyMasked, and PBVH_Leaf.
Referenced by SCULPT_search_circle_cb(), and SCULPT_search_sphere_cb().
| void BKE_pbvh_node_fully_masked_set | ( | PBVHNode * | node, |
| int | fully_masked | ||
| ) |
Definition at line 1786 of file pbvh.c.
References BLI_assert, node, PBVH_FullyMasked, and PBVH_Leaf.
Referenced by pbvh_update_mask_redraw_task_cb().
| bool BKE_pbvh_node_fully_unmasked_get | ( | PBVHNode * | node | ) |
Definition at line 1815 of file pbvh.c.
References node, PBVH_FullyUnmasked, and PBVH_Leaf.
| void BKE_pbvh_node_fully_unmasked_set | ( | PBVHNode * | node, |
| int | fully_masked | ||
| ) |
Definition at line 1803 of file pbvh.c.
References BLI_assert, node, PBVH_FullyUnmasked, and PBVH_Leaf.
Referenced by pbvh_update_mask_redraw_task_cb().
Definition at line 1915 of file pbvh.c.
References copy_v3_v3(), and node.
Referenced by BKE_pbvh_raycast_project_ray_root(), SCULPT_search_circle_cb(), and SCULPT_search_sphere_cb().
| void BKE_pbvh_node_get_bm_orco_data | ( | PBVHNode * | node, |
| int(**) | r_orco_tris[3], | ||
| int * | r_orco_tris_num, | ||
| float(**) | r_orco_coords[3] | ||
| ) |
Definition at line 1947 of file pbvh.c.
References node.
Referenced by calc_area_normal_and_center_task_cb().
| void BKE_pbvh_node_get_grids | ( | PBVH * | pbvh, |
| PBVHNode * | node, | ||
| int ** | r_grid_indices, | ||
| int * | r_totgrid, | ||
| int * | r_maxgrid, | ||
| int * | r_gridsize, | ||
| CCGElem *** | r_griddata | ||
| ) |
Definition at line 1868 of file pbvh.c.
References CCGKey::grid_size, PBVH::gridkey, PBVH::grids, node, NULL, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, PBVH::totgrid, and PBVH::type.
Referenced by partialvis_update_grids(), pbvh_grids_node_visibility_update(), pbvh_vertex_iter_init(), sculpt_undo_alloc_and_store_hidden(), sculpt_undo_alloc_node(), SCULPT_undo_push_node(), and update_cb_partial().
Definition at line 1921 of file pbvh.c.
References copy_v3_v3(), and node.
Referenced by BKE_pbvh_raycast_project_ray_root(), SCULPT_search_circle_cb(), and SCULPT_search_sphere_cb().
| void BKE_pbvh_node_get_proxies | ( | PBVHNode * | node, |
| PBVHProxyNode ** | proxies, | ||
| int * | proxy_count | ||
| ) |
Definition at line 1927 of file pbvh.c.
Referenced by sculpt_combine_proxies_task_cb().
Definition at line 954 of file pbvh.c.
References node.
Referenced by sculpt_find_nearest_to_ray_cb(), sculpt_raycast_cb(), and sculpt_raycast_detail_cb().
| void BKE_pbvh_node_get_verts | ( | PBVH * | pbvh, |
| PBVHNode * | node, | ||
| const int ** | r_vert_indices, | ||
| MVert ** | r_verts | ||
| ) |
Definition at line 1820 of file pbvh.c.
References node, and PBVH::verts.
Referenced by partialvis_update_mesh(), pbvh_faces_node_visibility_update(), pbvh_vertex_iter_init(), SCULPT_undo_push_node(), and sculpt_undo_store_hidden().
| void BKE_pbvh_node_mark_normals_update | ( | PBVHNode * | node | ) |
Definition at line 1764 of file pbvh.c.
References node, and PBVH_UpdateNormals.
Referenced by mask_flood_fill_task_cb(), mask_gesture_apply_task_cb(), and SCULPT_filter_cache_init().
| void BKE_pbvh_node_mark_rebuild_draw | ( | PBVHNode * | node | ) |
Definition at line 1754 of file pbvh.c.
References node, PBVH_RebuildDrawBuffers, PBVH_UpdateDrawBuffers, and PBVH_UpdateRedraw.
Referenced by BKE_pbvh_grids_update(), build_grid_leaf_node(), build_mesh_leaf_node(), partialvis_update_bmesh(), partialvis_update_grids(), partialvis_update_mesh(), pbvh_bmesh_create_nodes_fast_recursive(), and pbvh_bmesh_node_finalize().
| void BKE_pbvh_node_mark_redraw | ( | PBVHNode * | node | ) |
Definition at line 1759 of file pbvh.c.
References node, PBVH_UpdateDrawBuffers, and PBVH_UpdateRedraw.
Referenced by do_brush_action_task_cb(), do_mask_by_color_contiguous_update_nodes_cb(), do_mask_by_color_task_cb(), sculpt_expand_face_sets_update(), sculpt_expand_restore_color_data(), sculpt_expand_restore_face_set_data(), sculpt_expand_restore_mask_data(), sculpt_expand_task_cb(), sculpt_face_set_create_exec(), sculpt_face_sets_randomize_colors_exec(), sculpt_mask_expand_cancel(), sculpt_mask_expand_invoke(), sculpt_mask_expand_modal(), and sculpt_undo_bmesh_restore_generic_task_cb().
| void BKE_pbvh_node_mark_update | ( | PBVHNode * | node | ) |
Definition at line 1732 of file pbvh.c.
References node, PBVH_UpdateBB, PBVH_UpdateDrawBuffers, PBVH_UpdateNormals, PBVH_UpdateOriginalBB, and PBVH_UpdateRedraw.
Referenced by BKE_pbvh_vert_coords_apply(), BKE_sculpt_update_object_before_eval(), cloth_filter_apply_forces_task_cb(), do_brush_action_task_cb(), mesh_filter_task_cb(), paint_mesh_restore_co_task_cb(), project_line_gesture_apply_task_cb(), sculpt_face_set_edit_modify_coordinates(), sculpt_topology_update(), sculpt_transform_task_cb(), and update_cb().
| void BKE_pbvh_node_mark_update_color | ( | PBVHNode * | node | ) |
Definition at line 1743 of file pbvh.c.
References node, PBVH_UpdateColor, PBVH_UpdateDrawBuffers, and PBVH_UpdateRedraw.
Referenced by color_filter_task_cb(), do_brush_action_task_cb(), and sculpt_expand_colors_update_task_cb().
| void BKE_pbvh_node_mark_update_mask | ( | PBVHNode * | node | ) |
Definition at line 1738 of file pbvh.c.
References node, PBVH_UpdateDrawBuffers, PBVH_UpdateMask, and PBVH_UpdateRedraw.
Referenced by dirty_mask_apply_task_cb(), do_brush_action_task_cb(), mask_filter_task_cb(), mask_flood_fill_task_cb(), mask_gesture_apply_task_cb(), mask_init_task_cb(), sculpt_expand_finish(), sculpt_expand_mask_update_task_cb(), sculpt_expand_task_cb(), and update_cb().
| void BKE_pbvh_node_mark_update_visibility | ( | PBVHNode * | node | ) |
Definition at line 1748 of file pbvh.c.
References node, PBVH_RebuildDrawBuffers, PBVH_UpdateDrawBuffers, PBVH_UpdateRedraw, and PBVH_UpdateVisibility.
Referenced by face_set_edit_do_post_visibility_updates(), face_set_gesture_apply_task_cb(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), and update_cb().
Definition at line 1834 of file pbvh.c.
References BLI_gset_len(), CCGKey::grid_area, PBVH::gridkey, node, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, and PBVH::type.
Referenced by BKE_pbvh_node_add_proxy(), partialvis_update_mesh(), pbvh_faces_node_visibility_update(), pbvh_vertex_iter_init(), sculpt_undo_alloc_node(), SCULPT_undo_push_node(), and sculpt_undo_store_hidden().
| bool BKE_pbvh_node_raycast | ( | PBVH * | pbvh, |
| PBVHNode * | node, | ||
| float(*) | origco[3], | ||
| bool | use_origco, | ||
| const float | ray_start[3], | ||
| const float | ray_normal[3], | ||
| struct IsectRayPrecalc * | isect_precalc, | ||
| float * | depth, | ||
| int * | active_vertex_index, | ||
| int * | active_face_grid_index, | ||
| float * | face_normal | ||
| ) |
Definition at line 2294 of file pbvh.c.
References PBVH::bm, BM_mesh_elem_index_ensure(), BM_VERT, node, PBVH_BMESH, pbvh_bmesh_node_raycast(), PBVH_FACES, pbvh_faces_node_raycast(), PBVH_FullyHidden, PBVH_GRIDS, pbvh_grids_node_raycast(), and PBVH::type.
Referenced by sculpt_raycast_cb().
Definition at line 1962 of file pbvh.c.
References BLI_assert, MVert::flag, ME_VERT_PBVH_UPDATE, node, PBVH_FACES, PBVH::type, v, PBVH::verts, and verts.
Referenced by update_cb_partial().
| void BKE_pbvh_parallel_range_settings | ( | TaskParallelSettings * | settings, |
| bool | use_threading, | ||
| int | totnode | ||
| ) |
Definition at line 3042 of file pbvh.c.
References TaskParallelSettings::use_threading.
Referenced by bmesh_topology_rake(), calc_area_center(), calc_area_normal_and_center(), calculate_average_color(), calculate_average_weight(), cloth_brush_apply_brush_foces(), do_brush_action(), do_clay_brush(), do_clay_strips_brush(), do_clay_thumb_brush(), do_crease_brush(), do_displacement_eraser_brush(), do_displacement_smear_brush(), do_draw_brush(), do_draw_sharp_brush(), do_elastic_deform_brush(), do_fill_brush(), do_flatten_brush(), do_grab_brush(), do_gravity(), do_inflate_brush(), do_layer_brush(), do_mask_brush_draw(), do_nudge_brush(), do_pinch_brush(), do_rotate_brush(), do_scrape_brush(), do_slide_relax_brush(), do_snake_hook_brush(), do_thumb_brush(), mask_flood_fill_exec(), paint_mesh_restore_co(), pbvh_faces_update_normals(), pbvh_update_BB_redraw(), pbvh_update_draw_buffers(), pbvh_update_mask_redraw(), pbvh_update_visibility(), pbvh_update_visibility_redraw(), SCULPT_cloth_brush_do_simulation_step(), SCULPT_cloth_brush_ensure_nodes_constraints(), sculpt_cloth_filter_modal(), sculpt_color_filter_modal(), sculpt_combine_proxies(), sculpt_dirty_mask_exec(), SCULPT_do_boundary_brush(), SCULPT_do_draw_face_sets_brush(), SCULPT_do_multiplane_scrape_brush(), SCULPT_do_paint_brush(), SCULPT_do_pose_brush(), SCULPT_do_smear_brush(), SCULPT_do_surface_smooth_brush(), SCULPT_enhance_details_brush(), sculpt_expand_update_for_vertex(), SCULPT_fake_neighbor_search(), SCULPT_filter_cache_init(), SCULPT_flush_stroke_deform(), sculpt_gesture_face_set_apply_for_symmetry_pass(), sculpt_gesture_mask_apply_for_symmetry_pass(), sculpt_gesture_project_apply_for_symmetry_pass(), sculpt_mask_by_color_contiguous(), sculpt_mask_by_color_full_mesh(), sculpt_mask_expand_invoke(), sculpt_mask_expand_modal(), sculpt_mask_filter_exec(), SCULPT_mask_filter_smooth_apply(), sculpt_mask_init_exec(), sculpt_mesh_filter_modal(), SCULPT_nearest_vertex_get(), SCULPT_pbvh_calc_area_normal(), SCULPT_pose_brush_init(), sculpt_pose_grow_pose_factor(), SCULPT_smooth(), sculpt_transform_all_vertices(), sculpt_undo_bmesh_restore_generic(), vpaint_paint_leaves(), and wpaint_paint_leaves().
| void BKE_pbvh_raycast | ( | PBVH * | pbvh, |
| BKE_pbvh_HitOccludedCallback | cb, | ||
| void * | data, | ||
| const float | ray_start[3], | ||
| const float | ray_normal[3], | ||
| bool | original | ||
| ) |
Definition at line 2006 of file pbvh.c.
References BKE_pbvh_search_callback_occluded(), data, isect_ray_aabb_v3_precalc(), RaycastData::original, RaycastData::ray, and ray_aabb_intersect().
Referenced by sample_detail_dyntopo(), SCULPT_cursor_geometry_info_update(), and SCULPT_stroke_get_location().
| void BKE_pbvh_raycast_project_ray_root | ( | PBVH * | pbvh, |
| bool | original, | ||
| float | ray_start[3], | ||
| float | ray_end[3], | ||
| float | ray_normal[3] | ||
| ) |
Definition at line 2353 of file pbvh.c.
References add_v3_v3(), BKE_pbvh_node_get_BB(), BKE_pbvh_node_get_original_BB(), isect_ray_aabb_v3(), isect_ray_aabb_v3_precalc(), madd_v3_v3v3fl(), mid_v3_v3v3(), mul_v3_v3fl(), PBVH::nodes, and sub_v3_v3v3().
Referenced by SCULPT_raycast_init().
Definition at line 1592 of file pbvh.c.
References BB_expand_with_bb(), BB_reset(), BB::bmax, BB::bmin, copy_v3_v3(), node, NULL, pbvh_iter_begin(), pbvh_iter_end(), pbvh_iter_next(), and PBVH_UpdateRedraw.
Referenced by SCULPT_get_redraw_rect().
| void BKE_pbvh_respect_hide_set | ( | PBVH * | pbvh, |
| bool | respect_hide | ||
| ) |
Definition at line 3066 of file pbvh.c.
References PBVH::respect_hide.
Referenced by build_pbvh_from_ccg(), and build_pbvh_from_regular_mesh().
| void BKE_pbvh_search_callback | ( | PBVH * | pbvh, |
| BKE_pbvh_SearchCallback | scb, | ||
| void * | search_data, | ||
| BKE_pbvh_HitCallback | hcb, | ||
| void * | hit_data | ||
| ) |
Definition at line 876 of file pbvh.c.
References node, pbvh_iter_begin(), pbvh_iter_end(), pbvh_iter_next(), and PBVH_Leaf.
Referenced by sculpt_undo_restore_list().
|
static |
Definition at line 959 of file pbvh.c.
References node_tree::data, free_tree(), node_tree::left, node, node_tree_insert(), NULL, pbvh_iter_begin(), pbvh_iter_end(), pbvh_iter_next_occluded(), PBVH_Leaf, node_tree::right, traverse_tree(), and tree.
Referenced by BKE_pbvh_find_nearest_to_ray(), and BKE_pbvh_raycast().
| void BKE_pbvh_search_gather | ( | PBVH * | pbvh, |
| BKE_pbvh_SearchCallback | scb, | ||
| void * | search_data, | ||
| PBVHNode *** | r_array, | ||
| int * | r_tot | ||
| ) |
Definition at line 843 of file pbvh.c.
References MEM_freeN, MEM_recallocN_id, node, NULL, pbvh_iter_begin(), pbvh_iter_end(), pbvh_iter_next(), PBVH_Leaf, and UNLIKELY.
Referenced by BKE_pbvh_draw_cb(), BKE_pbvh_node_color_buffer_free(), BKE_pbvh_update_bounds(), BKE_pbvh_update_normals(), BKE_pbvh_update_vertex_data(), BKE_pbvh_update_visibility(), BKE_sculpt_update_object_before_eval(), cloth_sim_initialize_default_node_state(), do_brush_action(), get_pbvh_nodes(), mask_flood_fill_exec(), paint_mesh_restore_co(), SCULPT_cloth_brush_affected_nodes_gather(), sculpt_detail_flood_fill_exec(), sculpt_dirty_mask_exec(), sculpt_expand_finish(), sculpt_expand_invoke(), sculpt_expand_restore_color_data(), sculpt_expand_restore_face_set_data(), sculpt_expand_restore_mask_data(), sculpt_expand_undo_push(), sculpt_face_set_create_exec(), sculpt_face_set_edit_modify_coordinates(), sculpt_face_set_edit_modify_face_sets(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), sculpt_face_sets_randomize_colors_exec(), SCULPT_fake_neighbor_search(), SCULPT_filter_cache_init(), SCULPT_flush_stroke_deform(), sculpt_gesture_update_effected_nodes_by_clip_planes(), sculpt_gesture_update_effected_nodes_by_line_plane(), sculpt_mask_by_color_contiguous(), sculpt_mask_by_color_full_mesh(), sculpt_mask_expand_invoke(), sculpt_mask_filter_exec(), sculpt_mask_init_exec(), SCULPT_nearest_vertex_get(), sculpt_pbvh_gather_cursor_update(), sculpt_pbvh_gather_generic(), SCULPT_pose_brush_init(), sculpt_pose_grow_pose_factor(), sculpt_set_pivot_position_exec(), sculpt_undo_bmesh_restore_generic(), sculpt_undo_push_all_grids(), and vwpaint_pbvh_gather_generic().
| void BKE_pbvh_set_frustum_planes | ( | PBVH * | pbvh, |
| PBVHFrustumPlanes * | planes | ||
| ) |
Definition at line 3026 of file pbvh.c.
References copy_v4_v4(), PBVHFrustumPlanes::num_planes, PBVH::num_planes, PBVHFrustumPlanes::planes, and PBVH::planes.
Referenced by drw_sculpt_generate_calls().
Definition at line 3056 of file pbvh.c.
References PBVH::subdiv_ccg.
Referenced by sculpt_update_object().
| void BKE_pbvh_sync_face_sets_to_grids | ( | PBVH * | pbvh | ) |
Definition at line 387 of file pbvh.c.
References BKE_subdiv_ccg_grid_to_face_index(), BLI_BITMAP_NEW, BLI_BITMAP_SET, PBVH::face_sets, CCGKey::grid_area, PBVH::grid_hidden, CCGKey::grid_size, PBVH::gridkey, PBVH::subdiv_ccg, PBVH::totgrid, x, and y.
Definition at line 1661 of file pbvh.c.
References PBVH::type.
Referenced by BKE_sculpt_object_pbvh_ensure(), BKE_sculptsession_use_pbvh_draw(), do_brush_action(), do_draw_face_sets_brush_task_cb_ex(), do_vpaint_brush_blur_task_cb_ex(), do_vpaint_brush_calc_average_color_cb_ex(), do_vpaint_brush_draw_task_cb_ex(), do_vpaint_brush_smear_task_cb_ex(), do_wpaint_brush_blur_task_cb_ex(), do_wpaint_brush_calc_average_weight_cb_ex(), do_wpaint_brush_draw_task_cb_ex(), do_wpaint_brush_smear_task_cb_ex(), face_set_edit_do_post_visibility_updates(), hide_show_exec(), mask_flood_fill_exec(), mask_gesture_apply_task_cb(), multires_flush_sculpt_updates(), multires_stitch_grids(), paint_cursor_sculpt_session_update_and_init(), pbvh_update_visibility_task_cb(), sample_detail(), SCULPT_active_face_set_get(), SCULPT_active_vertex_get(), sculpt_boundary_edit_data_init(), sculpt_color_filter_invoke(), SCULPT_cursor_geometry_info_update(), sculpt_expand_active_face_set_id_get(), sculpt_expand_diagonals_falloff_create(), sculpt_expand_falloff_factors_from_vertex_and_symm_create(), sculpt_expand_geodesics_from_state_boundary(), sculpt_expand_initialize_from_face_set_boundary(), sculpt_expand_invoke(), sculpt_expand_mesh_face_falloff_from_vertex_falloff(), sculpt_expand_resursion_step_add(), sculpt_expand_snap_initialize_from_enabled(), sculpt_face_set_create_exec(), sculpt_face_set_edit_is_operation_valid(), sculpt_face_set_init_exec(), SCULPT_face_set_next_available_get(), SCULPT_face_set_visibility_set(), sculpt_face_sets_automasking_init(), sculpt_face_sets_change_visibility_exec(), sculpt_face_sets_randomize_colors_exec(), SCULPT_face_sets_visibility_all_set(), SCULPT_face_sets_visibility_invert(), SCULPT_filter_cache_init(), sculpt_find_nearest_to_ray_cb(), SCULPT_flush_update_done(), SCULPT_geodesic_distances_create(), sculpt_geometry_preview_lines_draw(), SCULPT_geometry_preview_lines_update(), sculpt_gesture_mask_end(), sculpt_mask_by_color_invoke(), SCULPT_mesh_deformed_mverts_get(), sculpt_no_multires_poll(), sculpt_raycast_cb(), SCULPT_smooth(), SCULPT_stroke_get_location(), SCULPT_stroke_is_dynamic_topology(), sculpt_symmetrize_exec(), SCULPT_topology_automasking_init(), sculpt_topology_update(), sculpt_trim_gesture_box_exec(), sculpt_trim_gesture_lasso_exec(), sculpt_undo_restore_list(), SCULPT_vertex_all_face_sets_visible_get(), SCULPT_vertex_any_face_set_visible_get(), SCULPT_vertex_co_get(), SCULPT_vertex_color_get(), SCULPT_vertex_count_get(), SCULPT_vertex_face_set_get(), SCULPT_vertex_face_set_set(), SCULPT_vertex_has_face_set(), SCULPT_vertex_has_unique_face_set(), SCULPT_vertex_is_boundary(), SCULPT_vertex_limit_surface_get(), SCULPT_vertex_mask_get(), SCULPT_vertex_neighbors_get(), SCULPT_vertex_normal_get(), SCULPT_vertex_random_access_ensure(), SCULPT_vertex_visible_get(), SCULPT_vertex_visible_set(), SCULPT_visibility_sync_all_face_sets_to_vertices(), SCULPT_visibility_sync_all_vertex_to_face_sets(), stats_object_sculpt(), and update_cb_partial().
| void BKE_pbvh_update_bounds | ( | PBVH * | pbvh, |
| int | flag | ||
| ) |
Definition at line 1410 of file pbvh.c.
References BKE_pbvh_search_gather(), MEM_SAFE_FREE, PBVH::nodes, pbvh_flush_bb(), pbvh_update_BB_redraw(), PBVH_UpdateBB, PBVH_UpdateOriginalBB, PBVH_UpdateRedraw, POINTER_FROM_INT, and update_search_cb().
Referenced by BKE_pbvh_vert_coords_apply(), ED_sculpt_redraw_planes_get(), SCULPT_flush_update_done(), SCULPT_flush_update_step(), sculpt_undo_restore_list(), and vwpaint_update_cache_variants().
Definition at line 2650 of file pbvh.c.
References BKE_pbvh_get_grid_updates(), BKE_pbvh_search_gather(), BKE_subdiv_ccg_update_normals(), faces, MEM_freeN, MEM_SAFE_FREE, PBVH_BMESH, pbvh_bmesh_normals_update(), PBVH_FACES, pbvh_faces_update_normals(), PBVH_GRIDS, PBVH_UpdateNormals, POINTER_FROM_INT, PBVH::type, and update_search_cb().
Referenced by DRW_mesh_batch_cache_create_requested(), drw_sculpt_generate_calls(), SCULPT_filter_cache_init(), and sculpt_mesh_filter_modal().
| void BKE_pbvh_update_vertex_data | ( | PBVH * | pbvh, |
| int | flag | ||
| ) |
Definition at line 1432 of file pbvh.c.
References BKE_pbvh_search_gather(), MEM_freeN, PBVH::nodes, pbvh_update_mask_redraw(), pbvh_update_visibility_redraw(), PBVH_UpdateColor, PBVH_UpdateMask, PBVH_UpdateVisibility, POINTER_FROM_INT, and update_search_cb().
Referenced by face_set_edit_do_post_visibility_updates(), mask_flood_fill_exec(), sculpt_dirty_mask_exec(), sculpt_face_set_init_exec(), sculpt_face_sets_change_visibility_exec(), SCULPT_flush_update_done(), sculpt_gesture_face_set_end(), sculpt_gesture_mask_end(), sculpt_mask_by_color_invoke(), sculpt_mask_init_exec(), and sculpt_undo_restore_list().
| void BKE_pbvh_update_visibility | ( | PBVH * | pbvh | ) |
Definition at line 1574 of file pbvh.c.
References BKE_pbvh_search_gather(), MEM_freeN, PBVH::nodes, pbvh_update_visibility(), PBVH_UpdateVisibility, POINTER_FROM_INT, and update_search_cb().
Referenced by sculpt_undo_restore_list().
Definition at line 2780 of file pbvh.c.
References Freestyle::a, MVert::co, copy_v3_v3(), float(), MEM_callocN, NULL, PBVH::totvert, and PBVH::verts.
Referenced by sculpt_update_keyblock().
Definition at line 2798 of file pbvh.c.
References Freestyle::a, BKE_mesh_calc_normals_looptri(), BKE_pbvh_node_mark_update(), BKE_pbvh_update_bounds(), BLI_assert, MVert::co, copy_v3_v3(), PBVH::deformed, MVert::flag, PBVH::looptri, ME_VERT_PBVH_UPDATE, MEM_dupallocN, PBVH::mloop, PBVH::nodes, NULL, PBVH_UpdateBB, PBVH_UpdateOriginalBB, PBVH::totnode, PBVH::totprim, PBVH::totvert, and PBVH::verts.
Referenced by build_pbvh_from_regular_mesh(), sculpt_undo_restore_coords(), and sculpt_update_object().
Definition at line 407 of file pbvh.c.
References BKE_pbvh_count_grid_quads(), BKE_pbvh_node_fully_hidden_set(), BKE_pbvh_node_mark_rebuild_draw(), PBVH::grid_hidden, CCGKey::grid_size, PBVH::gridkey, and node.
Referenced by build_leaf().
|
static |
Definition at line 415 of file pbvh.c.
References build_grid_leaf_node(), build_mesh_leaf_node(), count, PBVHNode::flag, PBVH::looptri, PBVH::nodes, PBVH_Leaf, PBVHNode::prim_indices, PBVH::prim_indices, PBVHNode::totprim, and update_vb().
Referenced by build_sub().
Definition at line 279 of file pbvh.c.
References BKE_pbvh_node_fully_hidden_set(), BKE_pbvh_node_mark_rebuild_draw(), BLI_ghash_free(), BLI_ghash_int_new_ex(), BLI_ghashIterator_getKey(), BLI_ghashIterator_getValue(), GHASH_ITER, PBVH::looptri, map_insert_vert(), MEM_callocN, MEM_mallocN, PBVH::mloop, node, NULL, paint_is_face_hidden(), POINTER_AS_INT, PBVH::respect_hide, MLoopTri::tri, MLoop::v, and PBVH::verts.
Referenced by build_leaf().
|
static |
Definition at line 478 of file pbvh.c.
References BB_expand(), BB_reset(), BB_widest_axis(), BBC::bcentroid, BB::bmax, BB::bmin, build_leaf(), PBVHNode::children_offset, count, PBVH::leaf_limit, leaf_needs_material_split(), PBVH::nodes, NULL, partition_indices(), partition_indices_material(), pbvh_grow_nodes(), PBVH::prim_indices, PBVH::totnode, and update_vb().
Referenced by pbvh_build().
|
static |
Definition at line 2061 of file pbvh.c.
References copy_v3_v3(), dist_squared_ray_to_seg_v3(), IsectRayAABB_Precalc::ray_origin, v1, and v2.
Referenced by ray_face_nearest_quad(), and ray_face_nearest_tri().
Definition at line 163 of file pbvh.c.
References MPoly::flag, MPoly::mat_nr, and ME_SMOOTH.
Referenced by leaf_needs_material_split(), and partition_indices_material().
|
static |
Definition at line 168 of file pbvh.c.
References DMFlagMat::flag, DMFlagMat::mat_nr, and ME_SMOOTH.
Referenced by leaf_needs_material_split(), and partition_indices_material().
|
static |
Definition at line 435 of file pbvh.c.
References count, face_materials_match(), PBVH::grid_flag_mats, grid_materials_match(), PBVH::looptri, PBVH::mpoly, MLoopTri::poly, and PBVH::prim_indices.
Referenced by build_sub().
|
static |
Definition at line 254 of file pbvh.c.
References BLI_BITMAP_ENABLE, BLI_BITMAP_TEST, BLI_ghash_ensure_p(), POINTER_AS_INT, POINTER_FROM_INT, and PBVH::vert_bitmap.
Referenced by build_mesh_leaf_node().
|
static |
Definition at line 2407 of file pbvh.c.
References FindNearestRayData::dist_ray_to_aabb_precalc, dist_squared_ray_to_aabb_v3(), node, and FindNearestRayData::original.
Referenced by BKE_pbvh_find_nearest_to_ray().
Definition at line 903 of file pbvh.c.
References node_tree::data, PBVHNode::tmin, and tree.
Referenced by BKE_pbvh_search_callback_occluded().
|
static |
Definition at line 175 of file pbvh.c.
References BBC::bcentroid, and SWAP.
Referenced by build_sub().
|
static |
Definition at line 196 of file pbvh.c.
References face_materials_match(), PBVH::grid_flag_mats, grid_materials_match(), indices, PBVH::looptri, PBVH::mpoly, MLoopTri::poly, PBVH::prim_indices, and SWAP.
Referenced by build_sub().
|
static |
Definition at line 1510 of file pbvh.c.
References BKE_pbvh_bmesh_node_other_verts(), BKE_pbvh_bmesh_node_unique_verts(), BKE_pbvh_node_fully_hidden_set(), BLI_gsetIterator_getKey(), BM_elem_flag_test, BM_ELEM_HIDDEN, GSET_ITER, node, and v.
Referenced by pbvh_update_visibility_task_cb().
Definition at line 533 of file pbvh.c.
References build_sub(), MEM_callocN, MEM_freeN, MEM_mallocN, PBVH::node_mem_count, PBVH::nodes, PBVH::prim_indices, PBVH::totnode, and PBVH::totprim.
Referenced by BKE_pbvh_build_grids(), and BKE_pbvh_build_mesh().
|
static |
Definition at line 2695 of file pbvh.c.
References BKE_pbvh_node_frustum_contain_AABB(), data, and node.
Referenced by BKE_pbvh_draw_cb().
|
static |
Definition at line 2445 of file pbvh.c.
References MVert::co, faces, PBVH::looptri, PBVH::mloop, node, paint_is_face_hidden(), ray_face_nearest_tri(), PBVH::respect_hide, MLoopTri::tri, MLoop::v, and PBVH::verts.
Referenced by BKE_pbvh_node_find_nearest_to_ray().
|
static |
Definition at line 2132 of file pbvh.c.
References MVert::co, copy_v3_v3(), faces, len_squared_v3v3(), PBVH::looptri, madd_v3_v3v3fl(), PBVH::mloop, node, normal_tri_v3(), paint_is_face_hidden(), MLoopTri::poly, ray_face_intersection_tri(), PBVH::respect_hide, MLoopTri::tri, MLoop::v, and PBVH::verts.
Referenced by BKE_pbvh_node_raycast().
Definition at line 1460 of file pbvh.c.
References BKE_pbvh_node_fully_hidden_set(), BKE_pbvh_node_get_verts(), BKE_pbvh_node_num_verts(), ME_HIDE, node, NULL, and v.
Referenced by pbvh_update_visibility_task_cb().
Definition at line 1099 of file pbvh.c.
References BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, float(), MEM_callocN, MEM_freeN, PBVH::nodes, pbvh_update_normals_accum_task_cb(), pbvh_update_normals_store_task_cb(), and PBVH::totvert.
Referenced by BKE_pbvh_update_normals().
Definition at line 1378 of file pbvh.c.
References node, PBVH::nodes, PBVH_Leaf, PBVH_UpdateBB, PBVH_UpdateOriginalBB, update(), and update_node_vb().
Referenced by BKE_pbvh_update_bounds().
|
static |
Definition at line 1254 of file pbvh.c.
References GPU_PBVH_BUFFERS_SHOW_MASK, GPU_PBVH_BUFFERS_SHOW_SCULPT_FACE_SETS, and GPU_PBVH_BUFFERS_SHOW_VCOL.
Referenced by pbvh_update_draw_buffer_cb().
|
static |
Definition at line 2492 of file pbvh.c.
References CCG_grid_elem_co(), PBVH::grid_hidden, CCGKey::grid_size, PBVH::gridkey, PBVH::grids, node, paint_is_grid_face_hidden(), ray_face_nearest_quad(), x, and y.
Referenced by BKE_pbvh_node_find_nearest_to_ray().
|
static |
Definition at line 2200 of file pbvh.c.
References CCG_grid_elem_co(), copy_v3_v3(), CCGKey::grid_area, PBVH::grid_hidden, CCGKey::grid_size, PBVH::gridkey, PBVH::grids, len_squared_v3v3(), madd_v3_v3v3fl(), node, normal_quad_v3(), paint_is_grid_face_hidden(), ray_face_intersection_quad(), x, and y.
Referenced by BKE_pbvh_node_raycast().
Definition at line 1479 of file pbvh.c.
References BKE_pbvh_get_grid_key(), BKE_pbvh_grid_hidden(), BKE_pbvh_node_fully_hidden_set(), BKE_pbvh_node_get_grids(), BLI_BITMAP_TEST, CCGKey::grid_size, node, NULL, x, and y.
Referenced by pbvh_update_visibility_task_cb().
| void pbvh_grow_nodes | ( | PBVH * | pbvh, |
| int | totnode | ||
| ) |
Definition at line 239 of file pbvh.c.
References MEM_recallocN, PBVH::node_mem_count, PBVH::nodes, PBVH::totnode, and UNLIKELY.
Referenced by build_sub(), pbvh_bmesh_create_nodes_fast_recursive(), and pbvh_bmesh_node_split().
| bool pbvh_has_face_sets | ( | PBVH * | pbvh | ) |
Definition at line 3002 of file pbvh.c.
References CD_SCULPT_FACE_SETS, CustomData_get_layer(), PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, PBVH::pdata, and PBVH::type.
Referenced by OVERLAY_sculpt_cache_populate().
| bool pbvh_has_mask | ( | PBVH * | pbvh | ) |
Definition at line 2988 of file pbvh.c.
References PBVH::bm, CD_PAINT_MASK, CustomData_get_layer(), CustomData_get_offset(), PBVH::gridkey, CCGKey::has_mask, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, PBVH::type, PBVH::vdata, and BMesh::vdata.
Referenced by OVERLAY_sculpt_cache_populate().
|
static |
Definition at line 729 of file pbvh.c.
References PBVHStack::node, PBVH::nodes, PBVHIter::pbvh, PBVHStack::revisiting, PBVHIter::scb, PBVHIter::search_data, PBVHIter::stack, STACK_FIXED_DEPTH, PBVHIter::stackfixed, PBVHIter::stacksize, and PBVHIter::stackspace.
Referenced by BKE_pbvh_get_grid_updates(), BKE_pbvh_redraw_BB(), BKE_pbvh_search_callback(), BKE_pbvh_search_callback_occluded(), and BKE_pbvh_search_gather().
|
static |
Definition at line 746 of file pbvh.c.
References MEM_freeN, PBVHIter::stack, STACK_FIXED_DEPTH, and PBVHIter::stackspace.
Referenced by BKE_pbvh_get_grid_updates(), BKE_pbvh_redraw_BB(), BKE_pbvh_search_callback(), BKE_pbvh_search_callback_occluded(), and BKE_pbvh_search_gather().
Definition at line 771 of file pbvh.c.
References PBVHStack::node, node, PBVH::nodes, NULL, PBVHIter::pbvh, PBVH_Leaf, pbvh_stack_push(), PBVHStack::revisiting, PBVHIter::scb, PBVHIter::search_data, PBVHIter::stack, and PBVHIter::stacksize.
Referenced by BKE_pbvh_get_grid_updates(), BKE_pbvh_redraw_BB(), BKE_pbvh_search_callback(), and BKE_pbvh_search_gather().
Definition at line 814 of file pbvh.c.
References PBVHStack::node, node, PBVH::nodes, NULL, PBVHIter::pbvh, PBVH_Leaf, pbvh_stack_push(), PBVHIter::scb, PBVHIter::search_data, PBVHIter::stack, and PBVHIter::stacksize.
Referenced by BKE_pbvh_search_callback_occluded().
| void pbvh_show_face_sets_set | ( | PBVH * | pbvh, |
| bool | show_face_sets | ||
| ) |
Definition at line 3021 of file pbvh.c.
References PBVH::show_face_sets.
Referenced by build_pbvh_for_dynamic_topology(), build_pbvh_from_ccg(), build_pbvh_from_regular_mesh(), and sculpt_update_object().
| void pbvh_show_mask_set | ( | PBVH * | pbvh, |
| bool | show_mask | ||
| ) |
Definition at line 3016 of file pbvh.c.
References PBVH::show_mask.
Referenced by build_pbvh_for_dynamic_topology(), build_pbvh_from_ccg(), build_pbvh_from_regular_mesh(), and sculpt_update_object().
Definition at line 753 of file pbvh.c.
References MEM_mallocN, MEM_reallocN, PBVHStack::node, node, PBVHStack::revisiting, PBVHIter::stack, STACK_FIXED_DEPTH, PBVHIter::stackfixed, PBVHIter::stacksize, PBVHIter::stackspace, and UNLIKELY.
Referenced by pbvh_iter_next(), and pbvh_iter_next_occluded().
Definition at line 1240 of file pbvh.c.
References BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, PBVHNode::flag, PBVH::nodes, and pbvh_update_BB_redraw_task_cb().
Referenced by BKE_pbvh_update_bounds().
|
static |
Definition at line 1216 of file pbvh.c.
References data, node, PBVH_UpdateBB, PBVH_UpdateOriginalBB, PBVH_UpdateRedraw, and update_node_vb().
Referenced by pbvh_update_BB_redraw().
|
static |
Definition at line 1261 of file pbvh.c.
References PBVH::bm, CD_MLOOPCOL, CD_PAINT_MASK, CD_PROP_COLOR, CD_SCULPT_FACE_SETS, CustomData_get_layer(), data, PBVH::face_sets, PBVH::face_sets_color_default, PBVH::face_sets_color_seed, PBVH::flags, GPU_pbvh_bmesh_buffers_build(), GPU_pbvh_bmesh_buffers_update(), GPU_pbvh_grid_buffers_build(), GPU_pbvh_grid_buffers_update(), GPU_pbvh_mesh_buffers_build(), GPU_pbvh_mesh_buffers_update(), PBVH::grid_flag_mats, PBVH::grid_hidden, PBVH::gridkey, PBVH::grids, PBVH::ldata, PBVH::looptri, PBVH::mesh, PBVH::mloop, PBVH::mpoly, node, PBVH_BMESH, PBVH_DYNTOPO_SMOOTH_SHADING, PBVH_FACES, pbvh_get_buffers_update_flags(), PBVH_GRIDS, PBVH_RebuildDrawBuffers, PBVH_UpdateDrawBuffers, PBVH::pdata, PBVH::subdiv_ccg, PBVH::type, PBVH::vdata, and PBVH::verts.
Referenced by pbvh_update_draw_buffers().
|
static |
Definition at line 1334 of file pbvh.c.
References BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, ELEM, GPU_pbvh_bmesh_buffers_update_free(), GPU_pbvh_buffers_free(), GPU_pbvh_buffers_update_flush(), GPU_pbvh_grid_buffers_update_free(), PBVH::grid_flag_mats, node, PBVH::nodes, NULL, PBVH_BMESH, PBVH_GRIDS, PBVH_RebuildDrawBuffers, pbvh_update_draw_buffer_cb(), PBVH_UpdateDrawBuffers, and PBVH::type.
Referenced by BKE_pbvh_draw_cb().
|
static |
Definition at line 1166 of file pbvh.c.
References BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, PBVHNode::flag, PBVH::nodes, and pbvh_update_mask_redraw_task_cb().
Referenced by BKE_pbvh_update_vertex_data().
|
static |
Definition at line 1130 of file pbvh.c.
References BKE_pbvh_node_fully_masked_set(), BKE_pbvh_node_fully_unmasked_set(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, data, PBVHVertexIter::mask, node, PBVH_ITER_ALL, PBVH_Leaf, and PBVH_UpdateMask.
Referenced by pbvh_update_mask_redraw().
|
static |
Definition at line 1019 of file pbvh.c.
References atomic_add_and_fetch_fl(), BKE_mesh_calc_poly_normal(), data, faces, MVert::flag, float(), MPoly::loopstart, PBVH::looptri, ME_VERT_PBVH_UPDATE, PBVH::mloop, PBVH::mpoly, node, PBVH_UpdateNormals, MLoopTri::poly, MLoopTri::tri, UINT_MAX, v, MLoop::v, and PBVH::verts.
Referenced by pbvh_faces_update_normals().
|
static |
Definition at line 1069 of file pbvh.c.
References data, MVert::flag, float(), ME_VERT_PBVH_UPDATE, MVert::no, node, normal_float_to_short_v3(), normalize_v3(), PBVH_UpdateNormals, v, PBVH::verts, and verts.
Referenced by pbvh_faces_update_normals().
Definition at line 1562 of file pbvh.c.
References BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, PBVH::nodes, and pbvh_update_visibility_task_cb().
Referenced by BKE_pbvh_update_visibility().
|
static |
Definition at line 1203 of file pbvh.c.
References BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, PBVHNode::flag, PBVH::nodes, and pbvh_update_visibility_redraw_task_cb().
Referenced by BKE_pbvh_update_vertex_data().
|
static |
Definition at line 1179 of file pbvh.c.
References BKE_pbvh_node_fully_hidden_set(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, data, node, PBVH_ITER_ALL, PBVH_Leaf, PBVH_UpdateVisibility, and PBVHVertexIter::visible.
Referenced by pbvh_update_visibility_redraw().
|
static |
Definition at line 1538 of file pbvh.c.
References BKE_pbvh_type(), data, node, PBVH_BMESH, pbvh_bmesh_node_visibility_update(), PBVH_FACES, pbvh_faces_node_visibility_update(), PBVH_GRIDS, pbvh_grids_node_visibility_update(), and PBVH_UpdateVisibility.
Referenced by pbvh_update_visibility().
| void pbvh_vertex_iter_init | ( | PBVH * | pbvh, |
| PBVHNode * | node, | ||
| PBVHVertexIter * | vi, | ||
| int | mode | ||
| ) |
Definition at line 2931 of file pbvh.c.
References BKE_pbvh_node_get_grids(), BKE_pbvh_node_get_verts(), BKE_pbvh_node_num_verts(), BLI_gsetIterator_init(), PBVH::bm, PBVHVertexIter::bm_other_verts, PBVHVertexIter::bm_unique_verts, PBVHVertexIter::bm_vdata, CD_PAINT_MASK, CD_PROP_COLOR, PBVHVertexIter::cd_vert_mask_offset, CustomData_get_layer(), CustomData_get_offset(), PBVHVertexIter::fno, PBVHVertexIter::gh, PBVHVertexIter::grid, PBVHVertexIter::grid_hidden, PBVH::grid_hidden, PBVHVertexIter::grid_indices, PBVH::gridkey, PBVHVertexIter::grids, PBVHVertexIter::gridsize, PBVHVertexIter::key, PBVHVertexIter::mask, PBVHVertexIter::mvert, PBVHVertexIter::mverts, PBVHVertexIter::no, node, NULL, PBVH_BMESH, PBVH_FACES, PBVH_ITER_ALL, PBVH_ITER_UNIQUE, PBVHVertexIter::respect_hide, PBVH::respect_hide, PBVHVertexIter::totgrid, PBVHVertexIter::totvert, PBVH::type, PBVHVertexIter::vcol, PBVH::vdata, BMesh::vdata, PBVHVertexIter::vert_indices, verts, PBVHVertexIter::visible, and PBVHVertexIter::vmask.
|
static |
Definition at line 1987 of file pbvh.c.
References isect_ray_aabb_v3(), node, RaycastData::original, and RaycastData::ray.
Referenced by BKE_pbvh_raycast().
| bool ray_face_intersection_quad | ( | const float | ray_start[3], |
| struct IsectRayPrecalc * | isect_precalc, | ||
| const float | t0[3], | ||
| const float | t1[3], | ||
| const float | t2[3], | ||
| const float | t3[3], | ||
| float * | depth | ||
| ) |
Definition at line 2021 of file pbvh.c.
References isect_ray_tri_watertight_v3(), and NULL.
Referenced by pbvh_grids_node_raycast().
| bool ray_face_intersection_tri | ( | const float | ray_start[3], |
| struct IsectRayPrecalc * | isect_precalc, | ||
| const float | t0[3], | ||
| const float | t1[3], | ||
| const float | t2[3], | ||
| float * | depth | ||
| ) |
Definition at line 2042 of file pbvh.c.
References isect_ray_tri_watertight_v3(), and NULL.
Referenced by BKE_pbvh_bmesh_node_raycast_detail(), pbvh_bmesh_node_raycast(), and pbvh_faces_node_raycast().
| bool ray_face_nearest_quad | ( | const float | ray_start[3], |
| const float | ray_normal[3], | ||
| const float | t0[3], | ||
| const float | t1[3], | ||
| const float | t2[3], | ||
| const float | t3[3], | ||
| float * | depth, | ||
| float * | dist_sq | ||
| ) |
Definition at line 2084 of file pbvh.c.
References dist_squared_ray_to_tri_v3_fast().
Referenced by pbvh_grids_node_nearest_to_ray().
| bool ray_face_nearest_tri | ( | const float | ray_start[3], |
| const float | ray_normal[3], | ||
| const float | t0[3], | ||
| const float | t1[3], | ||
| const float | t2[3], | ||
| float * | depth, | ||
| float * | dist_sq | ||
| ) |
Definition at line 2111 of file pbvh.c.
References dist_squared_ray_to_tri_v3_fast().
Referenced by pbvh_bmesh_node_nearest_to_ray(), and pbvh_faces_node_nearest_to_ray().
|
static |
Definition at line 2598 of file pbvh.c.
References dot_v3v3(), float(), ISECT_INSIDE, ISECT_INTERSECT, ISECT_OUTSIDE, PBVHFrustumPlanes::num_planes, PBVHFrustumPlanes::planes, and ret.
Referenced by BKE_pbvh_node_frustum_contain_AABB(), and BKE_pbvh_node_frustum_exclude_AABB().
|
static |
Definition at line 923 of file pbvh.c.
References tree.
Referenced by BKE_pbvh_search_callback_occluded().
Definition at line 131 of file pbvh.c.
References BB_expand(), BB_expand_with_bb(), BB_reset(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, PBVHVertexIter::co, node, PBVH::nodes, PBVH_ITER_ALL, PBVH_Leaf, and PBVHNode::vb.
Referenced by pbvh_flush_bb(), and pbvh_update_BB_redraw_task_cb().
|
static |
Definition at line 998 of file pbvh.c.
References node, PBVH_Leaf, and POINTER_AS_INT.
Referenced by BKE_pbvh_draw_cb(), BKE_pbvh_update_bounds(), BKE_pbvh_update_normals(), BKE_pbvh_update_vertex_data(), and BKE_pbvh_update_visibility().
|
static |
Definition at line 345 of file pbvh.c.
References BB_expand_with_bb(), BB_reset(), count, node, and PBVH::prim_indices.
Referenced by build_leaf(), and build_sub().