diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-02 17:24:21 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-02 17:24:21 +0300 |
commit | a1f0f2eacb10d1429611979b1464408e48b800c8 (patch) | |
tree | 0a9f54eb23ca28b43971417a348eeaa10d52ae82 /source/blender/blenkernel/intern/spline_bezier.cc | |
parent | 23ffcb242dfe622954f67dab8af6ed72d5ef2917 (diff) |
Cleanup: Move public docs to BKE_spline.hh header
Diffstat (limited to 'source/blender/blenkernel/intern/spline_bezier.cc')
-rw-r--r-- | source/blender/blenkernel/intern/spline_bezier.cc | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/source/blender/blenkernel/intern/spline_bezier.cc b/source/blender/blenkernel/intern/spline_bezier.cc index 0cadab998f5..4f854333c8a 100644 --- a/source/blender/blenkernel/intern/spline_bezier.cc +++ b/source/blender/blenkernel/intern/spline_bezier.cc @@ -70,9 +70,6 @@ void BezierSpline::set_resolution(const int value) this->mark_cache_invalid(); } -/** - * \warning Call #reallocate on the spline's attributes after adding all points. - */ void BezierSpline::add_point(const float3 position, const HandleType handle_type_left, const float3 handle_position_left, @@ -203,10 +200,6 @@ static float3 next_position(Span<float3> positions, const bool cyclic, const int return positions[i + 1]; } -/** - * Recalculate all #Auto and #Vector handles with positions automatically - * derived from the neighboring control points. - */ void BezierSpline::ensure_auto_handles() const { if (!auto_handles_dirty_) { @@ -315,10 +308,6 @@ static void set_handle_position(const float3 &position, } } -/** - * Set positions for the right handle of the control point, ensuring that - * aligned handles stay aligned. Has no effect for auto and vector type handles. - */ void BezierSpline::set_handle_position_right(const int index, const blender::float3 &value) { set_handle_position(positions_[index], @@ -329,10 +318,6 @@ void BezierSpline::set_handle_position_right(const int index, const blender::flo handle_positions_left_[index]); } -/** - * Set positions for the left handle of the control point, ensuring that - * aligned handles stay aligned. Has no effect for auto and vector type handles. - */ void BezierSpline::set_handle_position_left(const int index, const blender::float3 &value) { set_handle_position(positions_[index], @@ -349,9 +334,6 @@ bool BezierSpline::point_is_sharp(const int index) const ELEM(handle_types_right_[index], HandleType::Vector, HandleType::Free); } -/** - * \warning This functional assumes that the spline has more than one point. - */ bool BezierSpline::segment_is_vector(const int index) const { /* Two control points are necessary to form a segment, that should be checked by the caller. */ @@ -409,25 +391,6 @@ void BezierSpline::correct_end_tangents() const } } -/** - * De Casteljau Bezier subdivision. - * \param index: The index of the segment's start control point. - * \param next_index: The index of the control point at the end of the segment. Could be 0, - * if the spline is cyclic. - * \param parameter: The factor along the segment, between 0 and 1. Note that this is used - * directly by the calculation, it doesn't correspond to a portion of the evaluated length. - * - * <pre> - * handle_prev handle_next - * x----------------x - * / \ - * / x---O---x \ - * / result \ - * / \ - * O O - * point_prev point_next - * </pre> - */ BezierSpline::InsertResult BezierSpline::calculate_segment_insertion(const int index, const int next_index, const float parameter) @@ -493,15 +456,6 @@ void BezierSpline::evaluate_segment(const int index, } } -/** - * Returns access to a cache of offsets into the evaluated point array for each control point. - * While most control point edges generate the number of edges specified by the resolution, vector - * segments only generate one edge. - * - * \note The length of the result is one greater than the number of points, so that the last item - * is the total number of evaluated points. This is useful to avoid recalculating the size of the - * last segment everywhere. - */ Span<int> BezierSpline::control_point_offsets() const { if (!offset_cache_dirty_) { @@ -568,12 +522,6 @@ static void calculate_mappings_linear_resolution(Span<int> offsets, } } -/** - * Returns non-owning access to an array of values containing the information necessary to - * interpolate values from the original control points to evaluated points. The control point - * index is the integer part of each value, and the factor used for interpolating to the next - * control point is the remaining factional part. - */ Span<float> BezierSpline::evaluated_mappings() const { if (!mapping_cache_dirty_) { @@ -659,11 +607,6 @@ Span<float3> BezierSpline::evaluated_positions() const return positions; } -/** - * Convert the data encoded in #evaulated_mappings into its parts-- the information necessary - * to interpolate data from control points to evaluated points between them. The next control - * point index result will not overflow the size of the control point vectors. - */ BezierSpline::InterpolationData BezierSpline::interpolation_data_from_index_factor( const float index_factor) const { |