Blender V4.3
BKE_pbvh_api.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
12#include <optional>
13#include <string>
14#include <variant>
15
16#include "BLI_array.hh"
18#include "BLI_bit_vector.hh"
19#include "BLI_bounds_types.hh"
20#include "BLI_compiler_compat.h"
21#include "BLI_function_ref.hh"
22#include "BLI_generic_span.hh"
23#include "BLI_index_mask_fwd.hh"
25#include "BLI_offset_indices.hh"
26#include "BLI_set.hh"
27#include "BLI_span.hh"
28#include "BLI_string_ref.hh"
29#include "BLI_utildefines.h"
30#include "BLI_vector.hh"
31
33
34/* For embedding CCGKey in iterator. */
35#include "BKE_ccg.hh"
36#include "BKE_pbvh.hh"
37
38#include "bmesh.hh"
39
40struct BMLog;
41struct BMesh;
42struct CCGKey;
43struct Depsgraph;
44struct IsectRayPrecalc;
45struct Mesh;
46struct SubdivCCG;
47struct SubdivCCGCoord;
48struct Image;
49struct ImageUser;
50struct Object;
51namespace blender {
52namespace bke::pbvh {
53class Node;
54class Tree;
55namespace pixels {
56struct PBVHData;
57struct NodeData;
58} // namespace pixels
59} // namespace bke::pbvh
60} // namespace blender
61
62namespace blender::bke::pbvh {
63
64class Tree;
65
70class Node {
71 friend Tree;
72
73 public:
78
79 /* For internal nodes, the offset of the children in the blender::bke::pbvh::Tree
80 * 'nodes' array. */
82
83 /* Indicates whether this node is a leaf or not; also used for
84 * marking various updates that need to be applied. */
86
91 float tmin_ = 0.0f;
92
99
102};
103
168
169struct GridsNode : public Node {
172
174 Span<int> grids() const;
175};
176
177struct BMeshNode : public Node {
178 /* Set of pointers to the BMFaces used by this node.
179 * NOTE: Type::BMesh only. Faces are always triangles
180 * (dynamic topology forcibly triangulates the mesh).
181 */
185
186 /* Stores original coordinates of triangles. */
190};
191
193 public:
194 virtual ~DrawCache() = default;
195 virtual void tag_positions_changed(const IndexMask &node_mask) = 0;
196 virtual void tag_visibility_changed(const IndexMask &node_mask) = 0;
197 virtual void tag_topology_changed(const IndexMask &node_mask) = 0;
198 virtual void tag_face_sets_changed(const IndexMask &node_mask) = 0;
199 virtual void tag_masks_changed(const IndexMask &node_mask) = 0;
200 virtual void tag_attribute_changed(const IndexMask &node_mask, StringRef attribute_name) = 0;
201};
202
207class Tree {
208 friend Node;
209 Type type_;
210
212 Array<int, 0> prim_indices_;
213
214 public:
215 std::variant<Vector<MeshNode>, Vector<GridsNode>, Vector<BMeshNode>> nodes_;
216
223
230
237
239 float planes_[6][4];
241
243
244 std::unique_ptr<DrawCache> draw_data;
245
246 public:
247 Tree(const Tree &other) = delete;
248 Tree(Tree &&other) = default;
249 Tree &operator=(const Tree &other) = delete;
250 Tree &operator=(Tree &&other) = default;
251 ~Tree();
252
254 static Tree from_mesh(const Mesh &mesh);
256 static Tree from_grids(const Mesh &base_mesh, const SubdivCCG &subdiv_ccg);
258 static Tree from_bmesh(BMesh &bm);
259
260 int nodes_num() const;
261 template<typename NodeT> Span<NodeT> nodes() const;
262 template<typename NodeT> MutableSpan<NodeT> nodes();
263
264 Type type() const
265 {
266 return this->type_;
267 }
268
274 void tag_positions_changed(const IndexMask &node_mask);
275
277 void tag_visibility_changed(const IndexMask &node_mask);
278
282 void tag_topology_changed(const IndexMask &node_mask);
283
285 void tag_face_sets_changed(const IndexMask &node_mask);
286
288 void tag_masks_changed(const IndexMask &node_mask);
289
293 void tag_attribute_changed(const IndexMask &node_mask, StringRef attribute_name);
294
295 private:
296 explicit Tree(Type type);
297};
298
299} // namespace blender::bke::pbvh
300
302 float (*planes)[4];
304};
305
306/* Callbacks */
307
308namespace blender::bke::pbvh {
309
310void build_pixels(const Depsgraph &depsgraph, Object &object, Image &image, ImageUser &image_user);
311
312/* Ray-cast
313 * the hit callback is called for all leaf nodes intersecting the ray;
314 * it's up to the callback to find the primitive within the leaves that is
315 * hit first */
316
317void raycast(Tree &pbvh,
318 FunctionRef<void(Node &node, float *tmin)> cb,
319 const float3 &ray_start,
320 const float3 &ray_normal,
321 bool original);
322
323bool node_raycast_mesh(const MeshNode &node,
324 Span<float3> node_positions,
325 Span<float3> vert_positions,
326 OffsetIndices<int> faces,
327 Span<int> corner_verts,
328 Span<int3> corner_tris,
329 Span<bool> hide_poly,
330 const float3 &ray_start,
331 const float3 &ray_normal,
332 IsectRayPrecalc *isect_precalc,
333 float *depth,
334 int &r_active_vertex,
335 int &r_active_face_index,
336 float3 &r_face_normal);
337
338bool node_raycast_grids(const SubdivCCG &subdiv_ccg,
339 GridsNode &node,
340 Span<float3> node_positions,
341 const float3 &ray_start,
342 const float3 &ray_normal,
343 const IsectRayPrecalc *isect_precalc,
344 float *depth,
345 SubdivCCGCoord &r_active_vertex,
346 int &r_active_grid_index,
347 float3 &r_face_normal);
348
350 const float3 &ray_start,
351 const float3 &ray_normal,
352 IsectRayPrecalc *isect_precalc,
353 float *depth,
354 bool use_original,
355 BMVert **r_active_vertex,
356 float3 &r_face_normal);
357
359 const float3 &ray_start,
360 IsectRayPrecalc *isect_precalc,
361 float *depth,
362 float *r_edge_length);
363
374void clip_ray_ortho(
375 Tree &pbvh, bool original, float ray_start[3], float ray_end[3], float ray_normal[3]);
376
377void find_nearest_to_ray(Tree &pbvh,
378 const FunctionRef<void(Node &node, float *tmin)> fn,
379 const float3 &ray_start,
380 const float3 &ray_normal,
381 bool original);
382
384 Node &node,
385 Span<float3> node_positions,
386 bool use_origco,
387 Span<float3> vert_positions,
388 const OffsetIndices<int> faces,
389 Span<int> corner_verts,
390 Span<int3> corner_tris,
391 Span<bool> hide_poly,
392 const SubdivCCG *subdiv_ccg,
393 const float ray_start[3],
394 const float ray_normal[3],
395 float *depth,
396 float *dist_sq);
397
398/* Drawing */
399void set_frustum_planes(Tree &pbvh, PBVHFrustumPlanes *planes);
400void get_frustum_planes(const Tree &pbvh, PBVHFrustumPlanes *planes);
401
405Bounds<float3> bounds_get(const Tree &pbvh);
406
407} // namespace blender::bke::pbvh
408
410
411namespace blender::bke::pbvh {
412
416int count_grid_quads(const BitGroupVector<> &grid_visibility,
417 Span<int> grid_indices,
418 int gridsize,
419 int display_gridsize);
420
421} // namespace blender::bke::pbvh
422
423int BKE_pbvh_get_grid_num_verts(const Object &object);
424int BKE_pbvh_get_grid_num_faces(const Object &object);
425
431
432namespace blender::bke::pbvh {
433
438 Tree &pbvh,
439 BMLog &bm_log,
441 float min_edge_len,
442 float max_edge_len,
443 const float center[3],
444 const float view_normal[3],
445 float radius,
446 bool use_frontface,
447 bool use_projected);
448
449} // namespace blender::bke::pbvh
450
451/* Node Access */
452
455void BKE_pbvh_node_fully_hidden_set(blender::bke::pbvh::Node &node, int fully_hidden);
457void BKE_pbvh_node_fully_masked_set(blender::bke::pbvh::Node &node, int fully_masked);
461
463
464namespace blender::bke::pbvh {
465
470Span<int> node_face_indices_calc_grids(const SubdivCCG &subdiv_ccg,
471 const GridsNode &node,
472 Vector<int> &faces);
473
474Bounds<float3> node_bounds(const Node &node);
475
476} // namespace blender::bke::pbvh
477
479 const blender::bke::pbvh::Node *node);
480
482
487 const PBVHFrustumPlanes *frustum);
492 const PBVHFrustumPlanes *frustum);
493
499
507 BMLog *log,
509 bool use_original);
511
512namespace blender::bke::pbvh {
513
518void update_bounds(const Depsgraph &depsgraph, const Object &object, Tree &pbvh);
519void update_bounds_mesh(Span<float3> vert_positions, Tree &pbvh);
520void update_bounds_grids(const CCGKey &key, Span<float3> positions, Tree &pbvh);
521void update_bounds_bmesh(const BMesh &bm, Tree &pbvh);
522
529void store_bounds_orig(Tree &pbvh);
530
532void update_mask_mesh(const Mesh &mesh, const IndexMask &node_mask, Tree &pbvh);
533void update_mask_grids(const SubdivCCG &subdiv_ccg, const IndexMask &node_mask, Tree &pbvh);
534void update_mask_bmesh(const BMesh &bm, const IndexMask &node_mask, Tree &pbvh);
535
536void update_visibility(const Object &object, Tree &pbvh);
537void update_normals(const Depsgraph &depsgraph, Object &object_orig, Tree &pbvh);
539void update_normals_from_eval(Object &object_eval, Tree &pbvh);
540
541} // namespace blender::bke::pbvh
542
544namespace blender::bke::pbvh {
545IndexMask nodes_to_face_selection_grids(const SubdivCCG &subdiv_ccg,
546 Span<GridsNode> nodes,
547 const IndexMask &nodes_mask,
548 IndexMaskMemory &memory);
549}
550
552 blender::Span<blender::float3> vert_positions);
553
555 blender::Span<blender::float3> &r_orig_positions,
556 blender::Span<blender::int3> &r_orig_tris);
557
558namespace blender::bke::pbvh {
559
565Span<float3> vert_positions_eval(const Depsgraph &depsgraph, const Object &object_orig);
566Span<float3> vert_positions_eval_from_eval(const Object &object_eval);
567
574MutableSpan<float3> vert_positions_eval_for_write(const Depsgraph &depsgraph, Object &object_orig);
575
580Span<float3> vert_normals_eval(const Depsgraph &depsgraph, const Object &object_orig);
581Span<float3> vert_normals_eval_from_eval(const Object &object_eval);
582
583Span<float3> face_normals_eval_from_eval(const Object &object_eval);
584
585} // namespace blender::bke::pbvh
586
588
589namespace blender::bke::pbvh {
590
592IndexMask all_leaf_nodes(const Tree &pbvh, IndexMaskMemory &memory);
593
595IndexMask search_nodes(const Tree &pbvh,
596 IndexMaskMemory &memory,
597 FunctionRef<bool(const Node &)> filter_fn);
598
599void node_update_mask_mesh(Span<float> mask, MeshNode &node);
600void node_update_mask_grids(const CCGKey &key, Span<float> masks, GridsNode &node);
601void node_update_mask_bmesh(int mask_offset, BMeshNode &node);
602
603void node_update_visibility_mesh(Span<bool> hide_vert, MeshNode &node);
604void node_update_visibility_grids(const BitGroupVector<> &grid_hidden, GridsNode &node);
605void node_update_visibility_bmesh(BMeshNode &node);
606
607void update_node_bounds_mesh(Span<float3> positions, MeshNode &node);
608void update_node_bounds_grids(int grid_area, Span<float3> positions, GridsNode &node);
609void update_node_bounds_bmesh(BMeshNode &node);
610
616void flush_bounds_to_parents(Tree &pbvh);
617
619{
620 return this->face_indices_;
621}
623{
624 return this->vert_indices_.as_span().slice(0, this->unique_verts_num_);
625}
627{
628 return this->vert_indices_;
629}
630inline int MeshNode::corners_num() const
631{
632 return corners_num_;
633}
634
636{
637 return this->prim_indices_;
638}
639
640} // namespace blender::bke::pbvh
PBVHNodeFlags
Definition BKE_pbvh.hh:29
@ PBVH_UpdateRedraw
Definition BKE_pbvh.hh:32
bool BKE_pbvh_node_fully_hidden_get(const blender::bke::pbvh::Node &node)
Definition pbvh.cc:1542
blender::Bounds< blender::float3 > BKE_pbvh_redraw_BB(const blender::bke::pbvh::Tree &pbvh)
Definition pbvh.cc:1439
blender::Bounds< blender::float3 > BKE_pbvh_node_get_original_BB(const blender::bke::pbvh::Node *node)
Definition pbvh.cc:1611
void BKE_pbvh_mark_rebuild_pixels(blender::bke::pbvh::Tree &pbvh)
Definition pbvh.cc:1517
bool BKE_pbvh_node_frustum_exclude_AABB(const blender::bke::pbvh::Node *node, const PBVHFrustumPlanes *frustum)
Definition pbvh.cc:2361
void BKE_pbvh_node_fully_unmasked_set(blender::bke::pbvh::Node &node, int fully_masked)
Definition pbvh.cc:1564
void BKE_pbvh_node_mark_topology_update(blender::bke::pbvh::Node &node)
int BKE_pbvh_debug_draw_gen_get(blender::bke::pbvh::Node &node)
Definition pbvh.cc:2525
int BKE_pbvh_get_grid_num_verts(const Object &object)
Definition pbvh.cc:1494
float BKE_pbvh_node_get_tmin(const blender::bke::pbvh::Node *node)
Definition pbvh.cc:766
void BKE_pbvh_node_mark_update(blender::bke::pbvh::Node &node)
Definition pbvh.cc:1512
bool BKE_pbvh_node_frustum_contain_AABB(const blender::bke::pbvh::Node *node, const PBVHFrustumPlanes *frustum)
Definition pbvh.cc:2354
bool BKE_pbvh_node_fully_masked_get(const blender::bke::pbvh::Node &node)
Definition pbvh.cc:1559
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)
Definition pbvh.cc:1530
int BKE_pbvh_get_grid_num_faces(const Object &object)
Definition pbvh.cc:1502
const blender::Set< BMFace *, 0 > & BKE_pbvh_bmesh_node_faces(blender::bke::pbvh::BMeshNode *node)
PBVHTopologyUpdateMode
@ PBVH_Collapse
@ PBVH_Subdivide
void BKE_pbvh_node_fully_masked_set(blender::bke::pbvh::Node &node, int fully_masked)
Definition pbvh.cc:1547
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)
Definition pbvh.cc:1576
void BKE_pbvh_vert_coords_apply(blender::bke::pbvh::Tree &pbvh, blender::Span< blender::float3 > vert_positions)
Definition pbvh.cc:2398
void BKE_pbvh_sync_visibility_from_verts(Object &object)
Definition pbvh.cc:2530
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)
Definition pbvh.cc:1617
#define ENUM_OPERATORS(_type, _max)
ATTR_WARN_UNUSED_RESULT BMesh * bm
constexpr Span slice(int64_t start, int64_t size) const
Definition BLI_span.hh:138
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
Bounds< float3 > bounds_
pixels::NodeData * pixels_
Bounds< float3 > bounds_orig_
MutableSpan< NodeT > nodes()
void tag_attribute_changed(const IndexMask &node_mask, StringRef attribute_name)
Definition pbvh.cc:593
Tree(const Tree &other)=delete
void tag_positions_changed(const IndexMask &node_mask)
Definition pbvh.cc:549
static Tree from_bmesh(BMesh &bm)
Tree & operator=(const Tree &other)=delete
Span< NodeT > nodes() const
int nodes_num() const
Definition pbvh.cc:504
void tag_face_sets_changed(const IndexMask &node_mask)
Definition pbvh.cc:579
Tree & operator=(Tree &&other)=default
void tag_masks_changed(const IndexMask &node_mask)
Definition pbvh.cc:586
std::unique_ptr< DrawCache > draw_data
void tag_visibility_changed(const IndexMask &node_mask)
Definition pbvh.cc:562
static Tree from_grids(const Mesh &base_mesh, const SubdivCCG &subdiv_ccg)
Definition pbvh.cc:389
static Tree from_mesh(const Mesh &mesh)
Definition pbvh.cc:234
void tag_topology_changed(const IndexMask &node_mask)
Definition pbvh.cc:572
Tree(Tree &&other)=default
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)
Definition pbvh.cc:2647
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)
Definition pbvh.cc:1294
void update_normals(const Depsgraph &depsgraph, Object &object_orig, Tree &pbvh)
Definition pbvh.cc:1058
void update_bounds_grids(const CCGKey &key, Span< float3 > positions, Tree &pbvh)
Definition pbvh.cc:1156
void set_frustum_planes(Tree &pbvh, PBVHFrustumPlanes *planes)
Definition pbvh.cc:2409
void update_bounds(const Depsgraph &depsgraph, const Object &object, Tree &pbvh)
Definition pbvh.cc:1183
void update_mask_mesh(const Mesh &mesh, const IndexMask &node_mask, Tree &pbvh)
Definition pbvh.cc:1230
Span< float3 > vert_normals_eval_from_eval(const Object &object_eval)
Definition pbvh.cc:2509
IndexMask all_leaf_nodes(const Tree &pbvh, IndexMaskMemory &memory)
Definition pbvh.cc:2612
void clip_ray_ortho(Tree &pbvh, bool original, float ray_start[3], float ray_end[3], float ray_normal[3])
Definition pbvh.cc:2013
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)
Definition pbvh.cc:1807
void update_node_bounds_bmesh(BMeshNode &node)
Definition pbvh.cc:1095
Span< float3 > vert_positions_eval_from_eval(const Object &object_eval)
Definition pbvh.cc:2489
void node_update_mask_bmesh(int mask_offset, BMeshNode &node)
Definition pbvh.cc:1277
void node_update_mask_mesh(Span< float > mask, MeshNode &node)
Definition pbvh.cc:1219
void node_update_visibility_grids(const BitGroupVector<> &grid_hidden, GridsNode &node)
Definition pbvh.cc:1334
void update_bounds_mesh(Span< float3 > vert_positions, Tree &pbvh)
Definition pbvh.cc:1143
void update_visibility(const Object &object, Tree &pbvh)
Definition pbvh.cc:1377
void node_update_mask_grids(const CCGKey &key, Span< float > masks, GridsNode &node)
Definition pbvh.cc:1247
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)
Definition pbvh.cc:1923
void update_node_bounds_mesh(Span< float3 > positions, MeshNode &node)
Definition pbvh.cc:1075
void node_update_visibility_bmesh(BMeshNode &node)
Definition pbvh.cc:1358
Bounds< float3 > bounds_get(const Tree &pbvh)
Definition pbvh.cc:1480
void update_normals_from_eval(Object &object_eval, Tree &pbvh)
Definition pbvh.cc:1065
Span< float3 > vert_normals_eval(const Depsgraph &depsgraph, const Object &object_orig)
Definition pbvh.cc:2502
IndexMask nodes_to_face_selection_grids(const SubdivCCG &subdiv_ccg, Span< GridsNode > nodes, const IndexMask &nodes_mask, IndexMaskMemory &memory)
Definition pbvh.cc:1462
int count_grid_quads(const BitGroupVector<> &grid_visibility, Span< int > grid_indices, int gridsize, int display_gridsize)
Definition pbvh.cc:1403
void update_mask_grids(const SubdivCCG &subdiv_ccg, const IndexMask &node_mask, Tree &pbvh)
Definition pbvh.cc:1261
MutableSpan< float3 > vert_positions_eval_for_write(const Depsgraph &depsgraph, Object &object_orig)
Definition pbvh.cc:2496
Bounds< float3 > node_bounds(const Node &node)
Definition pbvh.cc:1604
void get_frustum_planes(const Tree &pbvh, PBVHFrustumPlanes *planes)
Definition pbvh.cc:2417
Span< float3 > face_normals_eval_from_eval(const Object &object_eval)
Definition pbvh.cc:2516
void update_bounds_bmesh(const BMesh &bm, Tree &pbvh)
Definition pbvh.cc:1170
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)
Definition pbvh.cc:1084
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)
Definition pbvh.cc:2263
void store_bounds_orig(Tree &pbvh)
Definition pbvh.cc:1206
Span< int > node_face_indices_calc_grids(const SubdivCCG &subdiv_ccg, const GridsNode &node, Vector< int > &faces)
Definition pbvh.cc:1583
Span< float3 > vert_positions_eval(const Depsgraph &depsgraph, const Object &object_orig)
Definition pbvh.cc:2482
void node_update_visibility_mesh(Span< bool > hide_vert, MeshNode &node)
Definition pbvh.cc:1310
void flush_bounds_to_parents(Tree &pbvh)
Definition pbvh.cc:1132
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)
Definition pbvh.cc:2125
void raycast(Tree &pbvh, FunctionRef< void(Node &node, float *tmin)> cb, const float3 &ray_start, const float3 &ray_normal, bool original)
PythonProbingStrategy<> DefaultProbingStrategy
signed short int16_t
Definition stdint.h:76
Array< BMVert *, 0 > orig_verts_
Array< float3, 0 > orig_positions_
Set< BMVert *, 0 > bm_unique_verts_
Set< BMVert *, 0 > bm_other_verts_
Span< int > faces() const
Span< int > verts() const
Span< int > all_verts() const