|
Blender V4.3
|
Functions | |
| static void | node_declare (NodeDeclarationBuilder &b) |
| static MultiValueMap< int, int > | separate_guides_by_group (const VArray< int > &guide_group_ids) |
| static Map< int, int > | compute_points_per_curve_by_group (const MultiValueMap< int, int > &guides_by_group, const bke::CurvesGeometry &guide_curves) |
| static Map< int, KDTree_3d * > | build_kdtrees_for_root_positions (const MultiValueMap< int, int > &guides_by_group, const bke::CurvesGeometry &guide_curves) |
| static void | find_neighbor_guides (const Span< float3 > positions, const VArray< int > point_group_ids, const Map< int, KDTree_3d * > kdtrees, const MultiValueMap< int, 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 VArray< int > &point_group_ids, const Map< int, 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 VArray< 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 () |
|
static |
Build a kdtree for every guide group.
Definition at line 100 of file node_geo_interpolate_curves.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::MultiValueMap< Key, Value >::items(), blender::bke::CurvesGeometry::offsets(), blender::threading::parallel_for_each(), blender::bke::CurvesGeometry::positions(), blender::Span< T >::size(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values().
Referenced by generate_interpolated_curves().
|
static |
Compute how many points each generated curve will have. This is determined by looking at neighboring points.
Definition at line 234 of file node_geo_interpolate_curves.cc.
References compute_point_counts_per_child(), blender::MutableSpan< T >::index_range(), and blender::bke::CurvesGeometry::points_by_curve().
Referenced by compute_point_counts_per_child(), and generate_interpolated_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 76 of file node_geo_interpolate_curves.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::MultiValueMap< Key, Value >::items(), blender::bke::CurvesGeometry::points_by_curve(), and blender::offset_indices::OffsetIndices< T >::size().
Referenced by generate_interpolated_curves().
|
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 129 of file node_geo_interpolate_curves.cc.
References blender::threading::parallel_for().
Referenced by generate_interpolated_curves().
|
static |
Definition at line 677 of file node_geo_interpolate_curves.cc.
References BLI_SCOPED_DEFER, build_kdtrees_for_root_positions(), compute_point_counts_per_child(), compute_points_per_curve_by_group(), blender::bke::AttributeAccessor::domain_size(), blender::MutableSpan< T >::drop_back(), find_neighbor_guides(), generate_interpolated_curves(), Curves::geometry, interpolate_curve_attributes(), interpolate_curve_shapes(), blender::MutableSpan< T >::last(), blender::bke::AttributeAccessor::lookup(), Curves::mat, MEM_dupallocN, blender::bke::CurvesGeometry::offsets_for_write(), parameterize_guide_curves(), blender::bke::CurvesGeometry::resize(), separate_guides_by_group(), store_output_attributes(), Curves::totcol, and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values().
Referenced by generate_interpolated_curves(), and node_geo_exec().
|
static |
Propagate attributes from the guides and source points to the child curves.
Definition at line 444 of file node_geo_interpolate_curves.cc.
References blender::bke::AttributeFilter::allow_skip(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), BLI_assert, CD_PROP_STRING, blender::bke::CurvesGeometry::curves_range(), blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, ELEM, blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::AttributeIter::get(), interpolate_curve_attributes(), blender::bke::AttributeIter::is_builtin, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::AttributeIter::name, blender::bke::CurvesGeometry::points_by_curve(), blender::bke::GSpanAttributeWriter::span, blender::GMutableSpan::typed(), and blender::GSpan::typed().
Referenced by generate_interpolated_curves(), and interpolate_curve_attributes().
|
static |
Initialize child curve positions by interpolating between guide curves.
Definition at line 313 of file node_geo_interpolate_curves.cc.
References blender::bke::CurvesGeometry::curves_range(), interpolate_curve_shapes(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions(), and blender::bke::CurvesGeometry::positions_for_write().
Referenced by generate_interpolated_curves(), and interpolate_curve_shapes().
|
static |
Definition at line 20 of file node_geo_interpolate_curves.cc.
References b, and blender::nodes::SocketDeclaration::description.
Referenced by node_register().
|
static |
Definition at line 786 of file node_geo_interpolate_curves.cc.
References blender::bke::GeometrySet::add(), blender::bke::GeometryComponent::attribute_domain_size(), blender::bke::GeometryComponent::attributes(), CurvesGeometry::curve_num, generate_interpolated_curves(), Curves::geometry, blender::bke::GeometrySet::get_component(), blender::bke::GeometrySet::get_curves(), blender::bke::GeometrySet::has_curves(), blender::bke::GeometryComponent::is_empty(), blender::bke::GeometrySet::name, node_geo_exec(), blender::math::normalize(), params, and v.
Referenced by node_geo_exec(), and node_register().
|
static |
Definition at line 870 of file node_geo_interpolate_curves.cc.
References blender::bke::bNodeType::declare, geo_node_type_base(), blender::bke::bNodeType::geometry_node_execute, NODE_CLASS_GEOMETRY, node_declare(), node_geo_exec(), node_register(), and blender::bke::node_register_type().
Referenced by node_register().
|
static |
Prepares parameterized guide curves so that they can be used efficiently during interpolation.
Definition at line 281 of file node_geo_interpolate_curves.cc.
References blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), parameterize_guide_curves(), blender::bke::CurvesGeometry::points_by_curve(), and blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize().
Referenced by generate_interpolated_curves(), and parameterize_guide_curves().
|
static |
Guides are split into groups. Every point will only interpolate between guides within the group with the same id.
Definition at line 62 of file node_geo_interpolate_curves.cc.
References blender::MultiValueMap< Key, Value >::add(), and blender::VArrayCommon< T >::index_range().
Referenced by generate_interpolated_curves().
|
static |
Definition at line 620 of file node_geo_interpolate_curves.cc.
References blender::bke::CurvesGeometry::attributes_for_write(), blender::bke::CurvesGeometry::curves_range(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), and store_output_attributes().
Referenced by generate_interpolated_curves(), and store_output_attributes().