Blender V5.0
blender::draw::pbvh::DrawCacheImpl Class Reference

Inherits blender::draw::pbvh::DrawCache.

Public Member Functions

 ~DrawCacheImpl () override
void tag_positions_changed (const IndexMask &node_mask) override
void tag_visibility_changed (const IndexMask &node_mask) override
void tag_topology_changed (const IndexMask &node_mask) override
void tag_face_sets_changed (const IndexMask &node_mask) override
void tag_masks_changed (const IndexMask &node_mask) override
void tag_attribute_changed (const IndexMask &node_mask, StringRef attribute_name) override
Span< gpu::Batch * > ensure_tris_batches (const Object &object, const ViewportRequest &request, const IndexMask &nodes_to_update) override
Span< gpu::Batch * > ensure_lines_batches (const Object &object, const ViewportRequest &request, const IndexMask &nodes_to_update) override
Span< int > ensure_material_indices (const Object &object) override
Public Member Functions inherited from blender::draw::pbvh::DrawCache
virtual ~DrawCache ()=default

Detailed Description

Stores the data necessary to draw the PBVH geometry. A separate *Impl class is used to hide implementation details from the public header.

Definition at line 92 of file draw_pbvh.cc.

Constructor & Destructor Documentation

◆ ~DrawCacheImpl()

blender::draw::pbvh::DrawCacheImpl::~DrawCacheImpl ( )
override

Definition at line 476 of file draw_pbvh.cc.

References blender::draw::pbvh::free_batches().

Member Function Documentation

◆ ensure_lines_batches()

Span< gpu::Batch * > blender::draw::pbvh::DrawCacheImpl::ensure_lines_batches ( const Object & object,
const ViewportRequest & request,
const IndexMask & nodes_to_update )
overridevirtual

◆ ensure_material_indices()

Span< int > blender::draw::pbvh::DrawCacheImpl::ensure_material_indices ( const Object & object)
overridevirtual

Return the material index for each node (all faces in a node should have the same material index, as ensured by the BVH building process).

Implements blender::draw::pbvh::DrawCache.

Definition at line 1905 of file draw_pbvh.cc.

References blender::draw::pbvh::calc_material_indices(), Object::data, DEG_get_original(), and blender::bke::object::pbvh_get().

◆ ensure_tris_batches()

Span< gpu::Batch * > blender::draw::pbvh::DrawCacheImpl::ensure_tris_batches ( const Object & object,
const ViewportRequest & request,
const IndexMask & nodes_to_update )
overridevirtual

◆ tag_attribute_changed()

void blender::draw::pbvh::DrawCacheImpl::tag_attribute_changed ( const IndexMask & node_mask,
StringRef attribute_name )
overridevirtual

Implements blender::bke::pbvh::DrawCache.

Definition at line 239 of file draw_pbvh.cc.

References data.

◆ tag_face_sets_changed()

void blender::draw::pbvh::DrawCacheImpl::tag_face_sets_changed ( const IndexMask & node_mask)
overridevirtual

Implements blender::bke::pbvh::DrawCache.

Definition at line 225 of file draw_pbvh.cc.

References data, and blender::draw::pbvh::FaceSet.

◆ tag_masks_changed()

void blender::draw::pbvh::DrawCacheImpl::tag_masks_changed ( const IndexMask & node_mask)
overridevirtual

Implements blender::bke::pbvh::DrawCache.

Definition at line 232 of file draw_pbvh.cc.

References data, and blender::draw::pbvh::Mask.

◆ tag_positions_changed()

void blender::draw::pbvh::DrawCacheImpl::tag_positions_changed ( const IndexMask & node_mask)
overridevirtual

◆ tag_topology_changed()

void blender::draw::pbvh::DrawCacheImpl::tag_topology_changed ( const IndexMask & node_mask)
overridevirtual

Currently the only times where topology changes are for BMesh dynamic topology, where tagging a visibility update deletes all the GPU data anyway.

Implements blender::bke::pbvh::DrawCache.

Definition at line 218 of file draw_pbvh.cc.

References tag_visibility_changed().

◆ tag_visibility_changed()

void blender::draw::pbvh::DrawCacheImpl::tag_visibility_changed ( const IndexMask & node_mask)
overridevirtual

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