diff options
author | Mattias Fredriksson <Osares> | 2022-08-25 01:11:55 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-08-25 01:22:29 +0300 |
commit | 1dae11ccb5f9aea099d8f52ae32138bed02d946f (patch) | |
tree | fc724edbcb12edac549080440cc042b1720af82a | |
parent | f593a560d3ca6db3bcd34960dfcb9bfc24cdf052 (diff) |
Cleanup: Improve comments
Add to comments in curves header, fix typo in attribute header.
Ref D14481
-rw-r--r-- | source/blender/blenkernel/BKE_attribute.hh | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_curves.hh | 16 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_curves_types.h | 1 |
3 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_attribute.hh b/source/blender/blenkernel/BKE_attribute.hh index 1e61e477759..d29c60a7373 100644 --- a/source/blender/blenkernel/BKE_attribute.hh +++ b/source/blender/blenkernel/BKE_attribute.hh @@ -150,7 +150,7 @@ template<typename T> struct AttributeReader { }; /** - * Result when looking up an attribute from some geometry with read an write access. After writing + * Result when looking up an attribute from some geometry with read and write access. After writing * to the attribute, the #finish method has to be called. This may invalidate caches based on this * attribute. */ diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh index 4c2e68af650..8d17fe56156 100644 --- a/source/blender/blenkernel/BKE_curves.hh +++ b/source/blender/blenkernel/BKE_curves.hh @@ -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 paramaters including position, and both new and updated handles for + * neighbouring control points. + * * <pre> * handle_prev handle_next * x-----------------x diff --git a/source/blender/makesdna/DNA_curves_types.h b/source/blender/makesdna/DNA_curves_types.h index 89deeec898b..6c38d316508 100644 --- a/source/blender/makesdna/DNA_curves_types.h +++ b/source/blender/makesdna/DNA_curves_types.h @@ -30,6 +30,7 @@ typedef enum CurveType { CURVE_TYPE_BEZIER = 2, CURVE_TYPE_NURBS = 3, } CurveType; +/* The number of supported curve types. */ #define CURVE_TYPES_NUM 4 typedef enum HandleType { |