|
Blender V5.0
|
Classes | |
| class | SimpleMixer |
| class | BooleanPropagationMixer |
| class | SimpleMixerWithAccumulationType |
| class | ColorGeometry4fMixer |
| class | ColorGeometry4bMixer |
| class | float4x4Mixer |
| struct | DefaultMixerStruct |
| struct | DefaultMixerStruct< float > |
| struct | DefaultMixerStruct< float2 > |
| struct | DefaultMixerStruct< float3 > |
| struct | DefaultMixerStruct< ColorGeometry4f > |
| struct | DefaultMixerStruct< ColorGeometry4b > |
| struct | DefaultMixerStruct< float4x4 > |
| struct | DefaultMixerStruct< int > |
| struct | DefaultMixerStruct< short2 > |
| struct | DefaultMixerStruct< int2 > |
| struct | DefaultMixerStruct< bool > |
| struct | DefaultMixerStruct< int8_t > |
| struct | DefaultMixerStruct< math::Quaternion > |
| struct | DefaultPropagationMixerStruct |
| struct | DefaultPropagationMixerStruct< bool > |
Typedefs | |
Mix a dynamic amount of values with weights for many elements. | |
This section provides an abstraction for "mixers". The abstraction encapsulates details about how different types should be mixed. Usually DefaultMixer<T> should be used to get a mixer for a specific type. | |
| template<typename T> | |
| using | DefaultPropagationMixer = typename DefaultPropagationMixerStruct<T>::type |
| template<typename T> | |
| using | DefaultMixer = typename DefaultMixerStruct<T>::type |
Functions | |
| template<typename Func> | |
| void | convert_to_static_type (const CPPType &cpp_type, const Func &func) |
| template<typename Func> | |
| void | convert_to_static_type (const bke::AttrType data_type, const Func &func) |
| template<> | |
| math::Quaternion | mix2 (const float factor, const math::Quaternion &a, const math::Quaternion &b) |
| template<> | |
| math::Quaternion | mix3 (const float3 &weights, const math::Quaternion &v0, const math::Quaternion &v1, const math::Quaternion &v2) |
| template<> | |
| math::Quaternion | mix4 (const float4 &weights, const math::Quaternion &v0, const math::Quaternion &v1, const math::Quaternion &v2, const math::Quaternion &v3) |
| template<> | |
| float4x4 | mix2 (const float factor, const float4x4 &a, const float4x4 &b) |
| template<> | |
| float4x4 | mix3 (const float3 &weights, const float4x4 &v0, const float4x4 &v1, const float4x4 &v2) |
| template<> | |
| float4x4 | mix4 (const float4 &weights, const float4x4 &v0, const float4x4 &v1, const float4x4 &v2, const float4x4 &v3) |
Mix two values of the same type. | |
This is just basic linear interpolation. | |
| template<typename T> | |
| T | mix2 (float factor, const T &a, const T &b) |
| template<> | |
| bool | mix2 (const float factor, const bool &a, const bool &b) |
| template<> | |
| int8_t | mix2 (const float factor, const int8_t &a, const int8_t &b) |
| template<> | |
| int | mix2 (const float factor, const int &a, const int &b) |
| template<> | |
| short2 | mix2 (const float factor, const short2 &a, const short2 &b) |
| template<> | |
| int2 | mix2 (const float factor, const int2 &a, const int2 &b) |
| template<> | |
| float | mix2 (const float factor, const float &a, const float &b) |
| template<> | |
| float2 | mix2 (const float factor, const float2 &a, const float2 &b) |
| template<> | |
| float3 | mix2 (const float factor, const float3 &a, const float3 &b) |
| template<> | |
| ColorGeometry4f | mix2 (const float factor, const ColorGeometry4f &a, const ColorGeometry4f &b) |
| template<> | |
| ColorGeometry4b | mix2 (const float factor, const ColorGeometry4b &a, const ColorGeometry4b &b) |
Mix three values of the same type. | |
This is typically used to interpolate values within a triangle. | |
| template<typename T> | |
| T | mix3 (const float3 &weights, const T &v0, const T &v1, const T &v2) |
| template<> | |
| int8_t | mix3 (const float3 &weights, const int8_t &v0, const int8_t &v1, const int8_t &v2) |
| template<> | |
| bool | mix3 (const float3 &weights, const bool &v0, const bool &v1, const bool &v2) |
| template<> | |
| int | mix3 (const float3 &weights, const int &v0, const int &v1, const int &v2) |
| template<> | |
| short2 | mix3 (const float3 &weights, const short2 &v0, const short2 &v1, const short2 &v2) |
| template<> | |
| int2 | mix3 (const float3 &weights, const int2 &v0, const int2 &v1, const int2 &v2) |
| template<> | |
| float | mix3 (const float3 &weights, const float &v0, const float &v1, const float &v2) |
| template<> | |
| float2 | mix3 (const float3 &weights, const float2 &v0, const float2 &v1, const float2 &v2) |
| template<> | |
| float3 | mix3 (const float3 &weights, const float3 &v0, const float3 &v1, const float3 &v2) |
| template<> | |
| ColorGeometry4f | mix3 (const float3 &weights, const ColorGeometry4f &v0, const ColorGeometry4f &v1, const ColorGeometry4f &v2) |
| template<> | |
| ColorGeometry4b | mix3 (const float3 &weights, const ColorGeometry4b &v0, const ColorGeometry4b &v1, const ColorGeometry4b &v2) |
Mix four values of the same type. | |
| template<typename T> | |
| T | mix4 (const float4 &weights, const T &v0, const T &v1, const T &v2, const T &v3) |
| template<> | |
| int8_t | mix4 (const float4 &weights, const int8_t &v0, const int8_t &v1, const int8_t &v2, const int8_t &v3) |
| template<> | |
| bool | mix4 (const float4 &weights, const bool &v0, const bool &v1, const bool &v2, const bool &v3) |
| template<> | |
| int | mix4 (const float4 &weights, const int &v0, const int &v1, const int &v2, const int &v3) |
| template<> | |
| short2 | mix4 (const float4 &weights, const short2 &v0, const short2 &v1, const short2 &v2, const short2 &v3) |
| template<> | |
| int2 | mix4 (const float4 &weights, const int2 &v0, const int2 &v1, const int2 &v2, const int2 &v3) |
| template<> | |
| float | mix4 (const float4 &weights, const float &v0, const float &v1, const float &v2, const float &v3) |
| template<> | |
| float2 | mix4 (const float4 &weights, const float2 &v0, const float2 &v1, const float2 &v2, const float2 &v3) |
| template<> | |
| float3 | mix4 (const float4 &weights, const float3 &v0, const float3 &v1, const float3 &v2, const float3 &v3) |
| template<> | |
| ColorGeometry4f | mix4 (const float4 &weights, const ColorGeometry4f &v0, const ColorGeometry4f &v1, const ColorGeometry4f &v2, const ColorGeometry4f &v3) |
| template<> | |
| ColorGeometry4b | mix4 (const float4 &weights, const ColorGeometry4b &v0, const ColorGeometry4b &v1, const ColorGeometry4b &v2, const ColorGeometry4b &v3) |
Generic Array Utils Implementations | |
Extra implementations of functions from #BLI_array_utils.hh for all attribute types, used to avoid templating the same logic for each type in many places. | |
| void | gather (GSpan src, Span< int > map, GMutableSpan dst) |
| void | gather (const GVArray &src, Span< int > map, GMutableSpan dst) |
| void | gather_group_to_group (OffsetIndices< int > src_offsets, OffsetIndices< int > dst_offsets, const IndexMask &selection, GSpan src, GMutableSpan dst) |
| void | gather_to_groups (OffsetIndices< int > dst_offsets, const IndexMask &src_selection, GSpan src, GMutableSpan dst) |
| void | gather_ranges_to_groups (Span< IndexRange > src_ranges, OffsetIndices< int > dst_offsets, GSpan src, GMutableSpan dst) |
| using blender::bke::attribute_math::DefaultMixer = typename DefaultMixerStruct<T>::type |
Definition at line 687 of file BKE_attribute_math.hh.
| using blender::bke::attribute_math::DefaultPropagationMixer = typename DefaultPropagationMixerStruct<T>::type |
This mixer is meant for propagating attributes when creating new geometry. A key difference with the default mixer is that booleans are mixed with "or" instead of "at least half" (the default mixing for booleans).
Definition at line 683 of file BKE_attribute_math.hh.
|
inline |
Definition at line 60 of file BKE_attribute_math.hh.
References blender::bke::attribute_type_to_cpp_type(), and convert_to_static_type().
|
inline |
Utility function that simplifies calling a templated function based on a run-time data type.
Definition at line 34 of file BKE_attribute_math.hh.
References BLI_assert_unreachable, float, T, and blender::CPPType::to_static_type_tag().
Referenced by blender::bke::adapt_curve_domain_curve_to_point(), blender::bke::adapt_curve_domain_point_to_curve(), blender::bke::adapt_mesh_domain_corner_to_edge(), blender::bke::adapt_mesh_domain_corner_to_face(), blender::bke::adapt_mesh_domain_corner_to_point(), blender::bke::adapt_mesh_domain_edge_to_corner(), blender::bke::adapt_mesh_domain_edge_to_face(), blender::bke::adapt_mesh_domain_edge_to_point(), blender::bke::adapt_mesh_domain_face_to_corner(), blender::bke::adapt_mesh_domain_face_to_edge(), blender::bke::adapt_mesh_domain_face_to_point(), blender::bke::adapt_mesh_domain_point_to_corner(), blender::bke::adapt_mesh_domain_point_to_edge(), blender::bke::adapt_mesh_domain_point_to_face(), blender::ed::greasepencil::add_single_curve(), blender::ed::greasepencil::apply_eval_grease_pencil_data(), attr_create_generic(), attr_create_generic(), blender::geometry::bezier_generic_to_nurbs(), blender::bke::mesh_surface_sample::BaryWeightSampleFn::call(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::nodes::node_geo_sample_index_cc::SampleIndexFunction::call(), convert_to_static_type(), copy_attributes(), blender::nodes::node_geo_duplicate_elements_cc::copy_curve_attributes_without_id(), blender::bke::copy_curve_domain_attribute_to_mesh(), blender::bke::copy_main_point_domain_attribute_to_mesh(), blender::bke::copy_profile_point_domain_attribute_to_mesh(), blender::bke::copy_with_checked_indices(), blender::nodes::node_geo_extrude_mesh_cc::copy_with_mixing(), blender::nodes::node_geo_extrude_mesh_cc::copy_with_mixing(), blender::geometry::curve_simplify(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::draw::extract_attribute_data(), blender::draw::extract_attribute_data(), blender::draw::extract_attribute_subdiv(), blender::nodes::node_geo_extrude_mesh_cc::extrude_individual_mesh_faces(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_edges(), gather(), gather(), gather_group_to_group(), gather_ranges_to_groups(), gather_to_groups(), blender::geometry::gaussian_blur_1D(), blender::nodes::node_geo_accumulate_field_cc::AccumulateFieldInput::get_varray_for_context(), blender::nodes::node_geo_accumulate_field_cc::TotalFieldInput::get_varray_for_context(), blender::nodes::node_geo_field_average_cc::FieldAverageInput::get_varray_for_context(), blender::nodes::node_geo_field_min_and_max_cc::FieldMinMaxInput::get_varray_for_context(), blender::nodes::node_geo_field_variance_cc::FieldVarianceInput::get_varray_for_context(), blender::draw::init_format_for_attribute(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::nurbs::interpolate_to_evaluated(), blender::geometry::merge_layers(), blender::bke::mesh_flip_faces(), blender::geometry::mix(), blender::geometry::mix_arrays(), blender::geometry::mix_arrays(), blender::nodes::mix_baked_data_item(), blender::geometry::mix_with_indices(), blender::nodes::node_geo_grid_info_cc::node_geo_exec(), blender::geometry::nurbs_to_bezier_assign(), blender::geometry::point_merge_by_distance(), blender::geometry::resample_to_uniform(), blender::ed::greasepencil::resize_single_curve(), blender::bke::CurvesGeometry::reverse_curves(), blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::geometry::sample_curve_attribute(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::bke::mesh_surface_sample::sample_point_attribute(), blender::ed::curves::set_attribute_invoke(), blender::ed::pointcloud::set_attribute_invoke(), blender::geometry::simplify_curve_attribute(), blender::bke::compare_geometry::sort_domain_using_attributes(), blender::geometry::subdivide_attribute_linear(), blender::nodes::node_geo_dual_mesh_cc::transfer_attributes(), blender::geometry::trim_attribute_linear(), blender::geometry::trim_catmull_rom_curves(), blender::ed::sculpt_paint::greasepencil::trim_end_points(), blender::geometry::trim_evaluated_curves(), blender::draw::pbvh::update_generic_attribute_bmesh(), blender::draw::pbvh::update_generic_attribute_mesh(), and blender::draw::vertbuf_data_extract_direct().
| void blender::bke::attribute_math::gather | ( | const GVArray & | src, |
| Span< int > | map, | ||
| GMutableSpan | dst ) |
Definition at line 267 of file attribute_math.cc.
References convert_to_static_type(), and blender::GVArrayCommon::type().
| void blender::bke::attribute_math::gather | ( | GSpan | src, |
| Span< int > | map, | ||
| GMutableSpan | dst ) |
Definition at line 259 of file attribute_math.cc.
References convert_to_static_type(), and blender::GSpan::type().
Referenced by blender::nodes::node_geo_duplicate_elements_cc::copy_edge_attributes_without_id(), blender::nodes::node_geo_duplicate_elements_cc::copy_face_attributes_without_id(), blender::geometry::create_curve_from_vert_indices(), blender::ed::curves::duplicate_points(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::bke::gather_attributes(), blender::bke::gather_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::bke::mesh_apply_spatial_organization(), blender::geometry::mesh_faces_to_curves_convert(), blender::geometry::mesh_triangulate(), blender::geometry::propagate_edge_attributes(), blender::geometry::propagate_vert_attributes(), blender::geometry::reorder_attribute_domain(), reorder_attribute_domain(), and blender::nodes::node_geo_dual_mesh_cc::transfer_attributes().
| void blender::bke::attribute_math::gather_group_to_group | ( | OffsetIndices< int > | src_offsets, |
| OffsetIndices< int > | dst_offsets, | ||
| const IndexMask & | selection, | ||
| GSpan | src, | ||
| GMutableSpan | dst ) |
Definition at line 275 of file attribute_math.cc.
References convert_to_static_type(), and blender::GSpan::type().
Referenced by blender::ed::curves::duplicate_curves(), blender::bke::gather_attributes_group_to_group(), and blender::geometry::mesh_triangulate().
| void blender::bke::attribute_math::gather_ranges_to_groups | ( | Span< IndexRange > | src_ranges, |
| OffsetIndices< int > | dst_offsets, | ||
| GSpan | src, | ||
| GMutableSpan | dst ) |
Definition at line 288 of file attribute_math.cc.
References convert_to_static_type(), and blender::GSpan::type().
Referenced by blender::ed::curves::copy_data_to_geometry(), and blender::ed::curves::duplicate_points().
| void blender::bke::attribute_math::gather_to_groups | ( | OffsetIndices< int > | dst_offsets, |
| const IndexMask & | src_selection, | ||
| GSpan | src, | ||
| GMutableSpan | dst ) |
Definition at line 306 of file attribute_math.cc.
References convert_to_static_type(), gather_to_groups(), and blender::GSpan::type().
Referenced by blender::nodes::node_geo_duplicate_elements_cc::copy_curve_attributes_without_id(), blender::nodes::node_geo_duplicate_elements_cc::copy_edge_attributes_without_id(), blender::nodes::node_geo_duplicate_elements_cc::copy_face_attributes_without_id(), blender::geometry::duplicate_fillet_point_data(), blender::bke::gather_attributes_to_groups(), and gather_to_groups().
|
inline |
Definition at line 74 of file BKE_attribute_math.hh.
References b.
|
inline |
Definition at line 121 of file BKE_attribute_math.hh.
References b, and blender::math::interpolate().
|
inline |
Definition at line 115 of file BKE_attribute_math.hh.
References b, and blender::math::interpolate().
|
inline |
Definition at line 99 of file BKE_attribute_math.hh.
References b.
|
inline |
Definition at line 104 of file BKE_attribute_math.hh.
References b, and blender::math::interpolate().
|
inline |
Definition at line 109 of file BKE_attribute_math.hh.
References b, and blender::math::interpolate().
| float4x4 blender::bke::attribute_math::mix2 | ( | const float | factor, |
| const float4x4 & | a, | ||
| const float4x4 & | b ) |
Definition at line 41 of file attribute_math.cc.
References b, and blender::math::interpolate().
|
inline |
Definition at line 84 of file BKE_attribute_math.hh.
References b.
|
inline |
Definition at line 94 of file BKE_attribute_math.hh.
References b, and blender::math::interpolate().
|
inline |
Definition at line 79 of file BKE_attribute_math.hh.
References b.
| math::Quaternion blender::bke::attribute_math::mix2 | ( | const float | factor, |
| const math::Quaternion & | a, | ||
| const math::Quaternion & | b ) |
Definition at line 15 of file attribute_math.cc.
References b, and blender::math::interpolate().
|
inline |
Definition at line 89 of file BKE_attribute_math.hh.
References b, and blender::math::interpolate().
| T blender::bke::attribute_math::mix2 | ( | float | factor, |
| const T & | a, | ||
| const T & | b ) |
Referenced by blender::geometry::calc_straight_curve_positions(), blender::generate_curves(), blender::bke::curves::bezier::linear_interpolation(), blender::ed::sculpt_paint::greasepencil::linear_interpolation(), blender::geometry::linear_interpolation(), blender::nodes::mix_baked_data_item(), and blender::geometry::sample_interval_linear().
|
inline |
Definition at line 142 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 193 of file BKE_attribute_math.hh.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r, and v2.
|
inline |
Definition at line 182 of file BKE_attribute_math.hh.
References interp_v4_v4v4v4(), result, and v2.
|
inline |
Definition at line 164 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 170 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 176 of file BKE_attribute_math.hh.
References v2.
| float4x4 blender::bke::attribute_math::mix3 | ( | const float3 & | weights, |
| const float4x4 & | v0, | ||
| const float4x4 & | v1, | ||
| const float4x4 & | v2 ) |
Definition at line 47 of file attribute_math.cc.
References blender::math::from_loc_rot_scale(), blender::MatBase< T, NumCol, NumRow, Alignment >::location(), mix3(), blender::math::normalize(), blender::math::normalized_to_quaternion_safe(), blender::math::to_scale(), and v2.
|
inline |
Definition at line 147 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 158 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 137 of file BKE_attribute_math.hh.
References v2.
| math::Quaternion blender::bke::attribute_math::mix3 | ( | const float3 & | weights, |
| const math::Quaternion & | v0, | ||
| const math::Quaternion & | v1, | ||
| const math::Quaternion & | v2 ) |
Definition at line 21 of file attribute_math.cc.
References blender::math::QuaternionBase< T >::expmap(), blender::math::QuaternionBase< float >::expmap(), mix3(), and v2.
|
inline |
Definition at line 153 of file BKE_attribute_math.hh.
References v2.
| T blender::bke::attribute_math::mix3 | ( | const float3 & | weights, |
| const T & | v0, | ||
| const T & | v1, | ||
| const T & | v2 ) |
Referenced by blender::geometry::add_curves_on_mesh(), mix3(), mix3(), blender::bke::mesh_surface_sample::sample_corner_attribute_with_bary_coords(), blender::bke::mesh_surface_sample::sample_corner_attribute_with_bary_coords(), blender::bke::mesh_surface_sample::sample_point_attribute(), blender::bke::mesh_surface_sample::sample_point_normals(), and blender::bke::mesh_surface_sample::sample_surface_points_spherical().
|
inline |
Definition at line 224 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 286 of file BKE_attribute_math.hh.
References interp_v4_v4v4v4v4(), blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r, and v2.
|
inline |
Definition at line 274 of file BKE_attribute_math.hh.
References interp_v4_v4v4v4v4(), result, and v2.
|
inline |
Definition at line 253 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 260 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 267 of file BKE_attribute_math.hh.
References v2.
| float4x4 blender::bke::attribute_math::mix4 | ( | const float4 & | weights, |
| const float4x4 & | v0, | ||
| const float4x4 & | v1, | ||
| const float4x4 & | v2, | ||
| const float4x4 & | v3 ) |
Definition at line 60 of file attribute_math.cc.
References blender::math::from_loc_rot_scale(), blender::MatBase< T, NumCol, NumRow, Alignment >::location(), mix4(), blender::math::to_quaternion(), blender::math::to_scale(), and v2.
|
inline |
Definition at line 231 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 245 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 217 of file BKE_attribute_math.hh.
References v2.
| math::Quaternion blender::bke::attribute_math::mix4 | ( | const float4 & | weights, |
| const math::Quaternion & | v0, | ||
| const math::Quaternion & | v1, | ||
| const math::Quaternion & | v2, | ||
| const math::Quaternion & | v3 ) |
Definition at line 31 of file attribute_math.cc.
References blender::math::QuaternionBase< T >::expmap(), blender::math::QuaternionBase< float >::expmap(), mix4(), and v2.
|
inline |
Definition at line 237 of file BKE_attribute_math.hh.
References v2.
| T blender::bke::attribute_math::mix4 | ( | const float4 & | weights, |
| const T & | v0, | ||
| const T & | v1, | ||
| const T & | v2, | ||
| const T & | v3 ) |