|
Blender V4.3
|
Classes | |
| class | BooleanPropagationMixer |
| class | ColorGeometry4bMixer |
| class | ColorGeometry4fMixer |
| struct | DefaultMixerStruct |
| struct | DefaultMixerStruct< bool > |
| struct | DefaultMixerStruct< ColorGeometry4b > |
| struct | DefaultMixerStruct< ColorGeometry4f > |
| struct | DefaultMixerStruct< float > |
| struct | DefaultMixerStruct< float2 > |
| struct | DefaultMixerStruct< float3 > |
| struct | DefaultMixerStruct< float4x4 > |
| struct | DefaultMixerStruct< int > |
| struct | DefaultMixerStruct< int2 > |
| struct | DefaultMixerStruct< int8_t > |
| struct | DefaultMixerStruct< math::Quaternion > |
| struct | DefaultPropagationMixerStruct |
| struct | DefaultPropagationMixerStruct< bool > |
| class | float4x4Mixer |
| class | SimpleMixer |
| class | SimpleMixerWithAccumulationType |
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 eCustomDataType 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<> | |
| 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<> | |
| 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<> | |
| 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) |
| using blender::bke::attribute_math::DefaultMixer = typename DefaultMixerStruct<T>::type |
Definition at line 649 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 645 of file BKE_attribute_math.hh.
|
inline |
Utility function that simplifies calling a templated function based on a run-time data type.
Definition at line 27 of file BKE_attribute_math.hh.
References BLI_assert_unreachable, float, int, T, and blender::CPPType::to_static_type_tag().
Referenced by blender::draw::overlay::add_values_to_text_cache(), 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::bke::copy_with_checked_indices(), blender::nodes::node_geo_extrude_mesh_cc::copy_with_mixing(), blender::ed::sculpt_paint::greasepencil::create_blank_curve(), blender::draw::pbvh::fill_vbo_attribute_bmesh(), blender::draw::pbvh::fill_vbo_attribute_mesh(), blender::draw::pbvh::fill_vbos_grids(), gather(), gather(), gather_group_to_group(), gather_to_groups(), blender::nodes::node_geo_accumulate_field_cc::AccumulateFieldInput::get_varray_for_context(), blender::draw::init_format_for_attribute(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::geometry::merge_layers(), blender::bke::mesh_flip_faces(), blender::geometry::mix_arrays(), blender::nodes::mix_baked_data_item(), blender::geometry::nurbs_to_bezier_assign(), blender::draw::pbvh::pbvh_attr_supported(), blender::geometry::point_merge_by_distance(), blender::geometry::resample_to_uniform(), 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::nodes::node_geo_dual_mesh_cc::transfer_attributes(), blender::geometry::trim_attribute_linear(), and blender::draw::vertbuf_data_extract_direct().
|
inline |
Definition at line 52 of file BKE_attribute_math.hh.
References convert_to_static_type(), and blender::bke::custom_data_type_to_cpp_type().
| void blender::bke::attribute_math::gather | ( | const GVArray & | src, |
| Span< int > | map, | ||
| GMutableSpan | dst ) |
Definition at line 262 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 254 of file attribute_math.cc.
References convert_to_static_type(), and blender::GSpan::type().
Referenced by blender::geometry::create_curve_from_vert_indices(), blender::ed::curves::duplicate_points(), blender::geometry::propagate_edge_attributes(), blender::geometry::propagate_vert_attributes(), 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 270 of file attribute_math.cc.
References convert_to_static_type(), and blender::GSpan::type().
Referenced by blender::ed::curves::duplicate_curves().
| void blender::bke::attribute_math::gather_to_groups | ( | OffsetIndices< int > | dst_offsets, |
| const IndexMask & | src_selection, | ||
| GSpan | src, | ||
| GMutableSpan | dst ) |
Definition at line 283 of file attribute_math.cc.
References convert_to_static_type(), and blender::GSpan::type().
Referenced by blender::geometry::duplicate_fillet_point_data().
|
inline |
Definition at line 66 of file BKE_attribute_math.hh.
References b.
|
inline |
Definition at line 108 of file BKE_attribute_math.hh.
References b, and blender::math::interpolate().
|
inline |
Definition at line 102 of file BKE_attribute_math.hh.
References b, and blender::math::interpolate().
|
inline |
Definition at line 86 of file BKE_attribute_math.hh.
References b.
|
inline |
Definition at line 91 of file BKE_attribute_math.hh.
References b, and blender::math::interpolate().
|
inline |
Definition at line 96 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 76 of file BKE_attribute_math.hh.
|
inline |
Definition at line 81 of file BKE_attribute_math.hh.
References b, and blender::math::interpolate().
|
inline |
Definition at line 71 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().
| T blender::bke::attribute_math::mix2 | ( | float | factor, |
| const T & | a, | ||
| const T & | b ) |
Referenced by blender::geometry::calc_straight_curve_positions(), 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 129 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 174 of file BKE_attribute_math.hh.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r, and v2.
|
inline |
Definition at line 163 of file BKE_attribute_math.hh.
References interp_v4_v4v4v4(), result, and v2.
|
inline |
Definition at line 145 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 151 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 157 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 134 of file BKE_attribute_math.hh.
|
inline |
Definition at line 139 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 124 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< T >::expmap(), mix3(), and v2.
| T blender::bke::attribute_math::mix3 | ( | const float3 & | weights, |
| const T & | v0, | ||
| const T & | v1, | ||
| const T & | v2 ) |
Referenced by 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 205 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 259 of file BKE_attribute_math.hh.
References interp_v4_v4v4v4v4(), blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r, and v2.
|
inline |
Definition at line 247 of file BKE_attribute_math.hh.
References interp_v4_v4v4v4v4(), result, and v2.
|
inline |
Definition at line 226 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 233 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 240 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 212 of file BKE_attribute_math.hh.
|
inline |
Definition at line 218 of file BKE_attribute_math.hh.
References v2.
|
inline |
Definition at line 198 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< T >::expmap(), mix4(), and v2.