Blender V4.5
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 61 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 65 of file BKE_paint_bvh.hh.

Member Function Documentation

◆ bounds()

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

Definition at line 623 of file BKE_paint_bvh.hh.

References bounds_.

Referenced by blender::bke::pbvh::clip_ray_ortho().

◆ bounds_orig()

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

Definition at line 628 of file BKE_paint_bvh.hh.

References bounds_orig_.

Referenced by blender::bke::pbvh::clip_ray_ortho().

◆ parent()

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

Definition at line 614 of file BKE_paint_bvh.hh.

References parent_.

Member Data Documentation

◆ bounds_

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

Axis aligned min and max of all vertex positions in the node.

Definition at line 84 of file BKE_paint_bvh.hh.

Referenced by bounds(), and blender::bke::pbvh::pbvh_bmesh_node_finalize().

◆ bounds_orig_

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

Bounds from the start of current brush stroke.

Definition at line 86 of file BKE_paint_bvh.hh.

Referenced by bounds_orig(), and blender::bke::pbvh::pbvh_bmesh_node_finalize().

◆ children_offset_

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

Definition at line 90 of file BKE_paint_bvh.hh.

◆ 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 107 of file BKE_paint_bvh.hh.

◆ flag_

◆ parent_

int blender::bke::pbvh::Node::parent_ = -1

Definition at line 81 of file BKE_paint_bvh.hh.

Referenced by parent(), and blender::bke::pbvh::pbvh_bmesh_node_split().

◆ pixels_

pixels::NodeData* blender::bke::pbvh::Node::pixels_ = nullptr
Todo
Move storage of image painting data to Tree or elsewhere.

Definition at line 110 of file BKE_paint_bvh.hh.

◆ 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 100 of file BKE_paint_bvh.hh.

Referenced by blender::bke::pbvh::node_tree_insert().


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