Blender V5.0
interpolate_curves.cc File Reference

Go to the source code of this file.

Classes

struct  blender::geometry::AttributesForInterpolation

Namespaces

namespace  blender
namespace  blender::geometry

Functions

static Array< floatblender::geometry::build_point_to_sample_map (const Span< float3 > positions, const bool cyclic, const int samples_num)
static void blender::geometry::assign_samples_to_segments (const int num_dst_points, const Span< float3 > src_positions, const bool cyclic, MutableSpan< int > dst_sample_offsets)
void blender::geometry::sample_curve_padded (const Span< float3 > positions, bool cyclic, MutableSpan< int > r_indices, MutableSpan< float > r_factors)
static void blender::geometry::reverse_samples (const int points_num, MutableSpan< int > r_indices, MutableSpan< float > r_factors)
void blender::geometry::sample_curve_padded (const bke::CurvesGeometry &curves, int curve_index, bool cyclic, bool reverse, MutableSpan< int > r_indices, MutableSpan< float > r_factors)
static bool blender::geometry::interpolate_attribute_to_curves (const StringRef attribute_id, const std::array< int, CURVE_TYPES_NUM > &type_counts)
static bool blender::geometry::interpolate_attribute_to_poly_curve (const StringRef attribute_id)
static AttributesForInterpolation blender::geometry::retrieve_attribute_spans (const Span< StringRef > ids, const CurvesGeometry &src_from_curves, const CurvesGeometry &src_to_curves, const bke::AttrDomain domain, CurvesGeometry &dst_curves)
static AttributesForInterpolation blender::geometry::gather_point_attributes_to_interpolate (const CurvesGeometry &from_curves, const CurvesGeometry &to_curves, CurvesGeometry &dst_curves)
static AttributesForInterpolation blender::geometry::gather_curve_attributes_to_interpolate (const CurvesGeometry &from_curves, const CurvesGeometry &to_curves, CurvesGeometry &dst_curves)
static void blender::geometry::sample_curve_attribute (const bke::CurvesGeometry &src_curves, const Span< int > src_curve_indices, const OffsetIndices< int > dst_points_by_curve, const GSpan src_data, const IndexMask &dst_curve_mask, const Span< int > dst_sample_indices, const Span< float > dst_sample_factors, GMutableSpan dst_data)
static float4 blender::geometry::calculate_catmull_rom_basis_derivative (const float parameter)
static int4 blender::geometry::get_catmull_rom_indices (const int src_index, const int src_index_last, const bool cyclic)
static void blender::geometry::sample_poly_curve_positions_handles (const bool cyclic, const Span< float3 > src_pos, const Span< int > dst_indices, const Span< float > dst_factors, const IndexRange dst_points, const int8_t dst_type, MutableSpan< float3 > dst_pos, MutableSpan< float3 > dst_left, MutableSpan< float3 > dst_right, MutableSpan< int8_t > dst_types_left, MutableSpan< int8_t > dst_types_right)
static void blender::geometry::sample_catmull_rom_curve_positions_handles (const bool cyclic, const IndexRange src_points, const Span< float3 > src_pos, const Span< int > dst_indices, const Span< float > dst_factors, const IndexRange dst_points, const int8_t dst_type, MutableSpan< float3 > dst_pos, MutableSpan< float3 > dst_left, MutableSpan< float3 > dst_right, MutableSpan< int8_t > dst_types_left, MutableSpan< int8_t > dst_types_right)
static void blender::geometry::sample_bezier_curve_positions_handles (const bool cyclic, const IndexRange src_points, const Span< float3 > src_pos, const Span< float3 > src_handle_left, const Span< float3 > src_handle_right, const VArray< int8_t > src_types_left, const VArray< int8_t > src_types_right, const Span< int > dst_indices, const Span< float > dst_factors, const IndexRange dst_points, MutableSpan< float3 > dst_pos, MutableSpan< float3 > dst_left, MutableSpan< float3 > dst_right, MutableSpan< int8_t > dst_types_left, MutableSpan< int8_t > dst_types_right)
static void blender::geometry::sample_curve_positions_and_handles (const bke::CurvesGeometry &src_curves, const Span< int > src_curve_indices, const OffsetIndices< int > dst_points_by_curve, const VArray< int8_t > dst_types, const IndexMask &dst_curve_mask, const Span< int > dst_sample_indices, const Span< float > dst_sample_factors, MutableSpan< float3 > dst_positions, MutableSpan< float3 > dst_handles_left, MutableSpan< float3 > dst_handles_right, MutableSpan< int8_t > dst_handle_types_left, MutableSpan< int8_t > dst_handle_types_right)
template<typename T>
static void blender::geometry::mix_arrays (const Span< T > from, const Span< T > to, const float mix_factor, const MutableSpan< T > dst)
static void blender::geometry::mix_arrays (const GSpan src_from, const GSpan src_to, const Span< float > mix_factors, const IndexMask &selection, const GMutableSpan dst)
static void blender::geometry::mix_arrays (const GSpan src_from, const GSpan src_to, const Span< float > mix_factors, const IndexMask &group_selection, const OffsetIndices< int > groups, const GMutableSpan dst)
static int8_t blender::geometry::mix_handle_type (const int8_t from_type, const int8_t to_type)
static void blender::geometry::mix_handle_type_arrays (const Span< int8_t > src_from, const Span< int8_t > src_to, const IndexMask &group_selection, const OffsetIndices< int > groups, const MutableSpan< int8_t > dst)
static void blender::geometry::mix_curve_type (const Span< int > from_curve_indices, const Span< int > to_curve_indices, const VArray< int8_t > &from_types, const VArray< int8_t > &to_types, const IndexMask &dst_curve_mask, MutableSpan< int8_t > dst_curve_types)
void blender::geometry::interpolate_curves_with_samples (const bke::CurvesGeometry &from_curves, const bke::CurvesGeometry &to_curves, Span< int > from_curve_indices, Span< int > to_curve_indices, Span< int > from_sample_indices, Span< int > to_sample_indices, Span< float > from_sample_factors, Span< float > to_sample_factors, const IndexMask &dst_curve_mask, float mix_factor, bke::CurvesGeometry &dst_curves, IndexMaskMemory &memory)
static void blender::geometry::sample_curve_uniform (const bke::CurvesGeometry &curves, const int curve_index, const bool cyclic, const bool reverse, MutableSpan< int > r_segment_indices, MutableSpan< float > r_factors)
void blender::geometry::interpolate_curves (const bke::CurvesGeometry &from_curves, const bke::CurvesGeometry &to_curves, Span< int > from_curve_indices, Span< int > to_curve_indices, const IndexMask &dst_curve_mask, Span< bool > dst_curve_flip_direction, float mix_factor, bke::CurvesGeometry &dst_curves, IndexMaskMemory &memory)