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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/BKE_curves.hh')
-rw-r--r--source/blender/blenkernel/BKE_curves.hh18
1 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh
index 2b9b13d1d2b..4b0fc293b54 100644
--- a/source/blender/blenkernel/BKE_curves.hh
+++ b/source/blender/blenkernel/BKE_curves.hh
@@ -97,7 +97,7 @@ class CurvesGeometryRuntime {
mutable Span<float3> evaluated_positions_span;
/**
- * Cache of lengths along each evaluated curve for for each evaluated point. If a curve is
+ * Cache of lengths along each evaluated curve for each evaluated point. If a curve is
* cyclic, it needs one more length value to correspond to the last segment, so in order to
* make slicing this array for a curve fast, an extra float is stored for every curve.
*/
@@ -150,7 +150,13 @@ class CurvesGeometry : public ::CurvesGeometry {
* Accessors.
*/
+ /**
+ * The total number of control points in all curves.
+ */
int points_num() const;
+ /**
+ * The number of curves in the data-block.
+ */
int curves_num() const;
IndexRange points_range() const;
IndexRange curves_range() const;
@@ -553,7 +559,7 @@ void calculate_evaluated_offsets(Span<int8_t> handle_types_left,
int resolution,
MutableSpan<int> evaluated_offsets);
-/** See #insert. */
+/** Knot insertion result, see #insert. */
struct Insertion {
float3 handle_prev;
float3 left_handle;
@@ -563,8 +569,12 @@ struct Insertion {
};
/**
- * Compute the Bezier segment insertion for the given parameter on the segment, returning
- * the position and handles of the new point and the updated existing handle positions.
+ * Compute the insertion of a control point and handles in a Bezier segment without changing its
+ * shape.
+ * \param parameter: Factor in from 0 to 1 defining the insertion point within the segment.
+ * \return Inserted point parameters including position, and both new and updated handles for
+ * neighboring control points.
+ *
* <pre>
* handle_prev handle_next
* x-----------------x