Blender V5.3
blender::nodes::node_geo_interpolate_curves_cc Namespace Reference

Functions

static void node_declare (NodeDeclarationBuilder &b)
static Array< int > compute_points_per_curve_by_group (const GroupedSpan< int > guides_by_group, const bke::CurvesGeometry &guide_curves)
static Array< std::unique_ptr< KDTreeNew< float3 > > > build_kdtrees_for_root_positions (const GroupedSpan< int > guides_by_group, const Span< float3 > root_positions)
static void find_neighbor_guides (const Span< float3 > positions, const Span< int > point_group_indices, const Span< std::unique_ptr< KDTreeNew< float3 > > > kdtrees, const GroupedSpan< int > guides_by_group, const int max_neighbor_count, MutableSpan< int > r_all_neighbor_indices, MutableSpan< float > r_all_neighbor_weights, MutableSpan< int > r_all_neighbor_counts)
static void compute_point_counts_per_child (const bke::CurvesGeometry &guide_curves, const Span< int > point_group_indices, const Span< int > points_per_curve_by_group, const Span< int > all_neighbor_indices, const Span< float > all_neighbor_weights, const Span< int > all_neighbor_counts, const int max_neighbors, MutableSpan< int > r_points_per_child, MutableSpan< bool > r_use_direct_interpolation)
static void parameterize_guide_curves (const bke::CurvesGeometry &guide_curves, Array< int > &r_parameterized_guide_offsets, Array< float > &r_parameterized_guide_lengths)
static void interpolate_curve_shapes (bke::CurvesGeometry &child_curves, const bke::CurvesGeometry &guide_curves, const int max_neighbors, const Span< int > all_neighbor_indices, const Span< float > all_neighbor_weights, const Span< int > all_neighbor_counts, const VArray< float3 > &guides_up, const VArray< float3 > &points_up, const Span< float3 > point_positions, const OffsetIndices< int > parameterized_guide_offsets, const Span< float > parameterized_guide_lengths, const Span< bool > use_direct_interpolation_per_child)
static void interpolate_curve_attributes (bke::CurvesGeometry &child_curves, const bke::CurvesGeometry &guide_curves, const AttributeAccessor &point_attributes, const AttributeFilter &attribute_filter, const int max_neighbors, const Span< int > all_neighbor_indices, const Span< float > all_neighbor_weights, const Span< int > all_neighbor_counts, const OffsetIndices< int > parameterized_guide_offsets, const Span< float > parameterized_guide_lengths, const Span< bool > use_direct_interpolation_per_child)
static void store_output_attributes (bke::CurvesGeometry &child_curves, const std::optional< StringRef > &weight_attribute_id, const std::optional< StringRef > &index_attribute_id, const int max_neighbors, const Span< int > all_neighbor_counts, const Span< int > all_neighbor_indices, const Span< float > all_neighbor_weights)
static GeometrySet generate_interpolated_curves (const Curves &guide_curves_id, const AttributeAccessor &point_attributes, const VArray< float3 > &guides_up, const VArray< float3 > &points_up, const Span< int > guide_group_ids, const VArray< int > &point_group_ids, const int max_neighbors, const AttributeFilter &attribute_filter, const std::optional< StringRef > &index_attribute_id, const std::optional< StringRef > &weight_attribute_id)
static void node_geo_exec (GeoNodeExecParams params)
static void node_register ()

Function Documentation

◆ build_kdtrees_for_root_positions()

Array< std::unique_ptr< KDTreeNew< float3 > > > blender::nodes::node_geo_interpolate_curves_cc::build_kdtrees_for_root_positions ( const GroupedSpan< int > guides_by_group,
const Span< float3 > root_positions )
static

◆ compute_point_counts_per_child()

void blender::nodes::node_geo_interpolate_curves_cc::compute_point_counts_per_child ( const bke::CurvesGeometry & guide_curves,
const Span< int > point_group_indices,
const Span< int > points_per_curve_by_group,
const Span< int > all_neighbor_indices,
const Span< float > all_neighbor_weights,
const Span< int > all_neighbor_counts,
const int max_neighbors,
MutableSpan< int > r_points_per_child,
MutableSpan< bool > r_use_direct_interpolation )
static

Compute how many points each generated curve will have. This is determined by looking at neighboring points.

Definition at line 219 of file node_geo_interpolate_curves.cc.

