Blender  V2.93
BKE_curve.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 #pragma once
20 
25 #include "BLI_sys_types.h"
26 
27 #include "DNA_listBase.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 struct BMEditMesh;
34 struct BezTriple;
35 struct Curve;
36 struct Depsgraph;
37 struct GHash;
38 struct ListBase;
39 struct MDeformVert;
40 struct Main;
41 struct Nurb;
42 struct Object;
43 struct TextBox;
44 struct rctf;
45 
47 
48 typedef struct CurveCache {
52  /* This array contains the accumulative length of the curve segments.
53  * So you can see this as a "total distance traveled" along the curve.
54  * The first entry is the length between point 0 and 1 while the last is the
55  * total length of the curve.
56  *
57  * Used by #BKE_where_on_path. */
58  const float *anim_path_accum_length;
60 
61 /* Definitions needed for shape keys */
62 typedef struct CVKeyIndex {
63  void *orig_cv;
65  bool switched;
67 
68 #define KNOTSU(nu) \
69  ((nu)->orderu + (nu)->pntsu + (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu - 1) : 0))
70 #define KNOTSV(nu) \
71  ((nu)->orderv + (nu)->pntsv + (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv - 1) : 0))
72 
73 /* Non cyclic nurbs have 1 less segment */
74 #define SEGMENTSU(nu) (((nu)->flagu & CU_NURB_CYCLIC) ? (nu)->pntsu : (nu)->pntsu - 1)
75 #define SEGMENTSV(nu) (((nu)->flagv & CU_NURB_CYCLIC) ? (nu)->pntsv : (nu)->pntsv - 1)
76 
77 #define CU_DO_RADIUS(cu, nu) \
78  ((((cu)->flag & (CU_PATH_RADIUS | CU_3D)) || (cu)->bevobj || (cu)->ext1 != 0.0f || \
79  (cu)->ext2 != 0.0f) ? \
80  1 : \
81  0)
82 
83 #define CU_IS_2D(cu) (((cu)->flag & CU_3D) == 0)
84 
85 /* not 3d and not unfilled */
86 #define CU_DO_2DFILL(cu) (CU_IS_2D(cu) && (((cu)->flag & (CU_FRONT | CU_BACK)) != 0))
87 
88 /* ** Curve ** */
89 void BKE_curve_editfont_free(struct Curve *cu);
90 void BKE_curve_init(struct Curve *cu, const short curve_type);
91 struct Curve *BKE_curve_add(struct Main *bmain, const char *name, int type);
92 short BKE_curve_type_get(const struct Curve *cu);
93 void BKE_curve_type_test(struct Object *ob);
94 void BKE_curve_dimension_update(struct Curve *cu);
95 
96 struct BoundBox *BKE_curve_boundbox_get(struct Object *ob);
97 
98 void BKE_curve_texspace_calc(struct Curve *cu);
99 void BKE_curve_texspace_ensure(struct Curve *cu);
100 void BKE_curve_texspace_get(struct Curve *cu, float r_loc[3], float r_size[3]);
101 
102 bool BKE_curve_minmax(struct Curve *cu, bool use_radius, float min[3], float max[3]);
103 bool BKE_curve_center_median(struct Curve *cu, float cent[3]);
104 bool BKE_curve_center_bounds(struct Curve *cu, float cent[3]);
105 void BKE_curve_transform_ex(struct Curve *cu,
106  const float mat[4][4],
107  const bool do_keys,
108  const bool do_props,
109  const float unit_scale);
110 void BKE_curve_transform(struct Curve *cu,
111  const float mat[4][4],
112  const bool do_keys,
113  const bool do_props);
114 void BKE_curve_translate(struct Curve *cu, const float offset[3], const bool do_keys);
115 void BKE_curve_material_index_remove(struct Curve *cu, int index);
116 bool BKE_curve_material_index_used(const struct Curve *cu, int index);
117 void BKE_curve_material_index_clear(struct Curve *cu);
119 void BKE_curve_material_remap(struct Curve *cu, const unsigned int *remap, unsigned int remap_len);
120 
121 void BKE_curve_smooth_flag_set(struct Curve *cu, const bool use_smooth);
122 
123 ListBase *BKE_curve_nurbs_get(struct Curve *cu);
124 
125 int BKE_curve_nurb_vert_index_get(const struct Nurb *nu, const void *vert);
126 void BKE_curve_nurb_active_set(struct Curve *cu, const struct Nurb *nu);
127 struct Nurb *BKE_curve_nurb_active_get(struct Curve *cu);
128 void *BKE_curve_vert_active_get(struct Curve *cu);
129 void BKE_curve_nurb_vert_active_set(struct Curve *cu, const struct Nurb *nu, const void *vert);
130 bool BKE_curve_nurb_vert_active_get(struct Curve *cu, struct Nurb **r_nu, void **r_vert);
132 
133 float (*BKE_curve_nurbs_vert_coords_alloc(const struct ListBase *lb, int *r_vert_len))[3];
135  float (*vert_coords)[3],
136  int vert_len);
137 
139  const float (*vert_coords)[3],
140  const float mat[4][4],
141  const bool constrain_2d);
142 
144  const float (*vert_coords)[3],
145  const bool constrain_2d);
146 
148  float *key,
149  int *r_vert_len))[3];
150 void BKE_curve_nurbs_key_vert_tilts_apply(struct ListBase *lb, const float *key);
151 
152 void BKE_curve_editNurb_keyIndex_delCV(struct GHash *keyindex, const void *cv);
153 void BKE_curve_editNurb_keyIndex_free(struct GHash **keyindex);
154 void BKE_curve_editNurb_free(struct Curve *cu);
155 struct ListBase *BKE_curve_editNurbs_get(struct Curve *cu);
156 
157 void BKE_curve_bevelList_free(struct ListBase *bev);
158 void BKE_curve_bevelList_make(struct Object *ob, struct ListBase *nurbs, bool for_render);
159 void BKE_curve_bevel_make(struct Object *ob, struct ListBase *disp);
160 
162  float q0, float q1, float q2, float q3, float *p, int it, int stride);
164  float q0, float q1, float q2, float q3, float *p, int it, int stride);
165 
166 void BKE_curve_rect_from_textbox(const struct Curve *cu,
167  const struct TextBox *tb,
168  struct rctf *r_rect);
169 
170 void BKE_curve_correct_bezpart(const float v1[2], float v2[2], float v3[2], const float v4[2]);
171 
172 /* ** Nurbs ** */
173 
174 bool BKE_nurbList_index_get_co(struct ListBase *editnurb, const int index, float r_co[3]);
175 
176 int BKE_nurbList_verts_count(const struct ListBase *nurb);
178 
179 void BKE_nurbList_free(struct ListBase *lb);
180 void BKE_nurbList_duplicate(struct ListBase *lb1, const struct ListBase *lb2);
181 void BKE_nurbList_handles_set(struct ListBase *editnurb, const char code);
182 void BKE_nurbList_handles_recalculate(struct ListBase *editnurb,
183  const bool calc_length,
184  const uint8_t flag);
185 
186 void BKE_nurbList_handles_autocalc(ListBase *editnurb, uint8_t flag);
187 void BKE_nurbList_flag_set(ListBase *editnurb, uint8_t flag, bool set);
188 bool BKE_nurbList_flag_set_from_flag(ListBase *editnurb, uint8_t from_flag, uint8_t flag);
189 
190 void BKE_nurb_free(struct Nurb *nu);
191 struct Nurb *BKE_nurb_duplicate(const struct Nurb *nu);
192 struct Nurb *BKE_nurb_copy(struct Nurb *src, int pntsu, int pntsv);
193 
194 void BKE_nurb_project_2d(struct Nurb *nu);
195 void BKE_nurb_minmax(const struct Nurb *nu, bool use_radius, float min[3], float max[3]);
196 float BKE_nurb_calc_length(const struct Nurb *nu, int resolution);
197 
199  const struct Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv);
200 void BKE_nurb_makeCurve(const struct Nurb *nu,
201  float *coord_array,
202  float *tilt_array,
203  float *radius_array,
204  float *weight_array,
205  int resolu,
206  int stride);
207 
208 unsigned int BKE_curve_calc_coords_axis_len(const unsigned int bezt_array_len,
209  const unsigned int resolu,
210  const bool is_cyclic,
211  const bool use_cyclic_duplicate_endpoint);
212 void BKE_curve_calc_coords_axis(const struct BezTriple *bezt_array,
213  const unsigned int bezt_array_len,
214  const unsigned int resolu,
215  const bool is_cyclic,
216  const bool use_cyclic_duplicate_endpoint,
217  /* array params */
218  const unsigned int axis,
219  const unsigned int stride,
220  float *r_points);
221 
222 void BKE_nurb_knot_calc_u(struct Nurb *nu);
223 void BKE_nurb_knot_calc_v(struct Nurb *nu);
224 
225 /* nurb checks if they can be drawn, also clamp order func */
226 bool BKE_nurb_check_valid_u(const struct Nurb *nu);
227 bool BKE_nurb_check_valid_v(const struct Nurb *nu);
228 bool BKE_nurb_check_valid_uv(const struct Nurb *nu);
229 
230 bool BKE_nurb_order_clamp_u(struct Nurb *nu);
231 bool BKE_nurb_order_clamp_v(struct Nurb *nu);
232 
233 void BKE_nurb_direction_switch(struct Nurb *nu);
234 bool BKE_nurb_type_convert(struct Nurb *nu,
235  const short type,
236  const bool use_handles,
237  const char **r_err_msg);
238 
239 void BKE_nurb_points_add(struct Nurb *nu, int number);
240 void BKE_nurb_bezierPoints_add(struct Nurb *nu, int number);
241 
242 int BKE_nurb_index_from_uv(struct Nurb *nu, int u, int v);
243 void BKE_nurb_index_to_uv(struct Nurb *nu, int index, int *r_u, int *r_v);
244 
245 struct BezTriple *BKE_nurb_bezt_get_next(struct Nurb *nu, struct BezTriple *bezt);
246 struct BezTriple *BKE_nurb_bezt_get_prev(struct Nurb *nu, struct BezTriple *bezt);
247 struct BPoint *BKE_nurb_bpoint_get_next(struct Nurb *nu, struct BPoint *bp);
248 struct BPoint *BKE_nurb_bpoint_get_prev(struct Nurb *nu, struct BPoint *bp);
249 
250 void BKE_nurb_bezt_calc_normal(struct Nurb *nu, struct BezTriple *bezt, float r_normal[3]);
251 void BKE_nurb_bezt_calc_plane(struct Nurb *nu, struct BezTriple *bezt, float r_plane[3]);
252 
253 void BKE_nurb_bpoint_calc_normal(struct Nurb *nu, struct BPoint *bp, float r_normal[3]);
254 void BKE_nurb_bpoint_calc_plane(struct Nurb *nu, struct BPoint *bp, float r_plane[3]);
255 
256 void BKE_nurb_handle_calc(struct BezTriple *bezt,
257  struct BezTriple *prev,
258  struct BezTriple *next,
259  const bool is_fcurve,
260  const char smoothing);
261 void BKE_nurb_handle_calc_ex(struct BezTriple *bezt,
262  struct BezTriple *prev,
263  struct BezTriple *next,
264  const eBezTriple_Flag__Alias handle_sel_flag,
265  const bool is_fcurve,
266  const char smoothing);
267 void BKE_nurb_handle_calc_simple(struct Nurb *nu, struct BezTriple *bezt);
268 void BKE_nurb_handle_calc_simple_auto(struct Nurb *nu, struct BezTriple *bezt);
269 
270 void BKE_nurb_handle_smooth_fcurve(struct BezTriple *bezt, int total, bool cyclic);
271 
272 void BKE_nurb_handles_calc(struct Nurb *nu);
273 void BKE_nurb_handles_autocalc(struct Nurb *nu, uint8_t flag);
274 void BKE_nurb_bezt_handle_test(struct BezTriple *bezt,
275  const eBezTriple_Flag__Alias sel_flag,
276  const bool use_handle,
277  const bool use_around_local);
278 void BKE_nurb_handles_test(struct Nurb *nu, const bool use_handles, const bool use_around_local);
279 
280 /* **** Depsgraph evaluation **** */
281 
282 void BKE_curve_eval_geometry(struct Depsgraph *depsgraph, struct Curve *curve);
283 
284 /* Draw Cache */
285 enum {
288 };
289 void BKE_curve_batch_cache_dirty_tag(struct Curve *cu, int mode);
290 void BKE_curve_batch_cache_free(struct Curve *cu);
291 
292 extern void (*BKE_curve_batch_cache_dirty_tag_cb)(struct Curve *cu, int mode);
293 extern void (*BKE_curve_batch_cache_free_cb)(struct Curve *cu);
294 
295 /* -------------------------------------------------------------------- */
301 unsigned int BKE_curve_decimate_bezt_array(struct BezTriple *bezt_array,
302  const unsigned int bezt_array_len,
303  const unsigned int resolu,
304  const bool is_cyclic,
305  const char flag_test,
306  const char flag_set,
307  const float error_sq_max,
308  const unsigned int error_target_len);
309 
310 void BKE_curve_decimate_nurb(struct Nurb *nu,
311  const unsigned int resolu,
312  const float error_sq_max,
313  const unsigned int error_target_len);
314 
317 /* -------------------------------------------------------------------- */
321 void BKE_curve_deform_coords(const struct Object *ob_curve,
322  const struct Object *ob_target,
323  float (*vert_coords)[3],
324  const int vert_coords_len,
325  const struct MDeformVert *dvert,
326  const int defgrp_index,
327  const short flag,
328  const short defaxis);
329 
330 void BKE_curve_deform_coords_with_editmesh(const struct Object *ob_curve,
331  const struct Object *ob_target,
332  float (*vert_coords)[3],
333  const int vert_coords_len,
334  const int defgrp_index,
335  const short flag,
336  const short defaxis,
337  struct BMEditMesh *em_target);
338 
339 void BKE_curve_deform_co(const struct Object *ob_curve,
340  const struct Object *ob_target,
341  const float orco[3],
342  float vec[3],
343  const int no_rot_axis,
344  float r_mat[3][3]);
345 
348 /* curve_convert.c */
349 
350 /* Create a new curve from the given object at its current state. This only works for curve and
351  * text objects, otherwise NULL is returned.
352  *
353  * If apply_modifiers is true and the object is a curve one, then spline deform modifiers are
354  * applied on the control points of the splines.
355  */
356 struct Curve *BKE_curve_new_from_object(struct Object *object,
357  struct Depsgraph *depsgraph,
358  bool apply_modifiers);
359 
360 #ifdef __cplusplus
361 }
362 #endif
typedef float(TangentPoint)[2]
void BKE_curve_nurbs_vert_coords_apply_with_mat4(struct ListBase *lb, const float(*vert_coords)[3], const float mat[4][4], const bool constrain_2d)
Definition: curve.c:4703
void BKE_nurb_handles_calc(struct Nurb *nu)
Definition: curve.c:4092
void BKE_nurb_bezt_handle_test(struct BezTriple *bezt, const eBezTriple_Flag__Alias sel_flag, const bool use_handle, const bool use_around_local)
Definition: curve.c:4161
bool BKE_curve_minmax(struct Curve *cu, bool use_radius, float min[3], float max[3])
Definition: curve.c:5199
bool BKE_curve_nurb_vert_active_get(struct Curve *cu, struct Nurb **r_nu, void **r_vert)
Definition: curve.c:5146
void BKE_curve_bevelList_free(struct ListBase *bev)
Definition: curve.c:2635
bool BKE_nurbList_flag_set_from_flag(ListBase *editnurb, uint8_t from_flag, uint8_t flag)
Definition: curve.c:4513
void BKE_nurb_handle_calc_simple(struct Nurb *nu, struct BezTriple *bezt)
Definition: curve.c:4124
void BKE_nurb_direction_switch(struct Nurb *nu)
Definition: curve.c:4544
void BKE_nurb_handle_calc(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, const bool is_fcurve, const char smoothing)
Definition: curve.c:4069
bool BKE_curve_center_median(struct Curve *cu, float cent[3])
Definition: curve.c:5224
int BKE_nurbList_verts_count(const struct ListBase *nurb)
void BKE_curve_rect_from_textbox(const struct Curve *cu, const struct TextBox *tb, struct rctf *r_rect)
Definition: curve.c:5546
void BKE_nurb_knot_calc_v(struct Nurb *nu)
Definition: curve.c:1308
void BKE_curve_transform_ex(struct Curve *cu, const float mat[4][4], const bool do_keys, const bool do_props, const float unit_scale)
Definition: curve.c:5273
float(* BKE_curve_nurbs_vert_coords_alloc(const struct ListBase *lb, int *r_vert_len))[3]
void BKE_curve_correct_bezpart(const float v1[2], float v2[2], float v3[2], const float v4[2])
Definition: curve.c:5559
void BKE_curve_editfont_free(struct Curve *cu)
Definition: curve.c:346
void BKE_nurb_index_to_uv(struct Nurb *nu, int index, int *r_u, int *r_v)
Definition: curve.c:981
void BKE_curve_bevel_make(struct Object *ob, struct ListBase *disp)
Definition: curve_bevel.c:290
bool BKE_nurb_order_clamp_u(struct Nurb *nu)
Definition: curve.c:4901
struct BezTriple * BKE_nurb_bezt_get_next(struct Nurb *nu, struct BezTriple *bezt)
Definition: curve.c:990
void BKE_nurbList_handles_autocalc(ListBase *editnurb, uint8_t flag)
Definition: curve.c:4317
void BKE_nurb_bezt_calc_plane(struct Nurb *nu, struct BezTriple *bezt, float r_plane[3])
Definition: curve.c:1091
void BKE_nurb_free(struct Nurb *nu)
Definition: curve.c:633
int eBezTriple_Flag__Alias
Definition: BKE_curve.h:44
bool BKE_curve_material_index_validate(struct Curve *cu)
Definition: curve.c:5451
struct ListBase * BKE_curve_editNurbs_get(struct Curve *cu)
Definition: curve.c:437
void BKE_curve_nurb_vert_active_set(struct Curve *cu, const struct Nurb *nu, const void *vert)
void BKE_curve_texspace_ensure(struct Curve *cu)
Definition: curve.c:554
void BKE_curve_nurbs_vert_coords_get(const struct ListBase *lb, float(*vert_coords)[3], int vert_len)
struct Curve * BKE_curve_add(struct Main *bmain, const char *name, int type)
Definition: curve.c:424
void BKE_curve_deform_coords(const struct Object *ob_curve, const struct Object *ob_target, float(*vert_coords)[3], const int vert_coords_len, const struct MDeformVert *dvert, const int defgrp_index, const short flag, const short defaxis)
bool BKE_nurbList_index_get_co(struct ListBase *editnurb, const int index, float r_co[3])
Definition: curve.c:573
struct Nurb * BKE_nurb_duplicate(const struct Nurb *nu)
int BKE_nurb_index_from_uv(struct Nurb *nu, int u, int v)
Definition: curve.c:959
int BKE_curve_nurb_vert_index_get(const struct Nurb *nu, const void *vert)
struct BezTriple * BKE_nurb_bezt_get_prev(struct Nurb *nu, struct BezTriple *bezt)
Definition: curve.c:1032
bool BKE_nurb_check_valid_v(const struct Nurb *nu)
struct CurveCache CurveCache
void BKE_curve_nurb_vert_active_validate(struct Curve *cu)
Definition: curve.c:5173
void BKE_curve_editNurb_free(struct Curve *cu)
Definition: curve.c:388
void BKE_curve_init(struct Curve *cu, const short curve_type)
Definition: curve.c:398
void BKE_curve_editNurb_keyIndex_delCV(struct GHash *keyindex, const void *cv)
Definition: curve.c:373
struct BPoint * BKE_nurb_bpoint_get_next(struct Nurb *nu, struct BPoint *bp)
Definition: curve.c:1011
@ BKE_CURVE_BATCH_DIRTY_SELECT
Definition: BKE_curve.h:287
@ BKE_CURVE_BATCH_DIRTY_ALL
Definition: BKE_curve.h:286
void(* BKE_curve_batch_cache_free_cb)(struct Curve *cu)
Definition: curve.c:5616
void BKE_curve_type_test(struct Object *ob)
Definition: curve.c:484
void BKE_nurbList_handles_set(struct ListBase *editnurb, const char code)
Definition: curve.c:4333
struct Nurb * BKE_nurb_copy(struct Nurb *src, int pntsu, int pntsv)
Definition: curve.c:713
unsigned int BKE_curve_calc_coords_axis_len(const unsigned int bezt_array_len, const unsigned int resolu, const bool is_cyclic, const bool use_cyclic_duplicate_endpoint)
Definition: curve.c:1730
void BKE_nurb_bpoint_calc_normal(struct Nurb *nu, struct BPoint *bp, float r_normal[3])
Definition: curve.c:1128
void BKE_nurb_project_2d(struct Nurb *nu)
Definition: curve.c:748
struct BoundBox * BKE_curve_boundbox_get(struct Object *ob)
Definition: curve.c:496
void BKE_curve_dimension_update(struct Curve *cu)
Definition: curve.c:467
void BKE_curve_calc_coords_axis(const struct BezTriple *bezt_array, const unsigned int bezt_array_len, const unsigned int resolu, const bool is_cyclic, const bool use_cyclic_duplicate_endpoint, const unsigned int axis, const unsigned int stride, float *r_points)
void * BKE_curve_vert_active_get(struct Curve *cu)
Definition: curve.c:5107
bool BKE_curve_material_index_used(const struct Curve *cu, int index)
void BKE_curve_material_remap(struct Curve *cu, const unsigned int *remap, unsigned int remap_len)
Definition: curve.c:5484
void BKE_curve_eval_geometry(struct Depsgraph *depsgraph, struct Curve *curve)
Definition: curve.c:5600
void BKE_nurb_bezt_calc_normal(struct Nurb *nu, struct BezTriple *bezt, float r_normal[3])
void BKE_nurb_makeFaces(const struct Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv)
bool BKE_nurb_check_valid_u(const struct Nurb *nu)
void BKE_curve_bevelList_make(struct Object *ob, struct ListBase *nurbs, bool for_render)
Definition: curve.c:2653
unsigned int BKE_curve_decimate_bezt_array(struct BezTriple *bezt_array, const unsigned int bezt_array_len, const unsigned int resolu, const bool is_cyclic, const char flag_test, const char flag_set, const float error_sq_max, const unsigned int error_target_len)
struct BPoint * BKE_nurb_bpoint_get_prev(struct Nurb *nu, struct BPoint *bp)
Definition: curve.c:1054
void BKE_nurb_bpoint_calc_plane(struct Nurb *nu, struct BPoint *bp, float r_plane[3])
Definition: curve.c:1151
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
Definition: curve.c:1804
void BKE_nurb_points_add(struct Nurb *nu, int number)
Definition: curve.c:932
short BKE_curve_type_get(const struct Curve *cu)
int BKE_nurbList_verts_count_without_handles(const struct ListBase *nurb)
void BKE_nurb_knot_calc_u(struct Nurb *nu)
Definition: curve.c:1303
void(* BKE_curve_batch_cache_dirty_tag_cb)(struct Curve *cu, int mode)
Definition: curve.c:5615
void BKE_nurb_makeCurve(const struct Nurb *nu, float *coord_array, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride)
void BKE_nurbList_duplicate(struct ListBase *lb1, const struct ListBase *lb2)
void BKE_nurbList_handles_recalculate(struct ListBase *editnurb, const bool calc_length, const uint8_t flag)
Definition: curve.c:4418
void BKE_curve_forward_diff_tangent_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
Definition: curve.c:1833
void BKE_nurb_handle_calc_ex(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, const eBezTriple_Flag__Alias handle_sel_flag, const bool is_fcurve, const char smoothing)
Definition: curve.c:4082
void BKE_curve_deform_coords_with_editmesh(const struct Object *ob_curve, const struct Object *ob_target, float(*vert_coords)[3], const int vert_coords_len, const int defgrp_index, const short flag, const short defaxis, struct BMEditMesh *em_target)
void BKE_nurbList_free(struct ListBase *lb)
Definition: curve.c:660
void BKE_curve_material_index_clear(struct Curve *cu)
Definition: curve.c:5434
struct Nurb * BKE_curve_nurb_active_get(struct Curve *cu)
Definition: curve.c:5100
void BKE_curve_nurbs_vert_coords_apply(struct ListBase *lb, const float(*vert_coords)[3], const bool constrain_2d)
Definition: curve.c:4740
bool BKE_nurb_type_convert(struct Nurb *nu, const short type, const bool use_handles, const char **r_err_msg)
Definition: curve.c:4932
void BKE_nurbList_flag_set(ListBase *editnurb, uint8_t flag, bool set)
Definition: curve.c:4475
void BKE_nurb_handle_calc_simple_auto(struct Nurb *nu, struct BezTriple *bezt)
Definition: curve.c:4133
void BKE_nurb_minmax(const struct Nurb *nu, bool use_radius, float min[3], float max[3])
void BKE_nurb_handles_autocalc(struct Nurb *nu, uint8_t flag)
Definition: curve.c:4236
void BKE_curve_nurbs_key_vert_tilts_apply(struct ListBase *lb, const float *key)
Definition: curve.c:4810
bool BKE_nurb_check_valid_uv(const struct Nurb *nu)
void BKE_curve_smooth_flag_set(struct Curve *cu, const bool use_smooth)
Definition: curve.c:5532
void BKE_curve_batch_cache_free(struct Curve *cu)
Definition: curve.c:5624
bool BKE_nurb_order_clamp_v(struct Nurb *nu)
Definition: curve.c:4915
void BKE_curve_transform(struct Curve *cu, const float mat[4][4], const bool do_keys, const bool do_props)
Definition: curve.c:5338
struct Curve * BKE_curve_new_from_object(struct Object *object, struct Depsgraph *depsgraph, bool apply_modifiers)
Definition: curve_convert.c:70
void BKE_curve_deform_co(const struct Object *ob_curve, const struct Object *ob_target, const float orco[3], float vec[3], const int no_rot_axis, float r_mat[3][3])
float BKE_nurb_calc_length(const struct Nurb *nu, int resolution)
bool BKE_curve_center_bounds(struct Curve *cu, float cent[3])
Definition: curve.c:5261
void BKE_nurb_bezierPoints_add(struct Nurb *nu, int number)
Definition: curve.c:945
void BKE_curve_editNurb_keyIndex_free(struct GHash **keyindex)
Definition: curve.c:379
void BKE_curve_texspace_get(struct Curve *cu, float r_loc[3], float r_size[3])
Definition: curve.c:561
void BKE_curve_nurb_active_set(struct Curve *cu, const struct Nurb *nu)
ListBase * BKE_curve_nurbs_get(struct Curve *cu)
Definition: curve.c:5079
float(* BKE_curve_nurbs_key_vert_coords_alloc(const struct ListBase *lb, float *key, int *r_vert_len))[3]
void BKE_curve_decimate_nurb(struct Nurb *nu, const unsigned int resolu, const float error_sq_max, const unsigned int error_target_len)
void BKE_curve_texspace_calc(struct Curve *cu)
Definition: curve.c:517
void BKE_nurb_handle_smooth_fcurve(struct BezTriple *bezt, int total, bool cyclic)
Definition: curve.c:4016
void BKE_curve_batch_cache_dirty_tag(struct Curve *cu, int mode)
Definition: curve.c:5618
void BKE_nurb_handles_test(struct Nurb *nu, const bool use_handles, const bool use_around_local)
Definition: curve.c:4217
struct CVKeyIndex CVKeyIndex
void BKE_curve_material_index_remove(struct Curve *cu, int index)
Definition: curve.c:5390
void BKE_curve_translate(struct Curve *cu, const float offset[3], const bool do_keys)
Definition: curve.c:5344
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
These structs are the foundation for all linked lists in the library system.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei stride
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
Curve curve
const Depsgraph * depsgraph
static ulong * next
#define min(a, b)
Definition: sort.c:51
unsigned char uint8_t
Definition: stdint.h:81
int key_index
Definition: BKE_curve.h:64
int vertex_index
Definition: BKE_curve.h:64
void * orig_cv
Definition: BKE_curve.h:63
int pt_index
Definition: BKE_curve.h:64
bool switched
Definition: BKE_curve.h:65
int nu_index
Definition: BKE_curve.h:64
ListBase bev
Definition: BKE_curve.h:50
ListBase disp
Definition: BKE_curve.h:49
ListBase deformed_nurbs
Definition: BKE_curve.h:51
const float * anim_path_accum_length
Definition: BKE_curve.h:58
short resolu
Definition: BKE_main.h:116
short resolu
short resolv
float max