Cleanup: Improve comments

Add to comments in curves header, fix typo in attribute header.

Ref D14481
This commit is contained in:
Mattias Fredriksson 2022-08-24 18:11:55 -04:00 committed by Hans Goudey
parent f593a560d3
commit 1dae11ccb5
3 changed files with 15 additions and 4 deletions

View File

@ -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.
*/

View File

@ -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

View File

@ -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 {