Blender
V3.3
|
Classes | |
class | SimpleMixer |
class | BooleanPropagationMixer |
class | SimpleMixerWithAccumulationType |
class | ColorGeometry4fMixer |
class | ColorGeometry4bMixer |
struct | DefaultMixerStruct |
struct | DefaultMixerStruct< float > |
struct | DefaultMixerStruct< float2 > |
struct | DefaultMixerStruct< float3 > |
struct | DefaultMixerStruct< ColorGeometry4f > |
struct | DefaultMixerStruct< ColorGeometry4b > |
struct | DefaultMixerStruct< int > |
struct | DefaultMixerStruct< bool > |
struct | DefaultMixerStruct< int8_t > |
struct | DefaultPropatationMixerStruct |
struct | DefaultPropatationMixerStruct< 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 | DefaultPropatationMixer = typename DefaultPropatationMixerStruct< 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) |
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<> | |
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 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<> | |
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) |
using blender::attribute_math::DefaultMixer = typedef typename DefaultMixerStruct<T>::type |
Definition at line 403 of file BKE_attribute_math.hh.
using blender::attribute_math::DefaultPropatationMixer = typedef typename DefaultPropatationMixerStruct<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 399 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 20 of file BKE_attribute_math.hh.
References BLI_assert_unreachable, bool, float(), T, blender::CPPType::to_static_type_tag(), and type.
Referenced by blender::bke::adapt_curve_domain_curve_to_point(), blender::bke::adapt_curve_domain_point_to_curve(), blender::bke::adapt_curve_domain_point_to_spline(), blender::bke::adapt_curve_domain_spline_to_point(), 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::geometry::bezier_generic_to_nurbs(), blender::nodes::node_geo_transfer_attribute_cc::NearestTransferFunction::call(), blender::nodes::node_geo_transfer_attribute_cc::IndexTransferFunction::call(), convert_to_static_type(), blender::nodes::node_geo_delete_geometry_cc::copy_attributes(), blender::nodes::node_geo_delete_geometry_cc::copy_attributes_based_on_map(), blender::nodes::node_geo_delete_geometry_cc::copy_attributes_based_on_mask(), blender::nodes::node_geo_duplicate_elements_cc::copy_attributes_without_id(), blender::nodes::node_geo_duplicate_elements_cc::copy_curve_attributes_without_id(), blender::bke::copy_curve_domain_attribute_to_mesh(), 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::bke::copy_main_point_domain_attribute_to_mesh(), blender::bke::copy_profile_point_domain_attribute_to_mesh(), blender::bke::copy_with_map(), blender::geometry::create_curve_from_vert_indices(), blender::geometry::duplicate_fillet_point_data(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_edges(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_vertices(), blender::nodes::node_geo_field_at_index_cc::FieldAtIndex::get_varray_for_context(), blender::bke::curves::nurbs::interpolate_to_evaluated(), NURBSpline::interpolate_to_evaluated(), BezierSpline::interpolate_to_evaluated(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::nodes::node_geo_accumulate_field_cc::node_geo_exec(), blender::nodes::node_geo_field_at_index_cc::node_geo_exec(), blender::nodes::node_geo_interpolate_domain_cc::node_geo_exec(), blender::nodes::node_geo_transfer_attribute_cc::node_geo_exec(), blender::geometry::nurbs_to_bezier_assign(), blender::geometry::point_merge_by_distance(), InstancesComponent::remove_instances(), Spline::reverse(), blender::bke::CurvesGeometry::reverse_curves(), blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::bke::mesh_surface_sample::sample_point_attribute(), Spline::sample_with_index_factors(), blender::geometry::subdivide_attribute_catmull_rom(), blender::geometry::subdivide_attribute_linear(), blender::nodes::node_geo_curve_trim_cc::to_single_point_bezier(), blender::nodes::node_geo_curve_trim_cc::to_single_point_nurbs(), blender::nodes::node_geo_curve_trim_cc::to_single_point_poly(), blender::nodes::node_geo_dual_mesh_cc::transfer_attributes(), transform_active_color(), blender::nodes::node_geo_curve_trim_cc::trim_bezier_spline(), blender::nodes::node_geo_curve_trim_cc::trim_nurbs_spline(), blender::nodes::node_geo_curve_trim_cc::trim_poly_spline(), blender::bke::DynamicPointAttributeProvider::try_get_for_read(), and blender::bke::DynamicPointAttributeProvider::try_get_for_write().
|
inline |
Definition at line 42 of file BKE_attribute_math.hh.
References convert_to_static_type(), and blender::bke::custom_data_type_to_cpp_type().
|
inline |
Definition at line 127 of file BKE_attribute_math.hh.
References Freestyle::a, and usdtokens::b().
|
inline |
Definition at line 164 of file BKE_attribute_math.hh.
References Freestyle::a, usdtokens::b(), and blender::math::interpolate().
|
inline |
Definition at line 158 of file BKE_attribute_math.hh.
References Freestyle::a, usdtokens::b(), and blender::math::interpolate().
|
inline |
Definition at line 142 of file BKE_attribute_math.hh.
References Freestyle::a, and usdtokens::b().
|
inline |
Definition at line 147 of file BKE_attribute_math.hh.
References Freestyle::a, usdtokens::b(), and blender::math::interpolate().
|
inline |
Definition at line 152 of file BKE_attribute_math.hh.
References Freestyle::a, usdtokens::b(), and blender::math::interpolate().
|
inline |
Definition at line 137 of file BKE_attribute_math.hh.
References Freestyle::a, and usdtokens::b().
|
inline |
Definition at line 132 of file BKE_attribute_math.hh.
References Freestyle::a, and usdtokens::b().
|
inline |
Definition at line 62 of file BKE_attribute_math.hh.
|
inline |
Definition at line 102 of file BKE_attribute_math.hh.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r, v1, and v2.
|
inline |
Definition at line 91 of file BKE_attribute_math.hh.
References interp_v4_v4v4v4(), result, v1, and v2.
|
inline |
Definition at line 73 of file BKE_attribute_math.hh.
|
inline |
Definition at line 79 of file BKE_attribute_math.hh.
|
inline |
Definition at line 85 of file BKE_attribute_math.hh.
|
inline |
Definition at line 67 of file BKE_attribute_math.hh.
|
inline |
Definition at line 57 of file BKE_attribute_math.hh.
T blender::attribute_math::mix3 | ( | const float3 & | weights, |
const T & | v0, | ||
const T & | v1, | ||
const T & | v2 | ||
) |
Referenced by blender::geometry::compute_surface_point_normal(), blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::bke::mesh_surface_sample::sample_corner_attrribute_with_bary_coords(), blender::bke::mesh_surface_sample::sample_point_attribute(), and blender::bke::mesh_surface_sample::sample_surface_points_spherical().