Blender V5.0
blender::bke::pbvh::Node Class Reference

#include <BKE_paint_bvh.hh>

Inherits blender::NonCopyable.

Inherited by blender::bke::pbvh::BMeshNode, blender::bke::pbvh::GridsNode, and blender::bke::pbvh::MeshNode.

Public Types

enum  Flags : uint32_t {
  None = 0 , Leaf = 1 << 0 , FullyHidden = 1 << 10 , FullyMasked = 1 << 11 ,
  FullyUnmasked = 1 << 12 , UpdateTopology = 1 << 13 , RebuildPixels = 1 << 15 , TexLeaf = 1 << 16 ,
  TopologyUpdated = 1 << 17
}

Public Member Functions

std::optional< int > parent () const
const Bounds< float3 > & bounds () const
const Bounds< float3 > & bounds_orig () const

Public Attributes

int parent_ = -1
Bounds< float3bounds_ = {}
Bounds< float3bounds_orig_ = {}
int children_offset_ = 0
Flags flag_ = None
float tmin_ = 0.0f
int debug_draw_gen_ = 0
pixels::NodeDatapixels_ = nullptr

Detailed Description

Todo
Most data is public but should either be removed or become private in the future. The "_" suffix means that fields shouldn't be used by consumers of the bke::pbvh API.

Definition at line 62 of file BKE_paint_bvh.hh.

Member Enumeration Documentation

◆ Flags

Enumerator
None 
Leaf 
FullyHidden 
FullyMasked 
FullyUnmasked 
UpdateTopology 
RebuildPixels 
TexLeaf 
TopologyUpdated 

Used internally by pbvh_bmesh.cc.

Definition at line 66 of file BKE_paint_bvh.hh.

Member Function Documentation

◆ bounds()

◆ bounds_orig()

const Bounds< float3 > & Node::bounds_orig ( ) const
inline

◆ parent()

std::optional< int > Node::parent ( ) const
inline

Definition at line 636 of file BKE_paint_bvh.hh.

References parent_.

Member Data Documentation

◆ bounds_

◆ bounds_orig_

Bounds<float3> blender::bke::pbvh::Node::bounds_orig_ = {}

◆ children_offset_

int blender::bke::pbvh::Node::children_offset_ = 0

◆ debug_draw_gen_

int blender::bke::pbvh::Node::debug_draw_gen_ = 0

Used to flash colors of updated node bounding boxes in debug draw mode (when G.debug_value / bpy.app.debug_value is 889).

Todo
Remove and store elsewhere.

Definition at line 108 of file BKE_paint_bvh.hh.

Referenced by BKE_pbvh_debug_draw_gen_get().

◆ flag_

◆ parent_

◆ pixels_

◆ tmin_

float blender::bke::pbvh::Node::tmin_ = 0.0f

Used for ray-casting: how close the bounding-box is to the ray point.

Todo
Remove and store elsewhere.

Definition at line 101 of file BKE_paint_bvh.hh.

Referenced by BKE_pbvh_node_get_tmin(), blender::bke::pbvh::nearest_to_ray_aabb_dist_sq(), blender::bke::pbvh::node_tree_insert(), and blender::bke::pbvh::ray_aabb_intersect().


The documentation for this class was generated from the following file: