Blender V5.3
BKE_curveprofile.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2019 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
13
14namespace blender {
15
16struct BlendDataReader;
17struct BlendWriter;
18struct CurveProfile;
20
26
31
32void BKE_curveprofile_free_data(struct CurveProfile *profile);
33
34void BKE_curveprofile_free(struct CurveProfile *profile);
35
36void BKE_curveprofile_copy_data(struct CurveProfile *target, const struct CurveProfile *profile);
37
38struct CurveProfile *BKE_curveprofile_copy(const struct CurveProfile *profile);
39
49 bool handle_1,
50 bool snap,
51 const float delta[2]);
52
61bool BKE_curveprofile_move_point(struct CurveProfile *profile,
62 struct CurveProfilePoint *point,
63 bool snap,
64 const float delta[2]);
65
67 const blender::float2 &offset);
68
73bool BKE_curveprofile_remove_point(struct CurveProfile *profile, struct CurveProfilePoint *point);
74
82void BKE_curveprofile_remove_by_flag(struct CurveProfile *profile, short flag);
83
91struct CurveProfilePoint *BKE_curveprofile_insert(struct CurveProfile *profile, float x, float y);
92
103void BKE_curveprofile_selected_handle_set(struct CurveProfile *profile, int type_1, int type_2);
104
110void BKE_curveprofile_reverse(struct CurveProfile *profile);
111
115void BKE_curveprofile_reset_view(struct CurveProfile *profile);
116
122void BKE_curveprofile_reset(struct CurveProfile *profile);
123
129void BKE_curveprofile_activate_nearest_point(struct CurveProfile *profile, const int i_last);
130
131int BKE_curveprofile_table_size(const struct CurveProfile *profile);
132
139void BKE_curveprofile_init(struct CurveProfile *profile, short segments_len);
140
141/* Called for a complete update of the widget after modifications */
142enum {
146};
153void BKE_curveprofile_update(struct CurveProfile *profile, int update_flags);
154
164 float length_portion,
165 float *x_out,
166 float *y_out);
168
173
174void BKE_curveprofile_blend_write(struct BlendWriter *writer, const struct CurveProfile *profile);
178void BKE_curveprofile_blend_read(struct BlendDataReader *reader, struct CurveProfile *profile);
179
180} // namespace blender
VecBase< float, 2 > float2
BMesh Iterators.
void BKE_curveprofile_init(struct CurveProfile *profile, short segments_len)
void BKE_curveprofile_translate_selection(struct CurveProfile *profile, const blender::float2 &offset)
void BKE_curveprofile_evaluate_length_portion(const struct CurveProfile *profile, float length_portion, float *x_out, float *y_out)
void BKE_curveprofile_remove_by_flag(struct CurveProfile *profile, short flag)
void BKE_curveprofile_copy_data(struct CurveProfile *target, const struct CurveProfile *profile)
void BKE_curveprofile_reset(struct CurveProfile *profile)
bool BKE_curveprofile_move_handle(struct CurveProfilePoint *point, bool handle_1, bool snap, const float delta[2])
void BKE_curveprofile_reset_view(struct CurveProfile *profile)
@ PROF_UPDATE_REMOVE_DOUBLES
void BKE_curveprofile_blend_write(struct BlendWriter *writer, const struct CurveProfile *profile)
struct CurveProfilePoint * BKE_curveprofile_insert(struct CurveProfile *profile, float x, float y)
int BKE_curveprofile_table_size(const struct CurveProfile *profile)
void BKE_curveprofile_free(struct CurveProfile *profile)
float * BKE_curveprofile_active_location_get(struct CurveProfilePoint *point)
struct CurveProfile * BKE_curveprofile_add(eCurveProfilePresets preset)
void BKE_curveprofile_selected_handle_set(struct CurveProfile *profile, int type_1, int type_2)
bool BKE_curveprofile_move_point(struct CurveProfile *profile, struct CurveProfilePoint *point, bool snap, const float delta[2])
struct CurveProfile * BKE_curveprofile_copy(const struct CurveProfile *profile)
void BKE_curveprofile_blend_read(struct BlendDataReader *reader, struct CurveProfile *profile)
void BKE_curveprofile_update(struct CurveProfile *profile, int update_flags)
CurveProfilePoint * BKE_curveprofile_active_get(CurveProfile *profile)
void BKE_curveprofile_free_data(struct CurveProfile *profile)
void BKE_curveprofile_activate_nearest_point(struct CurveProfile *profile, const int i_last)
bool BKE_curveprofile_remove_point(struct CurveProfile *profile, struct CurveProfilePoint *point)
void BKE_curveprofile_reverse(struct CurveProfile *profile)
void BKE_curveprofile_set_defaults(struct CurveProfile *profile)
vector snap(vector a, vector b)
Definition node_math.h:147