Blender V5.0
blender::draw::select::SelectMap Struct Reference

#include <select_instance.hh>

Inherited by blender::draw::overlay::Resources.

Public Member Functions

 SelectMap (const SelectionType selection_type)
const ID select_id (const ObjectRef &ob_ref, uint sub_object_id=0)
void begin_sync (int clipping_plane_count)
void select_bind (PassSimple &pass)
void select_bind (PassMain &pass)
void select_bind (PassMain &pass, PassMain::Sub &sub)
void end_sync ()
void pre_draw ()
void read_result ()

Static Public Member Functions

static const ID select_invalid_id ()

Public Attributes

const SelectionType selection_type
Vector< uintselect_id_map
Vector< bool > in_front_map
Vector< std::string > map_names
StorageArrayBuffer< uintselect_output_buf = {"select_output_buf"}
StorageArrayBuffer< uint, 4, truedummy_select_buf = {"dummy_select_buf"}
UniformBuffer< SelectInfoDatainfo_buf
int clipping_plane_count = 0

Detailed Description

Generate selection IDs from objects and keep record of the mapping between them. The id's are contiguous so that we can create a destination buffer.

Definition at line 88 of file select_instance.hh.

Constructor & Destructor Documentation

◆ SelectMap()

blender::draw::select::SelectMap::SelectMap ( const SelectionType selection_type)
inline

Definition at line 108 of file select_instance.hh.

References selection_type.

Referenced by blender::draw::overlay::Resources::Resources().

Member Function Documentation

◆ begin_sync()

void blender::draw::select::SelectMap::begin_sync ( int clipping_plane_count)
inline

◆ end_sync()

void blender::draw::select::SelectMap::end_sync ( )
inline

◆ pre_draw()

◆ read_result()

◆ select_bind() [1/3]

◆ select_bind() [2/3]

◆ select_bind() [3/3]

◆ select_id()

◆ select_invalid_id()

Member Data Documentation

◆ clipping_plane_count

int blender::draw::select::SelectMap::clipping_plane_count = 0

If clipping is enabled, this is the number of clip planes to enable.

Definition at line 106 of file select_instance.hh.

Referenced by blender::draw::overlay::Resources::begin_sync(), begin_sync(), select_bind(), select_bind(), and select_bind().

◆ dummy_select_buf

StorageArrayBuffer<uint, 4, true> blender::draw::select::SelectMap::dummy_select_buf = {"dummy_select_buf"}

Dummy buffer. Might be better to remove, but simplify the shader create info patching.

Definition at line 102 of file select_instance.hh.

Referenced by select_bind(), and select_bind().

◆ in_front_map

Vector<bool> blender::draw::select::SelectMap::in_front_map

Track objects with OB_DRAW_IN_FRONT.

Definition at line 94 of file select_instance.hh.

Referenced by begin_sync(), end_sync(), read_result(), and select_id().

◆ info_buf

UniformBuffer<SelectInfoData> blender::draw::select::SelectMap::info_buf

Uniform buffer to bind to all passes to pass information about the selection state.

Definition at line 104 of file select_instance.hh.

Referenced by pre_draw(), read_result(), select_bind(), select_bind(), and select_bind().

◆ map_names

Vector<std::string> blender::draw::select::SelectMap::map_names

Debug map containing a copy of the object name.

Definition at line 97 of file select_instance.hh.

Referenced by begin_sync(), and select_id().

◆ select_id_map

Vector<uint> blender::draw::select::SelectMap::select_id_map

Mapping between internal IDs and object->runtime->select_id.

Definition at line 92 of file select_instance.hh.

Referenced by begin_sync(), end_sync(), read_result(), and select_id().

◆ select_output_buf

StorageArrayBuffer<uint> blender::draw::select::SelectMap::select_output_buf = {"select_output_buf"}

Stores the result of the whole selection drawing. Content depends on selection mode.

Definition at line 100 of file select_instance.hh.

Referenced by end_sync(), pre_draw(), read_result(), select_bind(), select_bind(), and select_bind().

◆ selection_type


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