Blender V5.0
GEO_smooth_curves.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include "BLI_generic_span.hh"
8#include "BLI_index_mask.hh"
10
11#include "BKE_curves.hh"
12
13namespace blender::geometry {
14
24void gaussian_blur_1D(const GSpan src,
25 int iterations,
26 const VArray<float> &influence_by_point,
27 const bool smooth_ends,
28 const bool keep_shape,
29 const bool is_cyclic,
30 GMutableSpan dst);
31
35void smooth_curve_attribute(const IndexMask &curves_to_smooth,
36 const OffsetIndices<int> points_by_curve,
37 const VArray<bool> &point_selection,
38 const VArray<bool> &cyclic,
39 int iterations,
40 float influence,
41 bool smooth_ends,
42 bool keep_shape,
43 GMutableSpan attribute_data);
44
48void smooth_curve_attribute(const IndexMask &curves_to_smooth,
49 const OffsetIndices<int> points_by_curve,
50 const VArray<bool> &point_selection,
51 const VArray<bool> &cyclic,
52 int iterations,
53 const VArray<float> &influence_by_point,
54 bool smooth_ends,
55 bool keep_shape,
56 GMutableSpan attribute_data);
57
61void smooth_curve_positions(bke::CurvesGeometry &curves,
62 const IndexMask &curves_to_smooth,
63 const VArray<bool> &point_selection,
64 int iterations,
65 const VArray<float> &influence_by_point,
66 bool smooth_ends,
67 bool keep_shape);
68void smooth_curve_positions(bke::CurvesGeometry &curves,
69 const IndexMask &curves_to_smooth,
70 const VArray<bool> &point_selection,
71 int iterations,
72 float influence,
73 bool smooth_ends,
74 bool keep_shape);
75
76} // namespace blender::geometry
Low-level operations for curves.
static bool is_cyclic(const Nurb *nu)
void smooth_curve_positions(bke::CurvesGeometry &curves, const IndexMask &curves_to_smooth, const VArray< bool > &point_selection, int iterations, const VArray< float > &influence_by_point, bool smooth_ends, bool keep_shape)
void smooth_curve_attribute(const IndexMask &curves_to_smooth, const OffsetIndices< int > points_by_curve, const VArray< bool > &point_selection, const VArray< bool > &cyclic, int iterations, float influence, bool smooth_ends, bool keep_shape, GMutableSpan attribute_data)
void gaussian_blur_1D(const GSpan src, int iterations, const VArray< float > &influence_by_point, const bool smooth_ends, const bool keep_shape, const bool is_cyclic, GMutableSpan dst)