Changeset View
Changeset View
Standalone View
Standalone View
source/blender/geometry/GEO_trim_curves.hh
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| #pragma once | #pragma once | ||||
| #include "BLI_span.hh" | #include "BLI_span.hh" | ||||
| #include "DNA_node_types.h" | |||||
| #include "BKE_curves.hh" | #include "BKE_curves.hh" | ||||
| #include "BKE_curves_utils.hh" | #include "BKE_curves_utils.hh" | ||||
| #include "BKE_geometry_set.hh" | #include "BKE_geometry_set.hh" | ||||
| namespace blender::geometry { | namespace blender::geometry { | ||||
| /* | /* | ||||
| * Create a new Curves instance by trimming the input curves. Copying the selected splines | * Create a new Curves instance by trimming the input curves. Copying the selected splines | ||||
| * between the start and end points. | * between the start and end points. | ||||
| */ | */ | ||||
| bke::CurvesGeometry trim_curves(const bke::CurvesGeometry &src_curves, | bke::CurvesGeometry trim_curves(const bke::CurvesGeometry &src_curves, | ||||
| IndexMask selection, | IndexMask selection, | ||||
| Span<bke::curves::CurvePoint> start_points, | const VArray<float> &starts, | ||||
| Span<bke::curves::CurvePoint> end_points); | const VArray<float> &ends, | ||||
| GeometryNodeCurveSampleMode mode); | |||||
| /** | |||||
| * Find the point(s) and piecewise segment corresponding to the given distance along the length of | |||||
| * the curve. Returns points on the evaluated curve for Catmull-Rom and NURBS splines. | |||||
| * | |||||
| * \param curves: Curve geometry to sample. | |||||
| * \param lengths: Distance along the curve on form [0.0, length] to determine the point for. | |||||
| * \param curve_indices: Curve index to lookup for each 'length', negative index are set to 0. | |||||
| * \param normalized_factors: If true, 'lengths' are normalized to the interval [0.0, 1.0]. | |||||
| */ | |||||
| Array<bke::curves::CurvePoint, 12> lookup_curve_points(const bke::CurvesGeometry &curves, | |||||
| Span<float> lengths, | |||||
| Span<int64_t> curve_indices, | |||||
| bool normalized_factors); | |||||
HooglyBoogly: A bit nitpicky, but it's in the style guide so we might as well be consistent | |||||
Done Inline ActionsYeah I like the style in theory but I always copy paste the definition to make sure I don't make typos in it which breaks the style by default. Would be nice to have some code format/linter to check for these things. Osares: Yeah I like the style in theory but I always copy paste the definition to make sure I don't… | |||||
| } // namespace blender::geometry | } // namespace blender::geometry | ||||
A bit nitpicky, but it's in the style guide so we might as well be consistent