Blender V5.0
draw_pbvh.cc File Reference
#include "BLI_map.hh"
#include "BLI_math_geom.h"
#include "BLI_math_vector_types.hh"
#include "BLI_utildefines.h"
#include "BLI_vector.hh"
#include "DNA_object_types.h"
#include "BKE_attribute.hh"
#include "BKE_attribute_legacy_convert.hh"
#include "BKE_attribute_math.hh"
#include "BKE_customdata.hh"
#include "BKE_mesh.hh"
#include "BKE_paint.hh"
#include "BKE_paint_bvh.hh"
#include "BKE_subdiv_ccg.hh"
#include "DEG_depsgraph_query.hh"
#include "GPU_batch.hh"
#include "DRW_engine.hh"
#include "DRW_pbvh.hh"
#include "DRW_render.hh"
#include "attribute_convert.hh"
#include "bmesh.hh"

Go to the source code of this file.

Classes

struct  blender::DefaultHash< draw::pbvh::AttributeRequest >
struct  blender::draw::pbvh::OrigMeshData
class  blender::draw::pbvh::DrawCacheImpl

Namespaces

namespace  blender
namespace  blender::draw
namespace  blender::draw::pbvh

Functions

DrawCacheblender::draw::pbvh::ensure_draw_data (std::unique_ptr< bke::pbvh::DrawCache > &ptr)
static BLI_NOINLINE void blender::draw::pbvh::free_ibos (const MutableSpan< gpu::IndexBufPtr > ibos, const IndexMask &node_mask)
static BLI_NOINLINE void blender::draw::pbvh::free_vbos (const MutableSpan< gpu::VertBufPtr > vbos, const IndexMask &node_mask)
static BLI_NOINLINE void blender::draw::pbvh::free_batches (const MutableSpan< gpu::Batch * > batches, const IndexMask &node_mask)
static const GPUVertFormatblender::draw::pbvh::position_format ()
static const GPUVertFormatblender::draw::pbvh::normal_format ()
static const GPUVertFormatblender::draw::pbvh::mask_format ()
static const GPUVertFormatblender::draw::pbvh::face_set_format ()
static GPUVertFormat blender::draw::pbvh::attribute_format (const OrigMeshData &orig_mesh_data, const StringRef name, const bke::AttrType data_type)
short4 blender::draw::pbvh::normal_float_to_short (const float3 &value)
template<typename T>
void blender::draw::pbvh::extract_data_vert_mesh (const OffsetIndices< int > faces, const Span< int > corner_verts, const Span< T > attribute, const Span< int > face_indices, gpu::VertBuf &vbo)
template<typename T>
void blender::draw::pbvh::extract_data_face_mesh (const OffsetIndices< int > faces, const Span< T > attribute, const Span< int > face_indices, gpu::VertBuf &vbo)
template<typename T>
void blender::draw::pbvh::extract_data_corner_mesh (const OffsetIndices< int > faces, const Span< T > attribute, const Span< int > face_indices, gpu::VertBuf &vbo)
template<typename T>
const Tblender::draw::pbvh::bmesh_cd_vert_get (const BMVert &vert, const int offset)
template<typename T>
const Tblender::draw::pbvh::bmesh_cd_loop_get (const BMLoop &loop, const int offset)
template<typename T>
const Tblender::draw::pbvh::bmesh_cd_face_get (const BMFace &face, const int offset)
template<typename T>
void blender::draw::pbvh::extract_data_vert_bmesh (const Set< BMFace *, 0 > &faces, const int cd_offset, gpu::VertBuf &vbo)
template<typename T>
void blender::draw::pbvh::extract_data_face_bmesh (const Set< BMFace *, 0 > &faces, const int cd_offset, gpu::VertBuf &vbo)
template<typename T>
void blender::draw::pbvh::extract_data_corner_bmesh (const Set< BMFace *, 0 > &faces, const int cd_offset, gpu::VertBuf &vbo)
static int blender::draw::pbvh::count_visible_tris_bmesh (const Set< BMFace *, 0 > &faces)
static BLI_NOINLINE void blender::draw::pbvh::ensure_vbos_allocated_mesh (const Object &object, const GPUVertFormat &format, const IndexMask &node_mask, const MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::ensure_vbos_allocated_grids (const Object &object, const GPUVertFormat &format, const BitSpan use_flat_layout, const IndexMask &node_mask, const MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::ensure_vbos_allocated_bmesh (const Object &object, const GPUVertFormat &format, const IndexMask &node_mask, const MutableSpan< gpu::VertBufPtr > vbos)
static void blender::draw::pbvh::update_positions_mesh (const Object &object, const IndexMask &node_mask, MutableSpan< gpu::VertBufPtr > vbos)
static void blender::draw::pbvh::update_normals_mesh (const Object &object, const IndexMask &node_mask, MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::update_masks_mesh (const Object &object, const OrigMeshData &orig_mesh_data, const IndexMask &node_mask, MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::update_face_sets_mesh (const Object &object, const OrigMeshData &orig_mesh_data, const IndexMask &node_mask, MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::update_generic_attribute_mesh (const Object &object, const OrigMeshData &orig_mesh_data, const IndexMask &node_mask, const StringRef name, MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::fill_positions_grids (const Object &object, const BitSpan use_flat_layout, const IndexMask &node_mask, const MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::fill_normals_grids (const Object &object, const OrigMeshData &orig_mesh_data, const BitSpan use_flat_layout, const IndexMask &node_mask, const MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::fill_masks_grids (const Object &object, const BitSpan use_flat_layout, const IndexMask &node_mask, const MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::fill_face_sets_grids (const Object &object, const OrigMeshData &orig_mesh_data, const BitSpan use_flat_layout, const IndexMask &node_mask, const MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::update_positions_bmesh (const Object &object, const IndexMask &node_mask, const MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::update_normals_bmesh (const Object &object, const IndexMask &node_mask, const MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::update_masks_bmesh (const Object &object, const IndexMask &node_mask, const MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::update_face_sets_bmesh (const Object &object, const OrigMeshData &orig_mesh_data, const IndexMask &node_mask, const MutableSpan< gpu::VertBufPtr > vbos)
static BLI_NOINLINE void blender::draw::pbvh::update_generic_attribute_bmesh (const Object &object, const OrigMeshData &orig_mesh_data, const IndexMask &node_mask, const StringRef name, const MutableSpan< gpu::VertBufPtr > vbos)
static gpu::IndexBufPtr blender::draw::pbvh::create_lines_index_faces (const OffsetIndices< int > faces, const Span< bool > hide_poly, const Span< int > face_indices)
static gpu::IndexBufPtr blender::draw::pbvh::create_lines_index_bmesh (const Set< BMFace *, 0 > &faces, const int visible_faces_num)
static int blender::draw::pbvh::create_tri_index_grids (const Span< int > grid_indices, const BitGroupVector<> &grid_hidden, const int gridsize, const int skip, const int totgrid, MutableSpan< uint3 > data)
static int blender::draw::pbvh::create_tri_index_grids_flat_layout (const Span< int > grid_indices, const BitGroupVector<> &grid_hidden, const int gridsize, const int skip, const int totgrid, MutableSpan< uint3 > data)
static void blender::draw::pbvh::create_lines_index_grids (const Span< int > grid_indices, int display_gridsize, const BitGroupVector<> &grid_hidden, const int gridsize, const int skip, const int totgrid, MutableSpan< uint2 > data)
static void blender::draw::pbvh::create_lines_index_grids_flat_layout (const Span< int > grid_indices, int display_gridsize, const BitGroupVector<> &grid_hidden, const int gridsize, const int skip, const int totgrid, MutableSpan< uint2 > data)
static Array< int > blender::draw::pbvh::calc_material_indices (const Object &object, const OrigMeshData &orig_mesh_data)
static BitVector blender::draw::pbvh::calc_use_flat_layout (const Object &object, const OrigMeshData &orig_mesh_data)
static gpu::IndexBufPtr blender::draw::pbvh::create_tri_index_mesh (const OffsetIndices< int > faces, const Span< int3 > corner_tris, const Span< bool > hide_poly, const bke::pbvh::MeshNode &node)
static gpu::IndexBufPtr blender::draw::pbvh::create_tri_index_grids (const CCGKey &key, const BitGroupVector<> &grid_hidden, const bool do_coarse, const Span< int > grid_indices, const bool use_flat_layout)
static gpu::IndexBufPtr blender::draw::pbvh::create_lines_index_grids (const CCGKey &key, const BitGroupVector<> &grid_hidden, const bool do_coarse, const Span< int > grid_indices, const bool use_flat_layout)
static BLI_NOINLINE void blender::draw::pbvh::flush_vbo_data (const Span< gpu::VertBufPtr > vbos, const IndexMask &node_mask)

Detailed Description

bke::pbvh::Tree drawing. Embeds GPU meshes inside of bke::pbvh::Tree nodes, used by mesh sculpt mode.

Definition in file draw_pbvh.cc.