Blender  V3.3
Classes | Typedefs | Enumerations | Functions
pbvh_intern.h File Reference

Go to the source code of this file.

Classes

struct  BB
 
struct  BBC
 
struct  PBVHNode
 
struct  PBVH
 

Typedefs

typedef struct PBVHBMeshLog PBVHBMeshLog
 

Enumerations

enum  PBVHFlags { PBVH_DYNTOPO_SMOOTH_SHADING = 1 }
 

Functions

void BB_reset (BB *bb)
 
void BB_expand (BB *bb, const float co[3])
 
void BB_expand_with_bb (BB *bb, BB *bb2)
 
void BBC_update_centroid (BBC *bbc)
 
int BB_widest_axis (const BB *bb)
 
void pbvh_grow_nodes (PBVH *bvh, int totnode)
 
bool ray_face_intersection_quad (const float ray_start[3], struct IsectRayPrecalc *isect_precalc, const float t0[3], const float t1[3], const float t2[3], const float t3[3], float *depth)
 
bool ray_face_intersection_tri (const float ray_start[3], struct IsectRayPrecalc *isect_precalc, const float t0[3], const float t1[3], const float t2[3], float *depth)
 
bool ray_face_nearest_quad (const float ray_start[3], const float ray_normal[3], const float t0[3], const float t1[3], const float t2[3], const float t3[3], float *r_depth, float *r_dist_sq)
 
bool ray_face_nearest_tri (const float ray_start[3], const float ray_normal[3], const float t0[3], const float t1[3], const float t2[3], float *r_depth, float *r_dist_sq)
 
void pbvh_update_BB_redraw (PBVH *bvh, PBVHNode **nodes, int totnode, int flag)
 
bool pbvh_bmesh_node_raycast (PBVHNode *node, const float ray_start[3], const float ray_normal[3], struct IsectRayPrecalc *isect_precalc, float *dist, bool use_original, int *r_active_vertex_index, float *r_face_normal)
 
bool pbvh_bmesh_node_nearest_to_ray (PBVHNode *node, const float ray_start[3], const float ray_normal[3], float *depth, float *dist_sq, bool use_original)
 
void pbvh_bmesh_normals_update (PBVHNode **nodes, int totnode)
 
void pbvh_pixels_free (PBVHNode *node)
 
void pbvh_pixels_free_brush_test (PBVHNode *node)
 
void pbvh_free_draw_buffers (PBVH *pbvh, PBVHNode *node)
 

Typedef Documentation

◆ PBVHBMeshLog

typedef struct PBVHBMeshLog PBVHBMeshLog

Definition at line 1 of file pbvh_intern.h.

Enumeration Type Documentation

◆ PBVHFlags

enum PBVHFlags
Enumerator
PBVH_DYNTOPO_SMOOTH_SHADING 

Definition at line 128 of file pbvh_intern.h.

Function Documentation

◆ BB_expand()

void BB_expand ( BB bb,
const float  co[3] 
)

◆ BB_expand_with_bb()

void BB_expand_with_bb ( BB bb,
BB bb2 
)

Expand the bounding box to include another bounding box.

Definition at line 77 of file pbvh.c.

References BB::bmax, BB::bmin, max_ff(), and min_ff().

Referenced by BKE_pbvh_redraw_BB(), pbvh_bmesh_create_nodes_fast_recursive(), pbvh_bmesh_node_split(), update_node_vb(), and update_vb().

◆ BB_reset()

void BB_reset ( BB bb)

◆ BB_widest_axis()

int BB_widest_axis ( const BB bb)

Return 0, 1, or 2 to indicate the widest axis of the bounding box.

Definition at line 85 of file pbvh.c.

References BB::bmax, and BB::bmin.

Referenced by build_sub(), pbvh_bmesh_node_limit_ensure_fast(), and pbvh_bmesh_node_split().

◆ BBC_update_centroid()

void BBC_update_centroid ( BBC bbc)

◆ pbvh_bmesh_node_nearest_to_ray()

bool pbvh_bmesh_node_nearest_to_ray ( PBVHNode node,
const float  ray_start[3],
const float  ray_normal[3],
float depth,
float dist_sq,
bool  use_original 
)

◆ pbvh_bmesh_node_raycast()

bool pbvh_bmesh_node_raycast ( PBVHNode node,
const float  ray_start[3],
const float  ray_normal[3],
struct IsectRayPrecalc isect_precalc,
float dist,
bool  use_original,
int *  r_active_vertex_index,
float r_face_normal 
)

◆ pbvh_bmesh_normals_update()

void pbvh_bmesh_normals_update ( PBVHNode **  nodes,
int  totnode 
)

◆ pbvh_free_draw_buffers()

void pbvh_free_draw_buffers ( PBVH pbvh,
PBVHNode node 
)

Definition at line 1389 of file pbvh.c.

References PBVH::draw_cache_invalid, GPU_pbvh_buffers_free(), node, and NULL.

Referenced by pbvh_bmesh_node_split(), and pbvh_update_draw_buffers().

◆ pbvh_grow_nodes()

void pbvh_grow_nodes ( PBVH bvh,
int  totnode 
)

◆ pbvh_pixels_free()

void pbvh_pixels_free ( PBVHNode node)

Definition at line 388 of file pbvh_pixels.cc.

References node.

Referenced by BKE_pbvh_free().

◆ pbvh_pixels_free_brush_test()

void pbvh_pixels_free_brush_test ( PBVHNode node)

◆ pbvh_update_BB_redraw()

void pbvh_update_BB_redraw ( PBVH bvh,
PBVHNode **  nodes,
int  totnode,
int  flag 
)

◆ ray_face_intersection_quad()

bool ray_face_intersection_quad ( const float  ray_start[3],
struct IsectRayPrecalc isect_precalc,
const float  t0[3],
const float  t1[3],
const float  t2[3],
const float  t3[3],
float depth 
)

Definition at line 2184 of file pbvh.c.

References isect_ray_tri_watertight_v3(), and NULL.

Referenced by pbvh_grids_node_raycast().

◆ ray_face_intersection_tri()

bool ray_face_intersection_tri ( const float  ray_start[3],
struct IsectRayPrecalc isect_precalc,
const float  t0[3],
const float  t1[3],
const float  t2[3],
float depth 
)

◆ ray_face_nearest_quad()

bool ray_face_nearest_quad ( const float  ray_start[3],
const float  ray_normal[3],
const float  t0[3],
const float  t1[3],
const float  t2[3],
const float  t3[3],
float r_depth,
float r_dist_sq 
)

Definition at line 2247 of file pbvh.c.

References dist_squared_ray_to_tri_v3_fast().

Referenced by pbvh_grids_node_nearest_to_ray().

◆ ray_face_nearest_tri()

bool ray_face_nearest_tri ( const float  ray_start[3],
const float  ray_normal[3],
const float  t0[3],
const float  t1[3],
const float  t2[3],
float r_depth,
float r_dist_sq 
)