Blender V5.3
BKE_paint_bvh.hh File Reference

A BVH for high poly meshes. More...

#include <variant>
#include "BLI_array.hh"
#include "BLI_bit_group_vector.hh"
#include "BLI_bit_vector.hh"
#include "BLI_bounds_types.hh"
#include "BLI_enum_flags.hh"
#include "BLI_function_ref.hh"
#include "BLI_index_mask_fwd.hh"
#include "BLI_math_vector.hh"
#include "BLI_math_vector_types.hh"
#include "BLI_offset_indices.hh"
#include "BLI_set.hh"
#include "BLI_span.hh"
#include "BLI_string_ref.hh"
#include "BLI_utility_mixins.hh"
#include "BLI_vector.hh"
#include "BLI_vector_set.hh"

Go to the source code of this file.

Classes

class  blender::bke::pbvh::Node
struct  blender::bke::pbvh::MeshNode
struct  blender::bke::pbvh::GridsNode
struct  blender::bke::pbvh::BMeshNode
class  blender::bke::pbvh::DrawCache
class  blender::bke::pbvh::Tree

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::bke
namespace  blender::bke::pbvh
namespace  blender::bke::pbvh::pixels

Enumerations

enum class  blender::bke::pbvh::Type { blender::bke::pbvh::Mesh , blender::bke::pbvh::Grids , blender::bke::pbvh::BMesh }
enum  blender::PBVHTopologyUpdateMode { blender::PBVH_Subdivide = 1 , blender::PBVH_Collapse = 2 }

Functions

 blender::bke::pbvh::ENUM_OPERATORS (Node::Flags)
