334 int &r_active_vertex,
335 int &r_active_face_index,
346 int &r_active_grid_index,
362 float *r_edge_length);
375 Tree &pbvh,
bool original,
float ray_start[3],
float ray_end[3],
float ray_normal[3]);
393 const float ray_start[3],
394 const float ray_normal[3],
419 int display_gridsize);
443 const float center[3],
444 const float view_normal[3],
471 const GridsNode &node,
546 Span<GridsNode> nodes,
547 const IndexMask &nodes_mask,
548 IndexMaskMemory &memory);
592IndexMask
all_leaf_nodes(
const Tree &pbvh, IndexMaskMemory &memory);
596 IndexMaskMemory &memory,
597 FunctionRef<
bool(
const Node &)> filter_fn);
bool BKE_pbvh_node_fully_hidden_get(const blender::bke::pbvh::Node &node)
blender::Bounds< blender::float3 > BKE_pbvh_redraw_BB(const blender::bke::pbvh::Tree &pbvh)
blender::Bounds< blender::float3 > BKE_pbvh_node_get_original_BB(const blender::bke::pbvh::Node *node)
void BKE_pbvh_mark_rebuild_pixels(blender::bke::pbvh::Tree &pbvh)
bool BKE_pbvh_node_frustum_exclude_AABB(const blender::bke::pbvh::Node *node, const PBVHFrustumPlanes *frustum)
void BKE_pbvh_node_fully_unmasked_set(blender::bke::pbvh::Node &node, int fully_masked)
void BKE_pbvh_node_mark_topology_update(blender::bke::pbvh::Node &node)
int BKE_pbvh_debug_draw_gen_get(blender::bke::pbvh::Node &node)
int BKE_pbvh_get_grid_num_verts(const Object &object)
float BKE_pbvh_node_get_tmin(const blender::bke::pbvh::Node *node)
void BKE_pbvh_node_mark_update(blender::bke::pbvh::Node &node)
bool BKE_pbvh_node_frustum_contain_AABB(const blender::bke::pbvh::Node *node, const PBVHFrustumPlanes *frustum)
bool BKE_pbvh_node_fully_masked_get(const blender::bke::pbvh::Node &node)
void BKE_pbvh_bmesh_after_stroke(BMesh &bm, blender::bke::pbvh::Tree &pbvh)
void BKE_pbvh_node_fully_hidden_set(blender::bke::pbvh::Node &node, int fully_hidden)
int BKE_pbvh_get_grid_num_faces(const Object &object)
const blender::Set< BMFace *, 0 > & BKE_pbvh_bmesh_node_faces(blender::bke::pbvh::BMeshNode *node)
void BKE_pbvh_node_fully_masked_set(blender::bke::pbvh::Node &node, int fully_masked)
const blender::Set< BMVert *, 0 > & BKE_pbvh_bmesh_node_unique_verts(blender::bke::pbvh::BMeshNode *node)
void BKE_pbvh_bmesh_node_save_orig(BMesh *bm, BMLog *log, blender::bke::pbvh::BMeshNode *node, bool use_original)
const blender::Set< BMVert *, 0 > & BKE_pbvh_bmesh_node_other_verts(blender::bke::pbvh::BMeshNode *node)
bool BKE_pbvh_node_fully_unmasked_get(const blender::bke::pbvh::Node &node)
void BKE_pbvh_vert_coords_apply(blender::bke::pbvh::Tree &pbvh, blender::Span< blender::float3 > vert_positions)
void BKE_pbvh_sync_visibility_from_verts(Object &object)
void BKE_pbvh_node_get_bm_orco_data(const blender::bke::pbvh::BMeshNode &node, blender::Span< blender::float3 > &r_orig_positions, blender::Span< blender::int3 > &r_orig_tris)
#define ENUM_OPERATORS(_type, _max)
ATTR_WARN_UNUSED_RESULT BMesh * bm
constexpr Span slice(int64_t start, int64_t size) const
Span< Key > as_span() const
virtual void tag_visibility_changed(const IndexMask &node_mask)=0
virtual ~DrawCache()=default
virtual void tag_topology_changed(const IndexMask &node_mask)=0
virtual void tag_attribute_changed(const IndexMask &node_mask, StringRef attribute_name)=0
virtual void tag_positions_changed(const IndexMask &node_mask)=0
virtual void tag_masks_changed(const IndexMask &node_mask)=0
virtual void tag_face_sets_changed(const IndexMask &node_mask)=0
pixels::NodeData * pixels_
Bounds< float3 > bounds_orig_
MutableSpan< NodeT > nodes()
void tag_attribute_changed(const IndexMask &node_mask, StringRef attribute_name)
Tree(const Tree &other)=delete
void tag_positions_changed(const IndexMask &node_mask)
static Tree from_bmesh(BMesh &bm)
Tree & operator=(const Tree &other)=delete
Span< NodeT > nodes() const
void tag_face_sets_changed(const IndexMask &node_mask)
Tree & operator=(Tree &&other)=default
void tag_masks_changed(const IndexMask &node_mask)
std::unique_ptr< DrawCache > draw_data
void tag_visibility_changed(const IndexMask &node_mask)
static Tree from_grids(const Mesh &base_mesh, const SubdivCCG &subdiv_ccg)
static Tree from_mesh(const Mesh &mesh)
void tag_topology_changed(const IndexMask &node_mask)
Tree(Tree &&other)=default
BitVector visibility_dirty_
pixels::PBVHData * pixels_
std::variant< Vector< MeshNode >, Vector< GridsNode >, Vector< BMeshNode > > nodes_
const Depsgraph * depsgraph
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
ccl_device_inline float3 log(float3 v)
IndexMask search_nodes(const Tree &pbvh, IndexMaskMemory &memory, FunctionRef< bool(const Node &)> filter_fn)
bool raycast_node_detail_bmesh(BMeshNode &node, const float3 &ray_start, IsectRayPrecalc *isect_precalc, float *depth, float *r_edge_length)
void update_mask_bmesh(const BMesh &bm, const IndexMask &node_mask, Tree &pbvh)
void update_normals(const Depsgraph &depsgraph, Object &object_orig, Tree &pbvh)
void update_bounds_grids(const CCGKey &key, Span< float3 > positions, Tree &pbvh)
void set_frustum_planes(Tree &pbvh, PBVHFrustumPlanes *planes)
void update_bounds(const Depsgraph &depsgraph, const Object &object, Tree &pbvh)
void update_mask_mesh(const Mesh &mesh, const IndexMask &node_mask, Tree &pbvh)
Span< float3 > vert_normals_eval_from_eval(const Object &object_eval)
IndexMask all_leaf_nodes(const Tree &pbvh, IndexMaskMemory &memory)
void clip_ray_ortho(Tree &pbvh, bool original, float ray_start[3], float ray_end[3], float ray_normal[3])
bool node_raycast_bmesh(BMeshNode &node, const float3 &ray_start, const float3 &ray_normal, IsectRayPrecalc *isect_precalc, float *depth, bool use_original, BMVert **r_active_vertex, float3 &r_face_normal)
bool 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)
void update_node_bounds_bmesh(BMeshNode &node)
Span< float3 > vert_positions_eval_from_eval(const Object &object_eval)
void node_update_mask_bmesh(int mask_offset, BMeshNode &node)
void node_update_mask_mesh(Span< float > mask, MeshNode &node)
void node_update_visibility_grids(const BitGroupVector<> &grid_hidden, GridsNode &node)
void update_bounds_mesh(Span< float3 > vert_positions, Tree &pbvh)
void update_visibility(const Object &object, Tree &pbvh)
void node_update_mask_grids(const CCGKey &key, Span< float > masks, GridsNode &node)
bool 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)
void update_node_bounds_mesh(Span< float3 > positions, MeshNode &node)
void node_update_visibility_bmesh(BMeshNode &node)
Bounds< float3 > bounds_get(const Tree &pbvh)
void update_normals_from_eval(Object &object_eval, Tree &pbvh)
Span< float3 > vert_normals_eval(const Depsgraph &depsgraph, const Object &object_orig)
IndexMask nodes_to_face_selection_grids(const SubdivCCG &subdiv_ccg, Span< GridsNode > nodes, const IndexMask &nodes_mask, IndexMaskMemory &memory)
int count_grid_quads(const BitGroupVector<> &grid_visibility, Span< int > grid_indices, int gridsize, int display_gridsize)
void update_mask_grids(const SubdivCCG &subdiv_ccg, const IndexMask &node_mask, Tree &pbvh)
MutableSpan< float3 > vert_positions_eval_for_write(const Depsgraph &depsgraph, Object &object_orig)
Bounds< float3 > node_bounds(const Node &node)
void get_frustum_planes(const Tree &pbvh, PBVHFrustumPlanes *planes)
Span< float3 > face_normals_eval_from_eval(const Object &object_eval)
void update_bounds_bmesh(const BMesh &bm, Tree &pbvh)
bool bmesh_update_topology(BMesh &bm, Tree &pbvh, BMLog &bm_log, PBVHTopologyUpdateMode mode, float min_edge_len, float max_edge_len, const float center[3], const float view_normal[3], float radius, bool use_frontface, bool use_projected)
void update_node_bounds_grids(int grid_area, Span< float3 > positions, GridsNode &node)
void build_pixels(const Depsgraph &depsgraph, Object &object, Image &image, ImageUser &image_user)
bool 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)
void store_bounds_orig(Tree &pbvh)
Span< int > node_face_indices_calc_grids(const SubdivCCG &subdiv_ccg, const GridsNode &node, Vector< int > &faces)
Span< float3 > vert_positions_eval(const Depsgraph &depsgraph, const Object &object_orig)
void node_update_visibility_mesh(Span< bool > hide_vert, MeshNode &node)
void flush_bounds_to_parents(Tree &pbvh)
void find_nearest_to_ray(Tree &pbvh, const FunctionRef< void(Node &node, float *tmin)> fn, const float3 &ray_start, const float3 &ray_normal, bool original)
void raycast(Tree &pbvh, FunctionRef< void(Node &node, float *tmin)> cb, const float3 &ray_start, const float3 &ray_normal, bool original)
PythonProbingStrategy<> DefaultProbingStrategy
Array< int3, 0 > orig_tris_
Set< BMFace *, 0 > bm_faces_
Array< BMVert *, 0 > orig_verts_
Array< float3, 0 > orig_positions_
Set< BMVert *, 0 > bm_unique_verts_
Set< BMVert *, 0 > bm_other_verts_
Span< int > prim_indices_
Span< int > grids() const
int16_t LocalVertMapIndexT
Span< int > faces() const
Span< int > face_indices_
Span< int > verts() const
Span< int > all_verts() const
LocalVertMap vert_indices_