|
Blender V4.3
|
#include <BKE_pbvh_api.hh>
Inherits blender::bke::pbvh::Node.
Public Types | |
| using | LocalVertMapIndexT = int16_t |
| using | LocalVertMap |
Public Member Functions | |
| Span< int > | faces () const |
| Span< int > | verts () const |
| Span< int > | all_verts () const |
| int | corners_num () const |
Public Attributes | |
| Span< int > | face_indices_ |
| LocalVertMap | vert_indices_ |
| int | unique_verts_num_ = 0 |
| int | corners_num_ |
Public Attributes inherited from blender::bke::pbvh::Node | |
| Bounds< float3 > | bounds_ = {} |
| Bounds< float3 > | bounds_orig_ = {} |
| int | children_offset_ = 0 |
| PBVHNodeFlags | flag_ = PBVH_UpdateRedraw |
| float | tmin_ = 0.0f |
| int | debug_draw_gen_ = 0 |
| pixels::NodeData * | pixels_ = nullptr |
Definition at line 104 of file BKE_pbvh_api.hh.
Global vertices are mapped to local indices with a vector set, with a specialized type in order to use 32 bit integers for slot values. .
Definition at line 114 of file BKE_pbvh_api.hh.
Use a 16 bit integer for the slot index type because there will always be less than leaf_limit vertices in a node.
Definition at line 109 of file BKE_pbvh_api.hh.
Return all vertices used by faces in this node. The same as verts(), with the shared vertices added at the end of the array.
Definition at line 626 of file BKE_pbvh_api.hh.
References vert_indices_.
|
inline |
The number of corners in all of the node's faces.
Definition at line 630 of file BKE_pbvh_api.hh.
References corners_num_.
Return the faces contained by the node.
Definition at line 618 of file BKE_pbvh_api.hh.
References face_indices_.
Return the "unique" vertices owned by the node, excluding vertices owned by other nodes.
Definition at line 622 of file BKE_pbvh_api.hh.
References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::as_span(), blender::Span< T >::slice(), unique_verts_num_, and vert_indices_.
| int blender::bke::pbvh::MeshNode::corners_num_ |
The number of corners in all of the node's referenced faces. This value can easily be recalculated but currently it's faster to avoid that and store it here.
Definition at line 153 of file BKE_pbvh_api.hh.
Referenced by corners_num().
Indices into the #Mesh::faces() array. Refers to a subset of Tree::prim_indices_.
Definition at line 122 of file BKE_pbvh_api.hh.
Referenced by faces().
| int blender::bke::pbvh::MeshNode::unique_verts_num_ = 0 |
The number of vertices in #vert_indices not shared with (owned by) another node.
Definition at line 148 of file BKE_pbvh_api.hh.
Referenced by verts().
| LocalVertMap blender::bke::pbvh::MeshNode::vert_indices_ |
Array of indices into the mesh's vertex array. Contains the indices of all vertices used by faces that are within this node's bounding box.
Note that a vertex might be used by a multiple faces, and these faces might be in different leaf nodes. Such a vertex will appear in the vert_indices array of each of those leaf nodes.
In order to support cases where you want access to multiple nodes' vertices without duplication, the vert_indices array is ordered such that the first part of the array, up to index 'uniq_verts', contains "unique" vertex indices. These vertices might not be truly unique to this node, but if they appear in another node's vert_indices array, they will be above that node's 'uniq_verts' value.
Used for leaf nodes.
Definition at line 146 of file BKE_pbvh_api.hh.
Referenced by all_verts(), and verts().