Blender V5.0
pbvh_intern.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
7#include "BKE_paint_bvh.hh"
8
12
13/* pbvh.cc */
14
15namespace blender::bke::pbvh {
16
17bool ray_face_intersection_quad(const float3 &ray_start,
18 const IsectRayPrecalc *isect_precalc,
19 const float3 &t0,
20 const float3 &t1,
21 const float3 &t2,
22 const float3 &t3,
23 float *depth);
24bool ray_face_intersection_tri(const float3 &ray_start,
25 const IsectRayPrecalc *isect_precalc,
26 const float3 &t0,
27 const float3 &t1,
28 const float3 &t2,
29 float *depth);
30
31bool ray_face_nearest_quad(const float3 &ray_start,
32 const float3 &ray_normal,
33 const float3 &t0,
34 const float3 &t1,
35 const float3 &t2,
36 const float3 &t3,
37 float *r_depth,
38 float *r_dist_sq);
39bool ray_face_nearest_tri(const float3 &ray_start,
40 const float3 &ray_normal,
41 const float3 &t0,
42 const float3 &t1,
43 const float3 &t2,
44 float *r_depth,
45 float *r_dist_sq);
46
47/* pbvh_bmesh.cc */
48
49bool bmesh_node_nearest_to_ray(blender::bke::pbvh::BMeshNode &node,
50 const float3 &ray_start,
51 const float3 &ray_normal,
52 float *r_depth,
53 float *dist_sq,
54 bool use_original);
55
56void bmesh_normals_update(Tree &pbvh, const IndexMask &nodes_to_update);
57
58/* pbvh_pixels.hh */
59
60void node_pixels_free(blender::bke::pbvh::Node *node);
61void pixels_free(blender::bke::pbvh::Tree *pbvh);
62
63} // namespace blender::bke::pbvh
A BVH for high poly meshes.
bool 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 node_pixels_free(blender::bke::pbvh::Node *node)
bool ray_face_nearest_tri(const float3 &ray_start, const float3 &ray_normal, const float3 &t0, const float3 &t1, const float3 &t2, float *r_depth, float *dist_sq)
Definition pbvh.cc:1922
void bmesh_normals_update(Tree &pbvh, const IndexMask &nodes_to_update)
bool ray_face_nearest_quad(const float3 &ray_start, const float3 &ray_normal, const float3 &t0, const float3 &t1, const float3 &t2, const float3 &t3, float *r_depth, float *dist_sq)
Definition pbvh.cc:1892
bool ray_face_intersection_quad(const float3 &ray_start, const IsectRayPrecalc *isect_precalc, const float3 &t0, const float3 &t1, const float3 &t2, const float3 &t3, float *depth)
Definition pbvh.cc:1826
void pixels_free(blender::bke::pbvh::Tree *pbvh)
bool ray_face_intersection_tri(const float3 &ray_start, const IsectRayPrecalc *isect_precalc, const float3 &t0, const float3 &t1, const float3 &t2, float *depth)
Definition pbvh.cc:1848
VecBase< float, 3 > float3