Blender V4.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
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17struct BlendDataReader;
18struct BlendWriter;
19struct CurveProfile;
21
27
32
33void BKE_curveprofile_free_data(struct CurveProfile *profile);
34
35void BKE_curveprofile_free(struct CurveProfile *profile);
36
37void BKE_curveprofile_copy_data(struct CurveProfile *target, const struct CurveProfile *profile);
38
39struct CurveProfile *BKE_curveprofile_copy(const struct CurveProfile *profile);
40
50 bool handle_1,
51 bool snap,
52 const float delta[2]);
53
62bool BKE_curveprofile_move_point(struct CurveProfile *profile,
63 struct CurveProfilePoint *point,
64 bool snap,
65 const float delta[2]);
66
71bool BKE_curveprofile_remove_point(struct CurveProfile *profile, struct CurveProfilePoint *point);
72
80void BKE_curveprofile_remove_by_flag(struct CurveProfile *profile, short flag);
81
89struct CurveProfilePoint *BKE_curveprofile_insert(struct CurveProfile *profile, float x, float y);
90
96void BKE_curveprofile_selected_handle_set(struct CurveProfile *profile, int type_1, int type_2);
97
103void BKE_curveprofile_reverse(struct CurveProfile *profile);
104
108void BKE_curveprofile_reset_view(struct CurveProfile *profile);
109
115void BKE_curveprofile_reset(struct CurveProfile *profile);
116
117int BKE_curveprofile_table_size(const struct CurveProfile *profile);
118
125void BKE_curveprofile_init(struct CurveProfile *profile, short segments_len);
126
127/* Called for a complete update of the widget after modifications */
128enum {
132};
139void BKE_curveprofile_update(struct CurveProfile *profile, int update_flags);
140
150 float length_portion,
151 float *x_out,
152 float *y_out);
153
154void BKE_curveprofile_blend_write(struct BlendWriter *writer, const struct CurveProfile *profile);
158void BKE_curveprofile_blend_read(struct BlendDataReader *reader, struct CurveProfile *profile);
159
160#ifdef __cplusplus
161}
162#endif
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)
bool BKE_curveprofile_remove_point(struct CurveProfile *profile, struct CurveProfilePoint *point)
void BKE_curveprofile_update(struct CurveProfile *profile, int update_flags)
@ PROF_UPDATE_CLIP
@ PROF_UPDATE_REMOVE_DOUBLES
@ PROF_UPDATE_NONE
void BKE_curveprofile_reset_view(struct CurveProfile *profile)
void BKE_curveprofile_blend_read(struct BlendDataReader *reader, struct CurveProfile *profile)
struct CurveProfile * BKE_curveprofile_add(eCurveProfilePresets preset)
struct CurveProfilePoint * BKE_curveprofile_insert(struct CurveProfile *profile, float x, float y)
void BKE_curveprofile_copy_data(struct CurveProfile *target, const struct CurveProfile *profile)
void BKE_curveprofile_evaluate_length_portion(const struct CurveProfile *profile, float length_portion, float *x_out, float *y_out)
void BKE_curveprofile_init(struct CurveProfile *profile, short segments_len)
bool BKE_curveprofile_move_handle(struct CurveProfilePoint *point, bool handle_1, bool snap, const float delta[2])
void BKE_curveprofile_remove_by_flag(struct CurveProfile *profile, short flag)
void BKE_curveprofile_set_defaults(struct CurveProfile *profile)
void BKE_curveprofile_reset(struct CurveProfile *profile)
void BKE_curveprofile_blend_write(struct BlendWriter *writer, const struct CurveProfile *profile)
int BKE_curveprofile_table_size(const struct CurveProfile *profile)
void BKE_curveprofile_free(struct CurveProfile *profile)
void BKE_curveprofile_free_data(struct CurveProfile *profile)
void BKE_curveprofile_reverse(struct CurveProfile *profile)
vector snap(vector a, vector b)
Definition node_math.h:65
uint8_t flag
Definition wm_window.cc:138