Blender V5.3
blender::offset_indices::GroupedSpan< T > Struct Template Reference

#include <BLI_offset_indices.hh>

Public Member Functions

 GroupedSpan ()=default
 GroupedSpan (OffsetIndices< int > offsets, Span< T > data)
Span< T > operator[] (const int64_t index) const
int64_t size () const
IndexRange index_range () const
bool is_empty () const

Public Attributes

OffsetIndices< int > offsets
Span< T > data

Detailed Description

template<typename T>
struct blender::offset_indices::GroupedSpan< T >

References many separate spans in a larger contiguous array. This gives a more efficient way to store many grouped arrays, without requiring many small allocations, giving the general benefits of using contiguous memory.

Note
If the offsets are shared between many GroupedSpan objects, it will be more efficient to retrieve the IndexRange only once and slice each span.

Definition at line 123 of file BLI_offset_indices.hh.

Constructor & Destructor Documentation

◆ GroupedSpan() [1/2]

template<typename T>
blender::offset_indices::GroupedSpan< T >::GroupedSpan ( )
default

◆ GroupedSpan() [2/2]

template<typename T>
blender::offset_indices::GroupedSpan< T >::GroupedSpan ( OffsetIndices< int > offsets,
Span< T > data )
inline

Member Function Documentation

◆ index_range()

template<typename T>
IndexRange blender::offset_indices::GroupedSpan< T >::index_range ( ) const
inline

Definition at line 143 of file BLI_offset_indices.hh.

References blender::offset_indices::OffsetIndices< T >::index_range().

Referenced by blender::bke::adapt_mesh_domain_corner_to_point_impl(), blender::meshintersect::add_face_constraints(), blender::nodes::node_geo_interpolate_curves_cc::build_kdtrees_for_root_positions(), blender::ed::sculpt_paint::boundary::calc_average_position(), blender::ed::sculpt_paint::boundary::calc_average_position(), blender::ed::greasepencil::segment::compute_bounding_boxes(), blender::nodes::node_geo_interpolate_curves_cc::compute_points_per_curve_by_group(), blender::nodes::node_geo_input_mesh_face_neighbors_cc::construct_neighbor_count_varray(), blender::bke::greasepencil::curves_mask_to_shapes(), blender::ed::greasepencil::tests::draw_results(), blender::ed::greasepencil::boolean::execute_boolean(), blender::ed::sculpt_paint::greasepencil::fill_mask_for_stroke_operation(), blender::nodes::node_geo_scale_elements_cc::gather_means(), blender::draw::grease_pencil_geom_batch_ensure(), blender::ed::sculpt_paint::smooth::neighbor_color_average(), blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh(), blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh_check_loose(), blender::geometry::debug::print_groupedspan(), blender::nodes::node_geo_scale_elements_cc::scale_on_axis(), blender::nodes::node_geo_scale_elements_cc::scale_uniformly(), blender::nodes::node_geo_input_shortest_edge_paths_cc::shortest_paths(), blender::ed::greasepencil::tests::test_curve_boolean(), and blender::bke::greasepencil::update_triangle_and_offsets_changed().

◆ is_empty()

template<typename T>
bool blender::offset_indices::GroupedSpan< T >::is_empty ( ) const
inline

◆ operator[]()

template<typename T>
Span< T > blender::offset_indices::GroupedSpan< T >::operator[] ( const int64_t index) const
inline

Definition at line 133 of file BLI_offset_indices.hh.

References blender::Span< T >::slice().

◆ size()

template<typename T>
int64_t blender::offset_indices::GroupedSpan< T >::size ( ) const
inline

Definition at line 138 of file BLI_offset_indices.hh.

References blender::offset_indices::OffsetIndices< T >::size().

Referenced by blender::meshintersect::add_face_constraints(), blender::geometry::construct::bevel_build_edge_polygons(), blender::build_emats_stack(), blender::nodes::node_geo_interpolate_curves_cc::build_kdtrees_for_root_positions(), blender::bke::pbvh::uv_islands::build_uv_islands(), blender::ed::sculpt_paint::boundary::calc_average_position(), blender::ed::sculpt_paint::boundary::calc_average_position(), blender::calculate_average_color(), blender::collect_hull_frames(), blender::xpbd::color_constraints__n_ary(), blender::nodes::node_geo_interpolate_curves_cc::compute_points_per_curve_by_group(), blender::nodes::node_geo_input_mesh_face_neighbors_cc::construct_neighbor_count_varray(), blender::bke::greasepencil::curves_mask_to_shapes(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_edges(), blender::nodes::node_geo_scale_elements_cc::gather_means(), blender::bke::pbvh::uv_islands::MeshData::is_edge_manifold(), blender::nodes::node_geo_input_mesh_face_neighbors_cc::large_enough_total_size(), blender::geometry::merge_layers(), blender::nodes::node_geo_merge_layers_cc::merge_layers(), blender::geometry::merge_propagation_map(), blender::mesh_island_to_astar_graph_edge_process(), blender::multires_reshape_apply_base_refit_base_mesh(), blender::ed::sculpt_paint::smooth::neighbor_color_average(), blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh(), blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh_check_loose(), blender::geometry::debug::print_groupedspan(), blender::ed::object::skin_armature_bone_create(), blender::offset_indices::tests::TEST(), blender::offset_indices::tests::test_build_groups_from_indices(), and blender::ed::object::vgroup_smooth_subset().

Member Data Documentation

◆ data

◆ offsets


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