|
Blender V4.3
|
Enumerations | |
| enum class | BooleanMix { None , AllFalse , AllTrue , Mixed } |
Functions | |
| void | copy (const GVArray &src, GMutableSpan dst, int64_t grain_size=4096) |
| template<typename T > | |
| void | copy (const VArray< T > &src, MutableSpan< T > dst, const int64_t grain_size=4096) |
| template<typename T > | |
| void | copy (const Span< T > src, MutableSpan< T > dst, const int64_t grain_size=4096) |
| void | copy (const GVArray &src, const IndexMask &selection, GMutableSpan dst, int64_t grain_size=4096) |
| template<typename T > | |
| void | copy (const Span< T > src, const IndexMask &selection, MutableSpan< T > dst, const int64_t grain_size=4096) |
| template<typename T , typename IndexT > | |
| void | scatter (const Span< T > src, const Span< IndexT > indices, MutableSpan< T > dst, const int64_t grain_size=4096) |
| template<typename T > | |
| void | scatter (const Span< T > src, const IndexMask &indices, MutableSpan< T > dst, const int64_t grain_size=4096) |
| void | gather (const GVArray &src, const IndexMask &indices, GMutableSpan dst, int64_t grain_size=4096) |
| void | gather (GSpan src, const IndexMask &indices, GMutableSpan dst, int64_t grain_size=4096) |
| template<typename T > | |
| void | gather (const VArray< T > &src, const IndexMask &indices, MutableSpan< T > dst, const int64_t grain_size=4096) |
| template<typename T , typename IndexT > | |
| void | gather (const Span< T > src, const IndexMask &indices, MutableSpan< T > dst, const int64_t grain_size=4096) |
| template<typename T , typename IndexT > | |
| void | gather (const Span< T > src, const Span< IndexT > indices, MutableSpan< T > dst, const int64_t grain_size=4096) |
| template<typename T , typename IndexT > | |
| void | gather (const VArray< T > &src, const Span< IndexT > indices, MutableSpan< T > dst, const int64_t grain_size=4096) |
| template<typename T > | |
| void | gather_group_to_group (const OffsetIndices< int > src_offsets, const OffsetIndices< int > dst_offsets, const IndexMask &selection, const Span< T > src, MutableSpan< T > dst) |
| template<typename T > | |
| void | gather_group_to_group (const OffsetIndices< int > src_offsets, const OffsetIndices< int > dst_offsets, const IndexMask &selection, const VArray< T > src, MutableSpan< T > dst) |
| template<typename T > | |
| void | gather_to_groups (const OffsetIndices< int > dst_offsets, const IndexMask &src_selection, const Span< T > src, MutableSpan< T > dst) |
| void | copy_group_to_group (OffsetIndices< int > src_offsets, OffsetIndices< int > dst_offsets, const IndexMask &selection, GSpan src, GMutableSpan dst) |
| template<typename T > | |
| void | copy_group_to_group (OffsetIndices< int > src_offsets, OffsetIndices< int > dst_offsets, const IndexMask &selection, Span< T > src, MutableSpan< T > dst) |
| void | count_indices (Span< int > indices, MutableSpan< int > counts) |
| void | invert_booleans (MutableSpan< bool > span) |
| void | invert_booleans (MutableSpan< bool > span, const IndexMask &mask) |
| int64_t | count_booleans (const VArray< bool > &varray) |
| int64_t | count_booleans (const VArray< bool > &varray, const IndexMask &mask) |
| BooleanMix | booleans_mix_calc (const VArray< bool > &varray, IndexRange range_to_check) |
| BooleanMix | booleans_mix_calc (const VArray< bool > &varray) |
| template<typename T > | |
| Vector< IndexRange > | find_all_ranges (const Span< T > span, const T &value) |
| template<typename T > | |
| void | fill_index_range (MutableSpan< T > span, const T start=0) |
| template<typename T > | |
| bool | indexed_data_equal (const Span< T > all_values, const Span< int > indices, const Span< T > values) |
| bool | indices_are_range (Span< int > indices, IndexRange range) |
| static bool | all_equal (const Span< bool > span, const bool test) |
| static bool | all_equal (const VArray< bool > &varray, const IndexRange range, const bool test) |
|
strong |
| Enumerator | |
|---|---|
| None | |
| AllFalse | |
| AllTrue | |
| Mixed | |
Definition at line 252 of file BLI_array_utils.hh.
|
static |
Definition at line 95 of file array_utils.cc.
References all_equal(), blender::Span< T >::begin(), and blender::Span< T >::end().
Referenced by all_equal(), all_equal(), and booleans_mix_calc().
|
static |
Definition at line 100 of file array_utils.cc.
References all_equal().
|
inline |
Definition at line 259 of file BLI_array_utils.hh.
References booleans_mix_calc(), and blender::VArrayCommon< T >::index_range().
| BooleanMix blender::array_utils::booleans_mix_calc | ( | const VArray< bool > & | varray, |
| IndexRange | range_to_check ) |
Definition at line 106 of file array_utils.cc.
References all_equal(), b, booleans_mix_calc(), blender::VArrayCommon< T >::common_info(), blender::CommonVArrayInfo::data, blender::Span< T >::first(), init(), blender::VArrayCommon< T >::is_empty(), blender::VArrayCommon< T >::size(), blender::Span< T >::slice(), and blender::CommonVArrayInfo::type.
Referenced by booleans_mix_calc(), booleans_mix_calc(), blender::io::alembic::ABCCurveWriter::do_write(), and blender::io::usd::USDCurvesWriter::do_write().
| void blender::array_utils::copy | ( | const GVArray & | src, |
| const IndexMask & | selection, | ||
| GMutableSpan | dst, | ||
| int64_t | grain_size = 4096 ) |
Fill the destination span by copying masked values from the src array. Threaded based on grain-size.
Definition at line 23 of file array_utils.cc.
References BLI_assert, blender::threading::parallel_for(), blender::GMutableSpan::size(), blender::GVArrayCommon::size(), blender::GMutableSpan::type(), and blender::GVArrayCommon::type().
| void blender::array_utils::copy | ( | const GVArray & | src, |
| GMutableSpan | dst, | ||
| int64_t | grain_size = 4096 ) |
Fill the destination span by copying all values from the src array. Threaded based on grain-size.
Definition at line 14 of file array_utils.cc.
References BLI_assert, blender::GVArrayCommon::index_range(), blender::threading::parallel_for(), blender::GMutableSpan::size(), blender::GVArrayCommon::size(), blender::GMutableSpan::type(), and blender::GVArrayCommon::type().
Referenced by blender::create_envelope_strokes(), blender::ed::curves::duplicate_points(), blender::fn::evaluate_fields(), blender::draw::extract_vert_index_mesh(), blender::nodes::node_geo_scale_elements_cc::from_indices_large_groups(), blender::io::hydra::gather_vert_data(), GPU_indexbuf_build_in_place_from_memory(), blender::draw::grease_pencil_edit_batch_ensure(), blender::ed::greasepencil::grease_pencil_primitive_load(), blender::ed::greasepencil::grease_pencil_primitive_save(), blender::bke::GeometrySet::propagate_attributes_from_layer_to_instances(), blender::geometry::resample_to_count(), blender::io::stl::STLMeshHelper::to_mesh(), and blender::bke::try_capture_fields_on_geometry().
|
inline |
Fill the destination span by copying values from the src array. Threaded based on grain-size.
Definition at line 59 of file BLI_array_utils.hh.
References BLI_assert, blender::MutableSpan< T >::size(), and blender::Span< T >::size().
|
inline |
Fill the destination span by copying all values from the src array. Threaded based on grain-size.
Definition at line 37 of file BLI_array_utils.hh.
References BLI_assert, blender::Span< T >::index_range(), blender::threading::parallel_for(), blender::MutableSpan< T >::size(), and blender::Span< T >::size().
|
inline |
Definition at line 24 of file BLI_array_utils.hh.
References BLI_assert, blender::VArrayCommon< T >::index_range(), blender::threading::parallel_for(), blender::MutableSpan< T >::size(), and blender::VArrayCommon< T >::size().
| void blender::array_utils::copy_group_to_group | ( | OffsetIndices< int > | src_offsets, |
| OffsetIndices< int > | dst_offsets, | ||
| const IndexMask & | selection, | ||
| GSpan | src, | ||
| GMutableSpan | dst ) |
Copy the src data from the groups defined by src_offsets to the groups in dst defined by dst_offsets. Groups to use are masked by selection, and it is assumed that the corresponding groups have the same size.
Definition at line 53 of file array_utils.cc.
References blender::GMutableSpan::slice(), and blender::GSpan::slice().
Referenced by blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::bke::copy_attributes_group_to_group(), copy_group_to_group(), blender::geometry::copy_or_defaults_for_unselected_curves(), blender::bke::CurvesGeometry::evaluated_positions(), and blender::ed::curves::resize_curves().
| void blender::array_utils::copy_group_to_group | ( | OffsetIndices< int > | src_offsets, |
| OffsetIndices< int > | dst_offsets, | ||
| const IndexMask & | selection, | ||
| Span< T > | src, | ||
| MutableSpan< T > | dst ) |
Definition at line 227 of file BLI_array_utils.hh.
References copy_group_to_group().
Definition at line 204 of file array_utils.cc.
References count_booleans(), and blender::VArrayCommon< T >::size().
Referenced by count_booleans(), count_booleans(), blender::draw::grease_pencil_edit_batch_ensure(), and blender::draw::grease_pencil_weight_batch_ensure().
| int64_t blender::array_utils::count_booleans | ( | const VArray< bool > & | varray, |
| const IndexMask & | mask ) |
Definition at line 154 of file array_utils.cc.
References blender::VArrayCommon< T >::common_info(), count_booleans(), blender::CommonVArrayInfo::data, blender::VArrayCommon< T >::index_range(), init(), blender::VArrayCommon< T >::is_empty(), blender::VArrayCommon< T >::size(), and blender::CommonVArrayInfo::type.
| void blender::array_utils::count_indices | ( | Span< int > | indices, |
| MutableSpan< int > | counts ) |
Count the number of occurrences of each index.
| indices | The indices to count. |
| counts | The number of occurrences of each index. Typically initialized to zero. Must be large enough to contain the maximum index. |
Definition at line 65 of file array_utils.cc.
References BLI_system_thread_count(), indices, and blender::threading::parallel_for().
Referenced by blender::nodes::node_geo_input_mesh_edge_neighbors_cc::EdgeNeighborCountFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_vertex_neighbors_cc::VertexCountFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_vertex_neighbors_cc::VertexFaceCountFieldInput::get_varray_for_context(), blender::nodes::node_geo_mesh_topology_corners_of_edge_cc::CornersOfEdgeCountInput::get_varray_for_context(), blender::nodes::node_geo_mesh_topology_corners_of_vertex_cc::CornersOfVertCountInput::get_varray_for_context(), blender::nodes::node_geo_mesh_topology_edges_of_vertex_cc::EdgesOfVertCountInput::get_varray_for_context(), and subdivide_base().
|
inline |
Fill the span with increasing indices: 0, 1, 2, ... Optionally, the start value can be provided.
Definition at line 293 of file BLI_array_utils.hh.
References blender::MutableSpan< T >::begin(), blender::MutableSpan< T >::end(), and fill_index_range().
Referenced by blender::bke::Instances::almost_unique_ids(), blender::io::obj::OBJMesh::calc_face_order(), blender::ed::sculpt_paint::cloth::calc_vert_indices_grids(), blender::nodes::node_geo_mesh_primitive_circle_cc::create_circle_mesh(), blender::create_dashes(), blender::create_envelope_strokes(), blender::geometry::tests::create_test_curves(), blender::ed::greasepencil::curve_merge_by_distance(), blender::ed::curves::duplicate_points(), fill_index_range(), blender::nodes::node_geo_curve_topology_points_of_curve_cc::PointsOfCurveInput::get_varray_for_context(), blender::nodes::node_geo_mesh_topology_corners_of_edge_cc::CornersOfEdgeInput::get_varray_for_context(), blender::nodes::node_geo_mesh_topology_corners_of_face_cc::CornersOfFaceInput::get_varray_for_context(), blender::nodes::node_geo_mesh_topology_corners_of_vertex_cc::CornersOfVertInput::get_varray_for_context(), blender::nodes::node_geo_mesh_topology_edges_of_vertex_cc::EdgesOfVertInput::get_varray_for_context(), blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), blender::geometry::point_merge_by_distance(), blender::reorder_cyclic_curve_points(), and blender::index_mask::segments_from_batch_predicate().
|
inline |
Finds all the index ranges for which consecutive values in span equal value.
Definition at line 267 of file BLI_array_utils.hh.
References blender::IndexRange::drop_front(), find_all_ranges(), blender::Span< T >::first(), blender::Span< T >::index_range(), blender::Span< T >::is_empty(), and blender::Span< T >::size().
Referenced by blender::geometry::curve_simplify(), blender::ed::curves::duplicate_points(), find_all_ranges(), and blender::ed::greasepencil::stroke_simplify().
| void blender::array_utils::gather | ( | const GVArray & | src, |
| const IndexMask & | indices, | ||
| GMutableSpan | dst, | ||
| int64_t | grain_size = 4096 ) |
Fill the destination span by gathering indexed values from the src array.
Definition at line 36 of file array_utils.cc.
References BLI_assert, blender::threading::parallel_for(), blender::GMutableSpan::size(), blender::GMutableSpan::type(), and blender::GVArrayCommon::type().
Referenced by blender::nodes::node_geo_duplicate_elements_cc::accumulate_counts_to_offsets(), blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), blender::ed::transform::curves::append_positions_to_custom_data(), blender::ed::sculpt_paint::greasepencil::brush_point_influence_mask(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::bke::curves_copy_point_selection(), blender::ed::curves::duplicate_curves(), blender::draw::extract_data_mesh_mapped_corner(), blender::draw::extract_vert_index_mesh(), blender::draw::extract_vert_normals_mesh(), gather(), blender::bke::gather_attributes(), blender::io::hydra::gather_vert_data(), blender::nodes::node_geo_mesh_to_points_cc::geometry_set_mesh_to_points(), blender::nodes::node_geo_points_to_vertices_cc::geometry_set_points_to_vertices(), blender::draw::grease_pencil_cache_add_nurbs(), blender::draw::grease_pencil_edit_batch_ensure(), blender::ed::sculpt_paint::grease_pencil_fill_extension_lines_from_circles(), blender::geometry::mesh_to_curve_convert(), blender::nodes::node_geo_attribute_statistic_cc::node_geo_exec(), blender::nodes::node_geo_grease_pencil_to_curves_cc::node_geo_exec(), blender::bke::mesh::normals_calc_corners(), blender::geometry::propagate_edge_attributes(), blender::geometry::propagate_vert_attributes(), blender::ed::sculpt_paint::expand::spherical_falloff_create(), blender::io::obj::OBJMesh::store_normal_coords_and_indices(), blender::ed::sculpt_paint::boundary::twist_data_init_grids(), and blender::ed::sculpt_paint::boundary::twist_data_init_mesh().
|
inline |
Fill the destination span by gathering indexed values from the src array.
Definition at line 131 of file BLI_array_utils.hh.
References BLI_assert, and blender::MutableSpan< T >::size().
|
inline |
Fill the destination span by gathering indexed values from the src array.
Definition at line 149 of file BLI_array_utils.hh.
References BLI_assert, and blender::MutableSpan< T >::size().
|
inline |
Fill the destination span by gathering indexed values from the src array.
Definition at line 116 of file BLI_array_utils.hh.
References BLI_assert, and blender::MutableSpan< T >::size().
|
inline |
Fill the destination span by gathering indexed values from the src array.
Definition at line 166 of file BLI_array_utils.hh.
References BLI_assert, blender::devirtualize_varray(), and blender::MutableSpan< T >::size().
| void blender::array_utils::gather | ( | GSpan | src, |
| const IndexMask & | indices, | ||
| GMutableSpan | dst, | ||
| int64_t | grain_size = 4096 ) |
Fill the destination span by gathering indexed values from the src array.
Definition at line 48 of file array_utils.cc.
References blender::GVArray::ForSpan(), and gather().
|
inline |
Definition at line 182 of file BLI_array_utils.hh.
References blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
|
inline |
Definition at line 194 of file BLI_array_utils.hh.
References blender::VArrayCommon< T >::materialize_compressed(), and blender::MutableSpan< T >::slice().
|
inline |
Definition at line 206 of file BLI_array_utils.hh.
References blender::index_mask::IndexMask::foreach_index(), and blender::MutableSpan< T >::slice().
| bool blender::array_utils::indexed_data_equal | ( | const Span< T > | all_values, |
| const Span< int > | indices, | ||
| const Span< T > | values ) |
Definition at line 299 of file BLI_array_utils.hh.
References indexed_data_equal().
Referenced by blender::ed::sculpt_paint::mask::apply_new_mask_mesh(), blender::ed::sculpt_paint::hide::flush_face_changes_node(), indexed_data_equal(), blender::ed::sculpt_paint::mask::update_mask_mesh(), and blender::ed::sculpt_paint::hide::vert_hide_update().
| bool blender::array_utils::indices_are_range | ( | Span< int > | indices, |
| IndexRange | range ) |
Definition at line 209 of file array_utils.cc.
References indices_are_range().
Referenced by blender::ed::object::apply_eval_grease_pencil_data(), blender::bke::gather_attributes(), and indices_are_range().
| void blender::array_utils::invert_booleans | ( | MutableSpan< bool > | span | ) |
Definition at line 81 of file array_utils.cc.
References blender::MutableSpan< T >::index_range(), and invert_booleans().
Referenced by invert_booleans(), invert_booleans(), and modify_mesh().
| void blender::array_utils::invert_booleans | ( | MutableSpan< bool > | span, |
| const IndexMask & | mask ) |
Definition at line 90 of file array_utils.cc.
References invert_booleans().
|
inline |
Definition at line 87 of file BLI_array_utils.hh.
References BLI_assert, pos, scatter(), blender::MutableSpan< T >::size(), and blender::Span< T >::size().
|
inline |
Fill the specified indices of the destination with the values in the source span.
Definition at line 73 of file BLI_array_utils.hh.
References BLI_assert, blender::threading::parallel_for(), and blender::Span< T >::size().
Referenced by blender::ed::curves::resize_curves(), and scatter().