void blender::bke::pbvh::build_pixels (const Depsgraph &depsgraph, Object &object, Image &image, const ImageUser &image_user)
void blender::bke::pbvh::pixels_free (bke::pbvh::Tree *pbvh)
void blender::bke::pbvh::raycast (Tree &pbvh, FunctionRef< void(Node &node, float *tmin)> hit_fn, const float3 &ray_start, const float3 &ray_normal, bool original)
Bounds< float3 > blender::bke::pbvh::calc_face_bounds (const Span< float3 > vert_positions, const Span< int > face_verts)
int blender::bke::pbvh::partition_along_axis (const Span< float3 > face_centers, MutableSpan< int > faces, const int axis, const float middle)
int blender::bke::pbvh::partition_material_indices (const Span< int > material_indices, MutableSpan< int > faces)
bool blender::bke::pbvh::leaf_needs_material_split (const Span< int > faces, const Span< int > material_indices)
bool blender::bke::pbvh::node_raycast_mesh (const MeshNode &node, Span< float3 > node_positions, Span< float3 > vert_positions, OffsetIndices< int > faces, Span< int > corner_verts, Span< int3 > corner_tris, Span< bool > hide_poly, const float3 &ray_start, const float3 &ray_normal, IsectRayPrecalc *isect_precalc, float *depth, int &r_active_vertex, int &r_active_face_index, float3 &r_face_normal)
bool blender::bke::pbvh::node_raycast_grids (const SubdivCCG &subdiv_ccg, GridsNode &node, Span< float3 > node_positions, const float3 &ray_start, const float3 &ray_normal, const IsectRayPrecalc *isect_precalc, float *depth, SubdivCCGCoord &r_active_vertex, int &r_active_grid_index, float3 &r_face_normal)
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)
void blender::bke::pbvh::clip_ray_ortho (Tree &pbvh, bool original, float ray_start[3], float ray_end[3], float ray_normal[3])
void blender::bke::pbvh::find_nearest_to_ray (Tree &pbvh, const FunctionRef< void(Node &node, float *tmin)> fn, const float3 &ray_start, const float3 &ray_normal, bool original)
bool blender::bke::pbvh::find_nearest_to_ray_node (Tree &pbvh, Node &node, Span< float3 > node_positions, bool use_origco, Span< float3 > vert_positions, const OffsetIndices< int > faces, Span< int > corner_verts, Span< int3 > corner_tris, Span< bool > hide_poly, const SubdivCCG *subdiv_ccg, const float ray_start[3], const float ray_normal[3], float *depth, float *dist_sq)
Bounds< float3 > blender::bke::pbvh::bounds_get (const Tree &pbvh)
bool blender::bke::pbvh::node_frustum_contain_aabb (const Node &node, Span< float4 > frustum_planes)
bool blender::bke::pbvh::node_frustum_exclude_aabb (const Node &node, Span< float4 > frustum_planes)
void blender::BKE_pbvh_sync_visibility_from_verts (Object &object)
int blender::bke::pbvh::count_grid_quads (const BitGroupVector<> &grid_hidden, Span< int > grid_indices, int gridsize, int display_gridsize)
 blender::ENUM_OPERATORS (PBVHTopologyUpdateMode)
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 &center, const std::optional< float3 > &view_normal, float radius, bool use_frontface, bool use_projected)
void blender::BKE_pbvh_node_mark_topology_update (bke::pbvh::Node &node)
void blender::BKE_pbvh_node_fully_hidden_set (bke::pbvh::Node &node, int fully_hidden)
bool blender::BKE_pbvh_node_fully_hidden_get (const bke::pbvh::Node &node)
void blender::BKE_pbvh_node_fully_masked_set (bke::pbvh::Node &node, int fully_masked)
bool blender::BKE_pbvh_node_fully_masked_get (const bke::pbvh::Node &node)
void blender::BKE_pbvh_node_fully_unmasked_set (bke::pbvh::Node &node, int fully_masked)
bool blender::BKE_pbvh_node_fully_unmasked_get (const bke::pbvh::Node &node)
void blender::BKE_pbvh_mark_rebuild_pixels (bke::pbvh::Tree &pbvh)
Span< int > blender::bke::pbvh::node_face_indices_calc_grids (const SubdivCCG &subdiv_ccg, const GridsNode &node, Vector< int > &faces)
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)
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::store_bounds_orig (Tree &pbvh)
void blender::bke::pbvh::update_mask_mesh (const Mesh &mesh, const IndexMask &node_mask, Tree &pbvh)
void blender::bke::pbvh::update_mask_grids (const SubdivCCG &subdiv_ccg, const IndexMask &node_mask, Tree &pbvh)
void blender::bke::pbvh::update_mask_bmesh (const BMesh &bm, const IndexMask &node_mask, Tree &pbvh)
void blender::bke::pbvh::update_normals (const Depsgraph &depsgraph, Object &object_orig, Tree &pbvh)
void blender::bke::pbvh::update_normals_from_eval (Object &object_eval, Tree &pbvh)
IndexMask blender::bke::pbvh::nodes_to_face_selection_grids (const SubdivCCG &subdiv_ccg, Span< GridsNode > nodes, const IndexMask &nodes_mask, IndexMaskMemory &memory)
void blender::BKE_pbvh_vert_coords_apply (bke::pbvh::Tree &pbvh, Span< float3 > vert_positions)
void blender::BKE_pbvh_node_get_bm_orco_data (const bke::pbvh::BMeshNode &node, Span< float3 > &r_orig_positions, Span< int3 > &r_orig_tris)
Span< float3 > blender::bke::pbvh::vert_positions_eval (const Depsgraph &depsgraph, const Object &object_orig)
Span< float3 > blender::bke::pbvh::vert_positions_eval_from_eval (const Object &object_eval)
MutableSpan< float3 > blender::bke::pbvh::vert_positions_eval_for_write (const Depsgraph &depsgraph, Object &object_orig)
Span< float3 > blender::bke::pbvh::vert_normals_eval (const Depsgraph &depsgraph, const Object &object_orig)
Span< float3 > blender::bke::pbvh::vert_normals_eval_from_eval (const Object &object_eval)
Span< float3 > blender::bke::pbvh::face_normals_eval_from_eval (const Object &object_eval)
int blender::BKE_pbvh_debug_draw_gen_get (bke::pbvh::Node &node)
IndexMask blender::bke::pbvh::all_leaf_nodes (const Tree &pbvh, IndexMaskMemory &memory)
IndexMask blender::bke::pbvh::search_nodes (const Tree &pbvh, IndexMaskMemory &memory, FunctionRef< bool(const Node &)> filter_fn)
void blender::bke::pbvh::node_update_mask_mesh (Span< float > mask, MeshNode &node)
void blender::bke::pbvh::node_update_mask_grids (const CCGKey &key, Span< float > masks, GridsNode &node)
void blender::bke::pbvh::node_update_mask_bmesh (int mask_offset, BMeshNode &node)
void blender::bke::pbvh::node_update_visibility_mesh (Span< bool > hide_vert, MeshNode &node)
void blender::bke::pbvh::node_update_visibility_grids (const BitGroupVector<> &grid_hidden, GridsNode &node)
void blender::bke::pbvh::node_update_visibility_bmesh (BMeshNode &node)
void blender::bke::pbvh::update_node_bounds_mesh (Span< float3 > positions, MeshNode &node)
void blender::bke::pbvh::update_node_bounds_grids (int grid_area, Span< float3 > positions, GridsNode &node)
void blender::bke::pbvh::update_node_bounds_bmesh (BMeshNode &node)

Variables

static constexpr int blender::bke::pbvh::MESH_LEAF_LIMIT = 2500

Detailed Description

A BVH for high poly meshes.

Definition in file BKE_paint_bvh.hh.