|
Blender V5.3
|
Namespaces | |
| namespace | detail |
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< float4 > |
| 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 > |
Functions | |
| template<typename Fn> | |
| void | to_static_type (const CPPType &cpp_type, Fn &&fn) |
| template<typename Fn> | |
| void | to_static_type (const bke::AttrType data_type, Fn &&fn) |
| 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) |
| template<typename T> | |
| void | mix_groups (const Span< T > src, const OffsetIndices< int > groups, const Span< int > all_indices, const IndexMask &dst_mask, MutableSpan< T > dst) |
| template<typename T> | |
| void | mix_groups (const Span< T > src, const OffsetIndices< int > groups, const Span< int > all_indices, const Span< float > all_weights, const IndexMask &dst_mask, MutableSpan< T > dst) |
| template<typename T> | |
| void | shift_left (MutableSpan< T > data, int src_begin, int src_end, int dst_begin) |
| template<typename T> | |
| void | shift_right (MutableSpan< T > data, int src_begin, int src_end, int dst_end) |
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<> | |
| float4 | mix2 (const float factor, const float4 &a, const float4 &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<> | |
| float4 | mix3 (const float3 &weights, const float4 &v0, const float4 &v1, const float4 &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<> | |
| float4 | mix4 (const float4 &weights, const float4 &v0, const float4 &v1, const float4 &v2, const float4 &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 | shift_left (GMutableSpan data, int src_begin, int src_end, int dst_begin) |
| void | shift_right (GMutableSpan data, int src_begin, int src_end, int dst_begin) |
| void | gather (GSpan src, Span< int > map, GMutableSpan dst) |
| void | gather (const GVArray &src, Span< int > map, GMutableSpan dst) |
| void | gather (GSpan src, Span< int > map, const IndexMask &dst_mask, GMutableSpan dst) |
| void | gather (const GVArray &src, Span< int > map, const IndexMask &dst_mask, 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) |
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 |
| template<typename T> | |
| T | mix_indices (const Span< T > src, const Span< int > indices) |
| template<typename T, typename ToAccumFn, typename ToFinalFn> | |
| T | mix_indices (const Span< T > src, const Span< int > indices, const ToAccumFn &to_accum_fn, const ToFinalFn &to_final_fn) |
| bool | mix_indices (const Span< bool > src, const Span< int > indices) |
| int | mix_indices (const Span< int > src, const Span< int > indices) |
| int2 | mix_indices (const Span< int2 > src, const Span< int > indices) |
| int8_t | mix_indices (const Span< int8_t > src, const Span< int > indices) |
| short2 | mix_indices (const Span< short2 > src, const Span< int > indices) |
| math::Quaternion | mix_indices (const Span< math::Quaternion > src, const Span< int > indices) |
| ColorGeometry4b | mix_indices (const Span< ColorGeometry4b > src, const Span< int > indices) |
| ColorGeometry4f | mix_indices (const Span< ColorGeometry4f > src, const Span< int > indices) |
| float4x4 | mix_indices (Span< float4x4 > src, Span< int > indices) |
| template<typename T> | |
| T | mix_indices (const Span< T > src, const Span< int > indices, const Span< float > weights) |
| template<typename T, typename ToAccumFn, typename ToFinalFn> | |
| T | mix_indices (const Span< T > src, const Span< int > indices, const Span< float > weights, const ToAccumFn &to_accum_fn, const ToFinalFn &to_final_fn) |
| bool | mix_indices (const Span< bool > src, const Span< int > indices, const Span< float > weights) |
| int | mix_indices (const Span< int > src, const Span< int > indices, const Span< float > weights) |
| int2 | mix_indices (const Span< int2 > src, const Span< int > indices, const Span< float > weights) |
| int8_t | mix_indices (const Span< int8_t > src, const Span< int > indices, const Span< float > weights) |
| short2 | mix_indices (const Span< short2 > src, const Span< int > indices, const Span< float > weights) |
| math::Quaternion | mix_indices (const Span< math::Quaternion > src, const Span< int > indices, const Span< float > weights) |
| ColorGeometry4b | mix_indices (const Span< ColorGeometry4b > src, const Span< int > indices, const Span< float > weights) |
| ColorGeometry4f | mix_indices (const Span< ColorGeometry4f > src, const Span< int > indices, const Span< float > weights) |
| float4x4 | mix_indices (Span< float4x4 > src, Span< int > indices, Span< float > weights) |
| void | mix_groups (GSpan src, OffsetIndices< int > groups, Span< int > all_indices, std::optional< Span< float > > all_weights, GMutableSpan dst) |
| void | mix_groups (GSpan src, OffsetIndices< int > groups, Span< int > all_indices, std::optional< Span< float > > all_weights, const IndexMask &dst_mask, GMutableSpan dst) |
| void | mix_groups (GSpan src, OffsetIndices< int > groups, Span< int > all_indices, GMutableSpan dst) |
| void | mix_groups (GSpan src, GroupedSpan< int > indices, GMutableSpan dst) |
| using blender::bke::attribute_math::DefaultMixer = typename DefaultMixerStruct<T>::type |
Definition at line 888 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 884 of file BKE_attribute_math.hh.
| void blender::bke::attribute_math::gather | ( | const GVArray & | src, |
| Span< int > | map, | ||
| const IndexMask & | dst_mask, | ||
| GMutableSpan | dst ) |
Definition at line 438 of file attribute_math.cc.
References gather(), T, to_static_type(), and blender::GVArrayCommon::type().
| void blender::bke::attribute_math::gather | ( | const GVArray & | src, |
| Span< int > | map, | ||
| GMutableSpan | dst ) |
Definition at line 428 of file attribute_math.cc.
References gather(), blender::IndexRange::IndexRange(), and blender::GMutableSpan::size().
| void blender::bke::attribute_math::gather | ( | GSpan | src, |
| Span< int > | map, | ||
| const IndexMask & | dst_mask, | ||
| GMutableSpan | dst ) |
Definition at line 433 of file attribute_math.cc.
References blender::GVArray::from_span(), and gather().
| void blender::bke::attribute_math::gather | ( | GSpan | src, |
| Span< int > | map, | ||
| GMutableSpan | dst ) |
Definition at line 423 of file attribute_math.cc.
References blender::GVArray::from_span(), gather(), blender::IndexRange::IndexRange(), and blender::GMutableSpan::size().
Referenced by blender::ed::greasepencil::apply_eval_grease_pencil_data(), blender::geometry::construct::build_output_mesh(), blender::bke::SampleIndexFunction::call(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::copy_and_mix_attributes(), 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_edges(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), gather(), gather(), gather(), gather(), 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::EvaluateAtIndexInput::get_varray_for_context(), 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(), blender::reorder_attribute_domain(), blender::nodes::node_geo_dual_mesh_cc::transfer_attributes(), and blender::nodes::node_geo_transfer_attributes_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 445 of file attribute_math.cc.
References gather_group_to_group(), T, to_static_type(), and blender::GSpan::type().
Referenced by blender::geometry::construct::build_output_mesh(), blender::ed::curves::duplicate_curves(), blender::bke::gather_attributes_group_to_group(), gather_group_to_group(), blender::geometry::mesh_triangulate(), and blender::bke::remove_invalid_faces().
| void blender::bke::attribute_math::gather_ranges_to_groups | ( | Span< IndexRange > | src_ranges, |
| OffsetIndices< int > | dst_offsets, | ||
| GSpan | src, | ||
| GMutableSpan | dst ) |
Definition at line 457 of file attribute_math.cc.
References gather_ranges_to_groups(), T, to_static_type(), and blender::GSpan::type().
Referenced by blender::ed::curves::copy_data_to_geometry(), blender::ed::curves::duplicate_points(), and gather_ranges_to_groups().
| void blender::bke::attribute_math::gather_to_groups | ( | OffsetIndices< int > | dst_offsets, |
| const IndexMask & | src_selection, | ||
| GSpan | src, | ||
| GMutableSpan | dst ) |
Definition at line 474 of file attribute_math.cc.
References gather_to_groups(), T, to_static_type(), and blender::GSpan::type().
Referenced by blender::bke::adapt_curve_domain_curve_to_point(), blender::bke::adapt_mesh_domain_face_to_corner(), blender::nodes::node_geo_duplicate_elements_cc::copy_attributes_from_other_domains(), 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::nodes::node_geo_duplicate_elements_cc::duplicate_faces(), blender::geometry::duplicate_fillet_point_data(), blender::nodes::node_geo_extrude_mesh_cc::extrude_individual_mesh_faces(), blender::bke::gather_attributes_to_groups(), and gather_to_groups().
|
inline |
Definition at line 66 of file BKE_attribute_math.hh.
|
inline |
Definition at line 118 of file BKE_attribute_math.hh.
References b, blender::math::interpolate(), and mix2().
|
inline |
Definition at line 112 of file BKE_attribute_math.hh.
References b, blender::math::interpolate(), and mix2().
|
inline |
Definition at line 91 of file BKE_attribute_math.hh.
|
inline |
Definition at line 96 of file BKE_attribute_math.hh.
References b, blender::math::interpolate(), and mix2().
|
inline |
Definition at line 101 of file BKE_attribute_math.hh.
References b, blender::math::interpolate(), and mix2().
|
inline |
Definition at line 106 of file BKE_attribute_math.hh.
References b, blender::math::interpolate(), and mix2().
| float4x4 blender::bke::attribute_math::mix2 | ( | const float | factor, |
| const float4x4 & | a, | ||
| const float4x4 & | b ) |
Definition at line 49 of file attribute_math.cc.
References b, blender::math::interpolate(), and mix2().
|
inline |
Definition at line 76 of file BKE_attribute_math.hh.
|
inline |
Definition at line 86 of file BKE_attribute_math.hh.
References b, blender::math::interpolate(), and mix2().
|
inline |
Definition at line 71 of file BKE_attribute_math.hh.
| math::Quaternion blender::bke::attribute_math::mix2 | ( | const float | factor, |
| const math::Quaternion & | a, | ||
| const math::Quaternion & | b ) |
Definition at line 23 of file attribute_math.cc.
References b, blender::math::interpolate(), and mix2().
|
inline |
Definition at line 81 of file BKE_attribute_math.hh.
References b, blender::math::interpolate(), and mix2().
| 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::subdiv::interpolate_corner_data_for_subdivided_irregular_face(), blender::bke::subdiv::interpolate_vert_data_for_subdivided_irregular_face(), blender::bke::curves::bezier::linear_interpolation(), blender::ed::sculpt_paint::greasepencil::linear_interpolation(), blender::geometry::linear_interpolation(), blender::bke::subdiv::loop_interpolation_from_corner(), mix2(), mix2(), mix2(), mix2(), mix2(), mix2(), mix2(), mix2(), mix2(), mix2(), mix2(), mix2(), mix2(), mix2(), blender::bke::subdiv::mix_attrs(), and blender::geometry::sample_interval_linear().
|
inline |
Definition at line 139 of file BKE_attribute_math.hh.
References mix3(), and blender::v2.
|
inline |
Definition at line 196 of file BKE_attribute_math.hh.
References mix3(), blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r, and blender::v2.
|
inline |
Definition at line 185 of file BKE_attribute_math.hh.
References blender::interp_v4_v4v4v4(), mix3(), blender::result, and blender::v2.
|
inline |
Definition at line 161 of file BKE_attribute_math.hh.
References mix3(), and blender::v2.
|
inline |
Definition at line 167 of file BKE_attribute_math.hh.
References mix3(), and blender::v2.
|
inline |
Definition at line 173 of file BKE_attribute_math.hh.
References mix3(), and blender::v2.
|
inline |
Definition at line 179 of file BKE_attribute_math.hh.
References mix3(), and blender::v2.
| float4x4 blender::bke::attribute_math::mix3 | ( | const float3 & | weights, |
| const float4x4 & | v0, | ||
| const float4x4 & | v1, | ||
| const float4x4 & | v2 ) |
Definition at line 55 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(), scale(), blender::math::to_scale(), and blender::v2.
|
inline |
Definition at line 144 of file BKE_attribute_math.hh.
References mix3(), and blender::v2.
|
inline |
Definition at line 155 of file BKE_attribute_math.hh.
References mix3(), and blender::v2.
|
inline |
Definition at line 134 of file BKE_attribute_math.hh.
References mix3(), and blender::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 29 of file attribute_math.cc.
References blender::math::QuaternionBase< T >::expmap(), blender::math::QuaternionBase< float >::expmap(), mix3(), and blender::v2.
|
inline |
Definition at line 150 of file BKE_attribute_math.hh.
References mix3(), and blender::v2.
| T blender::bke::attribute_math::mix3 | ( | const float3 & | weights, |
| const T & | v0, | ||
| const T & | v1, | ||
| const T & | v2 ) |
References mix3(), T, and blender::v2.
Referenced by blender::geometry::add_curves_on_mesh(), mix3(), mix3(), mix3(), mix3(), mix3(), mix3(), mix3(), mix3(), mix3(), mix3(), mix3(), mix3(), 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 227 of file BKE_attribute_math.hh.
References mix4(), and blender::v2.
|
inline |
Definition at line 296 of file BKE_attribute_math.hh.
References blender::interp_v4_v4v4v4v4(), mix4(), blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r, and blender::v2.
|
inline |
Definition at line 284 of file BKE_attribute_math.hh.
References blender::interp_v4_v4v4v4v4(), mix4(), blender::result, and blender::v2.
|
inline |
Definition at line 256 of file BKE_attribute_math.hh.
References mix4(), and blender::v2.
|
inline |
Definition at line 263 of file BKE_attribute_math.hh.
References mix4(), and blender::v2.
|
inline |
Definition at line 270 of file BKE_attribute_math.hh.
References mix4(), and blender::v2.
|
inline |
Definition at line 277 of file BKE_attribute_math.hh.
References mix4(), and blender::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 68 of file attribute_math.cc.
References blender::math::from_loc_rot_scale(), blender::MatBase< T, NumCol, NumRow, Alignment >::location(), mix4(), scale(), blender::math::to_quaternion(), blender::math::to_scale(), and blender::v2.
|
inline |
Definition at line 234 of file BKE_attribute_math.hh.
References mix4(), and blender::v2.
|
inline |
Definition at line 248 of file BKE_attribute_math.hh.
References mix4(), and blender::v2.
|
inline |
Definition at line 220 of file BKE_attribute_math.hh.
References mix4(), and blender::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 39 of file attribute_math.cc.
References blender::math::QuaternionBase< T >::expmap(), blender::math::QuaternionBase< float >::expmap(), mix4(), and blender::v2.
|
inline |
Definition at line 240 of file BKE_attribute_math.hh.
References mix4(), and blender::v2.
| T blender::bke::attribute_math::mix4 | ( | const float4 & | weights, |
| const T & | v0, | ||
| const T & | v1, | ||
| const T & | v2, | ||
| const T & | v3 ) |
References mix4(), T, and blender::v2.
Referenced by blender::bke::curves::catmull_rom::interpolate(), blender::bke::subdiv::mesh_interpolate_position_on_edge(), mix4(), mix4(), mix4(), mix4(), mix4(), mix4(), mix4(), mix4(), mix4(), mix4(), mix4(), mix4(), mix4(), mix4(), blender::bke::subdiv::mix_attrs(), blender::geometry::sample_catmull_rom_curve_positions_handles(), and blender::bke::subdiv::subdiv_interpolate_corner_data().
| void blender::bke::attribute_math::mix_groups | ( | const Span< T > | src, |
| const OffsetIndices< int > | groups, | ||
| const Span< int > | all_indices, | ||
| const IndexMask & | dst_mask, | ||
| MutableSpan< T > | dst ) |
Definition at line 291 of file attribute_math.cc.
References blender::Default, blender::index_mask::IndexMask::foreach_index(), mix_groups(), mix_indices(), PRF_scope_with_name, and blender::Span< T >::slice().
| void blender::bke::attribute_math::mix_groups | ( | const Span< T > | src, |
| const OffsetIndices< int > | groups, | ||
| const Span< int > | all_indices, | ||
| const Span< float > | all_weights, | ||
| const IndexMask & | dst_mask, | ||
| MutableSpan< T > | dst ) |
Definition at line 328 of file attribute_math.cc.
References blender::Default, blender::index_mask::IndexMask::foreach_index(), mix_groups(), mix_indices(), PRF_scope_with_name, and blender::Span< T >::slice().
|
inline |
Definition at line 912 of file BKE_attribute_math.hh.
References blender::offset_indices::GroupedSpan< T >::data, mix_groups(), and blender::offset_indices::GroupedSpan< T >::offsets.
|
inline |
Definition at line 905 of file BKE_attribute_math.hh.
References mix_groups().
| void blender::bke::attribute_math::mix_groups | ( | GSpan | src, |
| OffsetIndices< int > | groups, | ||
| Span< int > | all_indices, | ||
| std::optional< Span< float > > | all_weights, | ||
| const IndexMask & | dst_mask, | ||
| GMutableSpan | dst ) |
Mix the source values of each group into the corresponding index in the destination mask.
| groups | Groups of source indices and weights for every index in #dst_mask. |
Definition at line 352 of file attribute_math.cc.
References blender::BLI_assert(), mix_groups(), blender::index_mask::IndexMask::size(), blender::offset_indices::OffsetIndices< T >::size(), blender::Span< T >::size(), T, to_static_type(), blender::offset_indices::OffsetIndices< T >::total_size(), and blender::GSpan::type().
| void blender::bke::attribute_math::mix_groups | ( | GSpan | src, |
| OffsetIndices< int > | groups, | ||
| Span< int > | all_indices, | ||
| std::optional< Span< float > > | all_weights, | ||
| GMutableSpan | dst ) |
Definition at line 342 of file attribute_math.cc.
References blender::BLI_assert(), blender::IndexMask::IndexMask(), mix_groups(), blender::GMutableSpan::size(), and blender::offset_indices::OffsetIndices< T >::size().
Referenced by blender::geometry::add_curves_on_mesh(), blender::geometry::copy_and_mix_attributes(), blender::nodes::node_geo_extrude_mesh_cc::extrude_individual_mesh_faces(), blender::geometry::construct::interpolate_new_corner_attribute_from_faces(), blender::geometry::merge_layers(), blender::geometry::merge_points(), mix_groups(), mix_groups(), mix_groups(), mix_groups(), mix_groups(), mix_groups(), and blender::nodes::node_geo_extrude_mesh_cc::mix_groups_or_default().
|
inline |
Definition at line 406 of file BKE_attribute_math.hh.
References mix_indices().
|
inline |
Definition at line 478 of file BKE_attribute_math.hh.
References blender::Span< T >::index_range(), and mix_indices().
|
inline |
Definition at line 436 of file BKE_attribute_math.hh.
References blender::bke::attribute_math::detail::byte_color_to_float4(), blender::bke::attribute_math::detail::float4_to_byte_color(), and mix_indices().
|
inline |
Definition at line 519 of file BKE_attribute_math.hh.
References blender::bke::attribute_math::detail::byte_color_to_float4(), blender::bke::attribute_math::detail::float4_to_byte_color(), and mix_indices().
|
inline |
Definition at line 441 of file BKE_attribute_math.hh.
References blender::Span< T >::cast(), and mix_indices().
|
inline |
Definition at line 527 of file BKE_attribute_math.hh.
References blender::Span< T >::cast(), and mix_indices().
|
inline |
Definition at line 411 of file BKE_attribute_math.hh.
References blender::bke::attribute_math::detail::double_to_int(), blender::bke::attribute_math::detail::int_to_double(), and mix_indices().
|
inline |
Definition at line 488 of file BKE_attribute_math.hh.
References blender::bke::attribute_math::detail::double_to_int(), blender::bke::attribute_math::detail::int_to_double(), and mix_indices().
|
inline |
Definition at line 416 of file BKE_attribute_math.hh.
References blender::bke::attribute_math::detail::double2_to_int2(), blender::bke::attribute_math::detail::int2_to_double2(), and mix_indices().
|
inline |
Definition at line 493 of file BKE_attribute_math.hh.
References blender::bke::attribute_math::detail::double2_to_int2(), blender::bke::attribute_math::detail::int2_to_double2(), and mix_indices().
|
inline |
Definition at line 421 of file BKE_attribute_math.hh.
References blender::bke::attribute_math::detail::float_to_int8_t(), blender::bke::attribute_math::detail::int8_t_to_float(), and mix_indices().
|
inline |
Definition at line 498 of file BKE_attribute_math.hh.
References blender::bke::attribute_math::detail::float_to_int8_t(), blender::bke::attribute_math::detail::int8_t_to_float(), and mix_indices().
|
inline |
Definition at line 431 of file BKE_attribute_math.hh.
References blender::bke::attribute_math::detail::expmap_to_quat(), mix_indices(), and blender::bke::attribute_math::detail::quat_to_expmap().
|
inline |
Definition at line 512 of file BKE_attribute_math.hh.
References blender::bke::attribute_math::detail::expmap_to_quat(), mix_indices(), and blender::bke::attribute_math::detail::quat_to_expmap().
|
inline |
Definition at line 426 of file BKE_attribute_math.hh.
References blender::bke::attribute_math::detail::float2_to_short2(), mix_indices(), and blender::bke::attribute_math::detail::short2_to_float2().
|
inline |
Definition at line 505 of file BKE_attribute_math.hh.
References blender::bke::attribute_math::detail::float2_to_short2(), mix_indices(), and blender::bke::attribute_math::detail::short2_to_float2().
|
inline |
Definition at line 380 of file BKE_attribute_math.hh.
References mix_indices(), blender::math::rcp(), blender::Span< T >::size(), and T.
Referenced by blender::ed::sculpt_paint::smooth::calc_relaxed_translations_faces(), blender::bke::subdiv::interpolate_corner_data_for_subdivided_irregular_face(), blender::bke::subdiv::interpolate_vert_data_for_subdivided_irregular_face(), blender::bke::subdiv::loop_interpolation_from_face(), blender::bke::LegacyMeshInterpolator::mix(), blender::bke::subdiv::mix_attrs(), blender::bke::subdiv::mix_attrs(), blender::bke::subdiv::mix_attrs(), mix_groups(), mix_groups(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), mix_indices(), blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh(), and blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh_check_loose().
|
inline |
Definition at line 449 of file BKE_attribute_math.hh.
References blender::Span< T >::index_range(), mix_indices(), blender::math::safe_rcp(), and T.
|
inline |
Definition at line 461 of file BKE_attribute_math.hh.
References blender::Span< T >::index_range(), mix_indices(), blender::math::safe_rcp(), and T.
|
inline |
Definition at line 391 of file BKE_attribute_math.hh.
References mix_indices(), blender::math::rcp(), blender::Span< T >::size(), and T.
Definition at line 269 of file attribute_math.cc.
References blender::math::QuaternionBase< float >::expmap(), blender::math::from_loc_rot_scale(), mix_indices(), blender::math::safe_rcp(), scale(), blender::Span< T >::size(), and blender::math::to_loc_rot_scale_safe().
| float4x4 blender::bke::attribute_math::mix_indices | ( | Span< float4x4 > | src, |
| Span< int > | indices, | ||
| Span< float > | weights ) |
Definition at line 303 of file attribute_math.cc.
References blender::math::QuaternionBase< float >::expmap(), blender::math::from_loc_rot_scale(), blender::Span< T >::index_range(), mix_indices(), blender::math::safe_rcp(), scale(), and blender::math::to_loc_rot_scale_safe().
| void blender::bke::attribute_math::shift_left | ( | GMutableSpan | data, |
| int | src_begin, | ||
| int | src_end, | ||
| int | dst_begin ) |
Move elements from [src_begin, src_end) to dest_begin. dest_begin must be <= src_begin.
Definition at line 401 of file attribute_math.cc.
References blender::data, shift_left(), T, and to_static_type().
Referenced by blender::ed::greasepencil::resize_single_curve(), shift_left(), shift_left(), and blender::ed::sculpt_paint::greasepencil::trim_end_points().
| void blender::bke::attribute_math::shift_left | ( | MutableSpan< T > | data, |
| int | src_begin, | ||
| int | src_end, | ||
| int | dst_begin ) |
Definition at line 393 of file attribute_math.cc.
References blender::data, ELEM, and shift_left().
| void blender::bke::attribute_math::shift_right | ( | GMutableSpan | data, |
| int | src_begin, | ||
| int | src_end, | ||
| int | dst_begin ) |
Move elements from [src_begin, src_end) to a range ending at dst_end. dst_end must be >= src_end.
Definition at line 416 of file attribute_math.cc.
References blender::data, shift_right(), T, and to_static_type().
Referenced by blender::ed::greasepencil::add_single_curve(), blender::ed::greasepencil::resize_single_curve(), shift_right(), and shift_right().
| void blender::bke::attribute_math::shift_right | ( | MutableSpan< T > | data, |
| int | src_begin, | ||
| int | src_end, | ||
| int | dst_end ) |
Definition at line 408 of file attribute_math.cc.
References blender::data, ELEM, and shift_right().
|
inline |
Definition at line 52 of file BKE_attribute_math.hh.
References blender::bke::attribute_type_to_cpp_type(), and to_static_type().
|
inline |
Utility function that simplifies calling a templated function based on a run-time data type.
Definition at line 35 of file BKE_attribute_math.hh.
References float, T, to_static_type(), and blender::CPPType::to_static_type().
Referenced by 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_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(), attr_create_generic(), attr_create_generic(), blender::draw::pbvh::calc_generic_corner_attribute_grids(), blender::draw::pbvh::calc_generic_vert_attribute_grids(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::AttrSingleValueChecker::check_range(), 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::ed::greasepencil::boolean::create_curves_from_segments(), blender::io::alembic::create_geom_param_for_attribute(), 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_subdiv(), blender::draw::extract_data_bmesh(), blender::draw::pbvh::fill_generic_face_attribute_grids(), gather(), gather_group_to_group(), gather_ranges_to_groups(), gather_to_groups(), blender::geometry::gaussian_blur_1D(), 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::bke::mesh_flip_faces(), blender::bke::LegacyMeshInterpolator::mix(), blender::geometry::mix(), blender::geometry::mix_arrays(), blender::geometry::mix_arrays(), blender::bke::subdiv::mix_attrs(), blender::bke::subdiv::mix_attrs(), blender::bke::subdiv::mix_attrs(), mix_groups(), blender::geometry::mix_with_indices(), blender::nodes::node_geo_grid_info_cc::node_geo_exec(), blender::nodes::node_geo_grid_to_points_cc::node_geo_exec(), blender::geometry::resample_to_uniform(), 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(), shift_left(), shift_right(), blender::geometry::subdivide_attribute_linear(), to_static_type(), to_static_type(), blender::geometry::trim_attribute_linear(), blender::geometry::trim_catmull_rom_curves(), 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().