Welcome to mirror list, hosted at ThFree Co, Russian Federation.

GEO_resample_curves.hh « geometry « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7ecfb5c26ec2ae4404f64ff30ec487b924e6f7a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* SPDX-License-Identifier: GPL-2.0-or-later */

#pragma once

#include "FN_field.hh"

#include "BKE_curves.hh"

namespace blender::geometry {

using bke::CurvesGeometry;

/**
 * Create new curves where the selected curves have been resampled with a number of uniform-length
 * samples defined by the count field. Interpolate attributes to the result, with an accuracy that
 * depends on the curve's resolution parameter.
 *
 * \note The values provided by the #count_field are clamped to 1 or greater.
 */
CurvesGeometry resample_to_count(const CurvesGeometry &src_curves,
                                 const fn::Field<bool> &selection_field,
                                 const fn::Field<int> &count_field);

/**
 * Create new curves resampled to make each segment have the length specified by the
 * #segment_length field input, rounded to make the length of each segment the same.
 * The accuracy will depend on the curve's resolution parameter.
 */
CurvesGeometry resample_to_length(const CurvesGeometry &src_curves,
                                  const fn::Field<bool> &selection_field,
                                  const fn::Field<float> &segment_length_field);

/**
 * Evaluate each selected curve to its implicit evaluated points.
 */
CurvesGeometry resample_to_evaluated(const CurvesGeometry &src_curves,
                                     const fn::Field<bool> &selection_field);

}  // namespace blender::geometry