References compute_point_counts_per_child(), blender::MutableSpan< T >::index_range(), blender::threading::parallel_for(), and blender::bke::CurvesGeometry::points_by_curve().

Referenced by compute_point_counts_per_child().

◆ compute_points_per_curve_by_group()

Array< int > blender::nodes::node_geo_interpolate_curves_cc::compute_points_per_curve_by_group ( const GroupedSpan< int > guides_by_group,
const bke::CurvesGeometry & guide_curves )
static

Checks if all curves within a group have the same number of points. If yes, a better interpolation algorithm can be used, that does not require resampling curves.

Definition at line 65 of file node_geo_interpolate_curves.cc.

References compute_points_per_curve_by_group(), blender::Span< T >::drop_front(), blender::offset_indices::GroupedSpan< T >::index_range(), blender::bke::CurvesGeometry::points_by_curve(), blender::offset_indices::GroupedSpan< T >::size(), and blender::offset_indices::OffsetIndices< T >::size().

Referenced by compute_points_per_curve_by_group().

◆ find_neighbor_guides()

void blender::nodes::node_geo_interpolate_curves_cc::find_neighbor_guides ( const Span< float3 > positions,
const Span< int > point_group_indices,
const Span< std::unique_ptr< KDTreeNew< float3 > > > kdtrees,
const GroupedSpan< int > guides_by_group,
const int max_neighbor_count,
MutableSpan< int > r_all_neighbor_indices,
MutableSpan< float > r_all_neighbor_weights,
MutableSpan< int > r_all_neighbor_counts )
static

For every start point of newly generated curves, find the closest guide curves within the same group and compute a weight for each of them.

Definition at line 112 of file node_geo_interpolate_curves.cc.

References find_neighbor_guides(), blender::Span< T >::index_range(), and blender::threading::parallel_for().

Referenced by find_neighbor_guides().

◆ generate_interpolated_curves()

GeometrySet blender::nodes::node_geo_interpolate_curves_cc::generate_interpolated_curves ( const Curves & guide_curves_id,
const AttributeAccessor & point_attributes,
const VArray< float3 > & guides_up,
const VArray< float3 > & points_up,
const Span< int > guide_group_ids,
const VArray< int > & point_group_ids,
const int max_neighbors,
const AttributeFilter & attribute_filter,
const std::optional< StringRef > & index_attribute_id,
const std::optional< StringRef > & weight_attribute_id )
static

◆ interpolate_curve_attributes()

void blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes ( bke::CurvesGeometry & child_curves,
const bke::CurvesGeometry & guide_curves,
const AttributeAccessor & point_attributes,
const AttributeFilter & attribute_filter,
const int max_neighbors,
const Span< int > all_neighbor_indices,
const Span< float > all_neighbor_weights,
const Span< int > all_neighbor_counts,
const OffsetIndices< int > parameterized_guide_offsets,
const Span< float > parameterized_guide_lengths,
const Span< bool > use_direct_interpolation_per_child )
static

◆ interpolate_curve_shapes()

void blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_shapes ( bke::CurvesGeometry & child_curves,
const bke::CurvesGeometry & guide_curves,
const int max_neighbors,
const Span< int > all_neighbor_indices,
const Span< float > all_neighbor_weights,
const Span< int > all_neighbor_counts,
const VArray< float3 > & guides_up,
const VArray< float3 > & points_up,
const Span< float3 > point_positions,
const OffsetIndices< int > parameterized_guide_offsets,
const Span< float > parameterized_guide_lengths,
const Span< bool > use_direct_interpolation_per_child )
static

◆ node_declare()

void blender::nodes::node_geo_interpolate_curves_cc::node_declare ( NodeDeclarationBuilder & b)
static

◆ node_geo_exec()

◆ node_register()

◆ parameterize_guide_curves()

void blender::nodes::node_geo_interpolate_curves_cc::parameterize_guide_curves ( const bke::CurvesGeometry & guide_curves,
Array< int > & r_parameterized_guide_offsets,
Array< float > & r_parameterized_guide_lengths )
static

◆ store_output_attributes()

void blender::nodes::node_geo_interpolate_curves_cc::store_output_attributes ( bke::CurvesGeometry & child_curves,
const std::optional< StringRef > & weight_attribute_id,
const std::optional< StringRef > & index_attribute_id,
const int max_neighbors,
const Span< int > all_neighbor_counts,
const Span< int > all_neighbor_indices,
const Span< float > all_neighbor_weights )
static