|
Blender V5.3
|
#include "BLI_bounds.hh"#include "BLI_heap_simple.hh"#include "BLI_map.hh"#include "BLI_math_geom_c.hh"#include "BLI_math_vector.hh"#include "BLI_math_vector_c.hh"#include "BLI_memarena.hh"#include "BLI_span.hh"#include "BLI_time.hh"#include "BLI_utildefines.hh"#include "BKE_global.hh"#include "BKE_paint_bvh.hh"#include "PRF_profile.hh"#include "bmesh.hh"#include "pbvh_intern.hh"#include "CLG_log.h"Go to the source code of this file.
Classes | |
| struct | blender::bke::pbvh::EdgeQueue |
| struct | blender::bke::pbvh::EdgeQueueContext |
| struct | blender::bke::pbvh::FastNodeBuildInfo |
Namespaces | |
| namespace | blender |
| BMesh Iterators. | |
| namespace | blender::bke |
| namespace | blender::bke::pbvh |
Macros | |
| #define | pbvh_bmesh_node_vert_use_count_is_equal(nodes, cd_face_node_offset, node, v, n) |
| #define | EDGE_QUEUE_TEST(e) |
| #define | EDGE_QUEUE_ENABLE(e) |
| #define | EDGE_QUEUE_DISABLE(e) |
Functions | |
| static void | blender::bke::pbvh::pbvh_bmesh_node_finalize (BMeshNode &n, const int node_index, const int cd_vert_node_offset, const int cd_face_node_offset) |
| static void | blender::bke::pbvh::pbvh_bmesh_node_split (Vector< BMeshNode > &nodes, Vector< bool > &node_changed, const int cd_vert_node_offset, const int cd_face_node_offset, const Span< Bounds< float3 > > face_bounds, const int node_index) |
| static bool | blender::bke::pbvh::pbvh_bmesh_node_limit_ensure (BMesh &bm, Vector< BMeshNode > &nodes, Vector< bool > &node_changed, const int cd_vert_node_offset, const int cd_face_node_offset, const int node_index) |
| BLI_INLINE int | blender::bke::pbvh::pbvh_bmesh_node_index_from_vert (const int cd_vert_node_offset, const BMVert *key) |
| BLI_INLINE int | blender::bke::pbvh::pbvh_bmesh_node_index_from_face (const int cd_face_node_offset, const BMFace *key) |
| BLI_INLINE BMeshNode * | blender::bke::pbvh::pbvh_bmesh_node_from_vert (MutableSpan< BMeshNode > nodes, const int cd_vert_node_offset, const BMVert *key) |
| BLI_INLINE BMeshNode * | blender::bke::pbvh::pbvh_bmesh_node_from_face (MutableSpan< BMeshNode > nodes, const int cd_face_node_offset, const BMFace *key) |
| static BMVert * | blender::bke::pbvh::pbvh_bmesh_vert_create (BMesh &bm, MutableSpan< BMeshNode > nodes, MutableSpan< bool > node_changed, BMLog &bm_log, const BMVert *v1, const BMVert *v2, const int node_index, const float3 &co, const float3 &no, const int cd_vert_node_offset, const int cd_vert_mask_offset) |
| static BMFace * | blender::bke::pbvh::pbvh_bmesh_face_create (BMesh &bm, MutableSpan< BMeshNode > nodes, MutableSpan< bool > node_changed, const int cd_face_node_offset, BMLog &bm_log, const int node_index, const Span< BMVert * > v_tri, const Span< BMEdge * > e_tri, const BMFace *f_example) |
| static int | blender::bke::pbvh::pbvh_bmesh_node_vert_use_count_at_most (MutableSpan< BMeshNode > nodes, const int cd_face_node_offset, const BMeshNode *node, BMVert *v, const int count_max) |
| static std::optional< int > | blender::bke::pbvh::pbvh_bmesh_vert_other_node_find (const int cd_vert_node_offset, const int cd_face_node_offset, BMVert *v) |
| static void | blender::bke::pbvh::pbvh_bmesh_vert_ownership_transfer (MutableSpan< BMeshNode > nodes, MutableSpan< bool > node_changed, const int cd_vert_node_offset, const int new_owner_index, BMVert *v) |
| static void | blender::bke::pbvh::pbvh_bmesh_vert_remove (MutableSpan< BMeshNode > nodes, MutableSpan< bool > node_changed, const int cd_vert_node_offset, const int cd_face_node_offset, BMVert *v) |
| static void | blender::bke::pbvh::pbvh_bmesh_face_remove (MutableSpan< BMeshNode > nodes, MutableSpan< bool > node_changed, const int cd_vert_node_offset, const int cd_face_node_offset, BMLog &bm_log, BMFace *f) |
| static Array< BMLoop * > | blender::bke::pbvh::pbvh_bmesh_edge_loops (BMEdge *e) |
| static void | blender::bke::pbvh::pbvh_bmesh_node_drop_orig (BMeshNode *node) |
| static bool | blender::bke::pbvh::edge_queue_tri_in_sphere (const EdgeQueue *queue, BMFace *f) |
| static bool | blender::bke::pbvh::edge_queue_tri_in_circle (const EdgeQueue *queue, BMFace *f) |
| static bool | blender::bke::pbvh::check_mask (const EdgeQueueContext *eq_ctx, const BMVert *v) |
| static void | blender::bke::pbvh::edge_queue_insert (const EdgeQueueContext *eq_ctx, BMEdge *e, const float priority) |
| static bool | blender::bke::pbvh::is_boundary_edge (const BMEdge &edge) |
| static bool | blender::bke::pbvh::is_boundary_vert (const BMVert &vertex) |
| static bool | blender::bke::pbvh::is_edge_adjacent_to_boundary (const BMEdge &edge) |
| static float | blender::bke::pbvh::long_edge_queue_priority (const BMEdge &edge) |
| static float | blender::bke::pbvh::short_edge_queue_priority (const BMEdge &edge) |
| static void | blender::bke::pbvh::long_edge_queue_edge_add (const EdgeQueueContext *eq_ctx, BMEdge *e) |
| static void | blender::bke::pbvh::long_edge_queue_edge_add_recursive (const EdgeQueueContext *eq_ctx, const BMLoop *l_edge, const BMLoop *l_end, const float len_sq, const float limit_len) |
| static void | blender::bke::pbvh::short_edge_queue_edge_add (const EdgeQueueContext *eq_ctx, BMEdge *e) |
| static void | blender::bke::pbvh::long_edge_queue_face_add (const EdgeQueueContext *eq_ctx, BMFace *f) |
| static void | blender::bke::pbvh::short_edge_queue_face_add (const EdgeQueueContext *eq_ctx, BMFace *f) |
| static void | blender::bke::pbvh::long_edge_queue_create (const EdgeQueueContext *eq_ctx, const float max_edge_len, MutableSpan< BMeshNode > nodes, const float3 ¢er, const std::optional< float3 > view_normal, const float radius, const bool use_frontface, const bool use_projected) |
| static void | blender::bke::pbvh::short_edge_queue_create (const EdgeQueueContext *eq_ctx, const float min_edge_len, MutableSpan< BMeshNode > nodes, const float3 ¢er, const std::optional< float3 > view_normal, const float radius, const bool use_frontface, const bool use_projected) |
| static void | blender::bke::pbvh::copy_edge_data (BMesh &bm, BMEdge &dst, const BMEdge &src) |
| static void | blender::bke::pbvh::merge_edge_data (BMesh &bm, BMEdge &dst, const BMEdge &src) |
| static void | blender::bke::pbvh::pbvh_bmesh_split_edge (const EdgeQueueContext *eq_ctx, BMesh &bm, MutableSpan< BMeshNode > nodes, MutableSpan< bool > node_changed, const int cd_vert_node_offset, const int cd_face_node_offset, BMLog &bm_log, BMEdge *e) |
| static bool | blender::bke::pbvh::pbvh_bmesh_subdivide_long_edges (const EdgeQueueContext *eq_ctx, BMesh &bm, MutableSpan< BMeshNode > nodes, MutableSpan< bool > node_changed, const int cd_vert_node_offset, const int cd_face_node_offset, BMLog &bm_log) |
| static bool | blender::bke::pbvh::vert_in_face_adjacent_to_edge (BMVert &vert, BMEdge &edge) |
| static void | blender::bke::pbvh::merge_flap_edge_data (BMesh &bm, const BMFace *del_face, const BMFace *flap_face, BMEdge *e, BMVert *v_del, const BMLoop *l_del, BMVert *v_conn) |
| static BMVert * | blender::bke::pbvh::find_outer_flap_vert (BMFace &face) |
| static void | blender::bke::pbvh::try_merge_flap_edge_data_before_dissolve (BMesh &bm, BMFace &face) |
| static void | blender::bke::pbvh::merge_face_edge_data (BMesh &bm, BMFace *, BMFace *new_face, BMVert *v_del, const BMLoop *l_del, const BMVert *v_conn) |
| static void | blender::bke::pbvh::pbvh_bmesh_collapse_edge (BMesh &bm, MutableSpan< BMeshNode > nodes, MutableSpan< bool > node_changed, const int cd_vert_node_offset, const int cd_face_node_offset, BMLog &bm_log, BMEdge *e, BMVert *v1, BMVert *v2, Map< BMVert *, BMVert * > &deleted_verts, const EdgeQueueContext *eq_ctx) |
| static bool | blender::bke::pbvh::pbvh_bmesh_collapse_short_edges (const EdgeQueueContext *eq_ctx, const float min_edge_len, BMesh &bm, MutableSpan< BMeshNode > nodes, MutableSpan< bool > node_changed, const int cd_vert_node_offset, const int cd_face_node_offset, BMLog &bm_log) |
| bool | blender::bke::pbvh::node_raycast_bmesh (BMeshNode &node, const float3 &ray_start, const float3 &ray_normal, const IsectRayPrecalc *isect_precalc, float *depth, bool use_original, BMVert **r_active_vertex, float3 &r_face_normal) |
| bool | blender::bke::pbvh::raycast_node_detail_bmesh (const BMeshNode &node, const float3 &ray_start, const IsectRayPrecalc *isect_precalc, float *depth, float *r_edge_length) |
| bool | blender::bke::pbvh::bmesh_node_nearest_to_ray (BMeshNode &node, const float3 &ray_start, const float3 &ray_normal, float *r_depth, float *dist_sq, const bool use_original) |
| void | blender::bke::pbvh::bmesh_normals_update (Tree &pbvh, const IndexMask &nodes_to_update) |
| static void | blender::bke::pbvh::pbvh_bmesh_node_limit_ensure_fast (const MutableSpan< BMFace * > nodeinfo, const Span< Bounds< float3 > > face_bounds, FastNodeBuildInfo *node, MemArena *arena) |
| static void | blender::bke::pbvh::pbvh_bmesh_create_nodes_fast_recursive (Vector< BMeshNode > &nodes, const int cd_vert_node_offset, const int cd_face_node_offset, const Span< BMFace * > nodeinfo, const Span< Bounds< float3 > > face_bounds, const FastNodeBuildInfo *node, const int node_index, const int parent_index) |
| bool | blender::bke::pbvh::bmesh_update_topology (BMesh &bm, Tree &pbvh, BMLog &bm_log, PBVHTopologyUpdateMode mode, float min_edge_len, float max_edge_len, const float3 ¢er, const std::optional< float3 > &view_normal, float radius, bool use_frontface, bool use_projected) |
| static void | blender::bke::pbvh::copy_original_vert (BMLog *log, BMeshNode *node, BMVert *v, int i, bool use_original) |
| void | blender::BKE_pbvh_bmesh_node_save_orig (BMesh *bm, BMLog *log, bke::pbvh::BMeshNode *node, bool use_original) |
| void | blender::BKE_pbvh_bmesh_after_stroke (BMesh &bm, bke::pbvh::Tree &pbvh) |
| void | blender::BKE_pbvh_node_mark_topology_update (bke::pbvh::Node &node) |
| const Set< BMVert *, 0 > & | blender::BKE_pbvh_bmesh_node_unique_verts (bke::pbvh::BMeshNode *node) |
| const Set< BMVert *, 0 > & | blender::BKE_pbvh_bmesh_node_other_verts (bke::pbvh::BMeshNode *node) |
| const Set< BMFace *, 0 > & | blender::BKE_pbvh_bmesh_node_faces (bke::pbvh::BMeshNode *node) |
Variables | |
| static CLG_LogRef | blender::LOG = {"sculpt.bmesh"} |
| constexpr int | blender::bke::pbvh::leaf_limit = 400 |
| static constexpr int | blender::bke::pbvh::dyntopo_node_none = -1 |
BMesh Utility API | |
Use some local functions which assume triangles. | |
| #define | BM_LOOPS_OF_VERT_ITER_BEGIN(l_iter_radial_, v_) |
| #define | BM_LOOPS_OF_VERT_ITER_END |
| #define | BM_FACES_OF_VERT_ITER_BEGIN(f_iter_, v_) |
| #define | BM_FACES_OF_VERT_ITER_END |
| static Bounds< float3 > | blender::bke::pbvh::negative_bounds () |
| static std::array< BMEdge *, 3 > | blender::bke::pbvh::bm_edges_from_tri (BMesh &bm, const Span< BMVert * > v_tri) |
| BLI_INLINE std::array< BMVert *, 3 > | blender::bke::pbvh::bm_face_as_array (const BMFace &f) |
| static BMFace * | blender::bke::pbvh::bm_face_exists_tri_from_loop_vert (const BMLoop *l_radial_first, const BMVert *v_opposite) |
| static BMVert * | blender::bke::pbvh::bm_vert_hash_lookup_chain (Map< BMVert *, BMVert * > &deleted_verts, BMVert *v) |
| #define BM_FACES_OF_VERT_ITER_BEGIN | ( | f_iter_, | |
| v_ ) |
Definition at line 84 of file pbvh_bmesh.cc.
Referenced by blender::bke::pbvh::pbvh_bmesh_node_vert_use_count_at_most(), blender::bke::pbvh::pbvh_bmesh_vert_other_node_find(), and blender::bke::pbvh::pbvh_bmesh_vert_remove().
| #define BM_FACES_OF_VERT_ITER_END |
Definition at line 90 of file pbvh_bmesh.cc.
Referenced by blender::bke::pbvh::pbvh_bmesh_node_vert_use_count_at_most(), blender::bke::pbvh::pbvh_bmesh_vert_other_node_find(), and blender::bke::pbvh::pbvh_bmesh_vert_remove().
| #define BM_LOOPS_OF_VERT_ITER_BEGIN | ( | l_iter_radial_, | |
| v_ ) |
Typically using BM_LOOPS_OF_VERT and BM_FACES_OF_VERT iterators are fine, however this is an area where performance matters so do it in-line.
Take care since 'break' won't works as expected within these macros!
Definition at line 54 of file pbvh_bmesh.cc.
Referenced by blender::bke::pbvh::pbvh_bmesh_collapse_edge().
| #define BM_LOOPS_OF_VERT_ITER_END |
Definition at line 71 of file pbvh_bmesh.cc.
Referenced by blender::bke::pbvh::pbvh_bmesh_collapse_edge().
| #define EDGE_QUEUE_DISABLE | ( | e | ) |
Definition at line 680 of file pbvh_bmesh.cc.
Referenced by blender::bke::pbvh::pbvh_bmesh_collapse_short_edges(), and blender::bke::pbvh::pbvh_bmesh_subdivide_long_edges().
| #define EDGE_QUEUE_ENABLE | ( | e | ) |
Definition at line 679 of file pbvh_bmesh.cc.
Referenced by blender::bke::pbvh::edge_queue_insert().
| #define EDGE_QUEUE_TEST | ( | e | ) |
Definition at line 678 of file pbvh_bmesh.cc.
Referenced by blender::bke::pbvh::edge_queue_insert(), blender::bke::pbvh::long_edge_queue_edge_add(), blender::bke::pbvh::long_edge_queue_edge_add_recursive(), and blender::bke::pbvh::short_edge_queue_edge_add().
| #define pbvh_bmesh_node_vert_use_count_is_equal | ( | nodes, | |
| cd_face_node_offset, | |||
| node, | |||
| v, | |||
| n ) |
Definition at line 474 of file pbvh_bmesh.cc.
Referenced by blender::bke::pbvh::pbvh_bmesh_face_remove().