Blender  V3.3
BKE_curve.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 #pragma once
4 
9 #include "BLI_sys_types.h"
10 
11 #include "DNA_listBase.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 struct BMEditMesh;
18 struct BezTriple;
19 struct Curve;
20 struct Depsgraph;
21 struct GHash;
22 struct ListBase;
23 struct MDeformVert;
24 struct Main;
25 struct Nurb;
26 struct Object;
27 struct TextBox;
28 struct rctf;
29 
31 
32 typedef struct CurveCache {
36  /* This array contains the accumulative length of the curve segments.
37  * So you can see this as a "total distance traveled" along the curve.
38  * The first entry is the length between point 0 and 1 while the last is the
39  * total length of the curve.
40  *
41  * Used by #BKE_where_on_path. */
42  const float *anim_path_accum_length;
44 
45 /* Definitions needed for shape keys */
46 typedef struct CVKeyIndex {
47  void *orig_cv;
49  bool switched;
51 
52 #define KNOTSU(nu) \
53  ((nu)->orderu + (nu)->pntsu + (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu - 1) : 0))
54 #define KNOTSV(nu) \
55  ((nu)->orderv + (nu)->pntsv + (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv - 1) : 0))
56 
57 /* Non cyclic nurbs have 1 less segment */
58 #define SEGMENTSU(nu) (((nu)->flagu & CU_NURB_CYCLIC) ? (nu)->pntsu : (nu)->pntsu - 1)
59 #define SEGMENTSV(nu) (((nu)->flagv & CU_NURB_CYCLIC) ? (nu)->pntsv : (nu)->pntsv - 1)
60 
61 #define CU_DO_RADIUS(cu, nu) \
62  ((((cu)->flag & (CU_PATH_RADIUS | CU_3D)) || (cu)->bevobj || (cu)->extrude != 0.0f || \
63  (cu)->bevel_radius != 0.0f) ? \
64  1 : \
65  0)
66 
67 #define CU_IS_2D(cu) (((cu)->flag & CU_3D) == 0)
68 
69 /* not 3d and not unfilled */
70 #define CU_DO_2DFILL(cu) (CU_IS_2D(cu) && (((cu)->flag & (CU_FRONT | CU_BACK)) != 0))
71 
72 /* ** Curve ** */
76 void BKE_curve_editfont_free(struct Curve *cu);
77 void BKE_curve_init(struct Curve *cu, short curve_type);
78 struct Curve *BKE_curve_add(struct Main *bmain, const char *name, int type);
79 short BKE_curve_type_get(const struct Curve *cu);
80 void BKE_curve_type_test(struct Object *ob);
81 void BKE_curve_dimension_update(struct Curve *cu);
82 
83 struct BoundBox *BKE_curve_boundbox_get(struct Object *ob);
84 
85 void BKE_curve_texspace_calc(struct Curve *cu);
86 void BKE_curve_texspace_ensure(struct Curve *cu);
87 
88 /* Basic vertex data functions. */
89 
90 bool BKE_curve_minmax(struct Curve *cu, bool use_radius, float min[3], float max[3]);
91 bool BKE_curve_center_median(struct Curve *cu, float cent[3]);
92 bool BKE_curve_center_bounds(struct Curve *cu, float cent[3]);
94  struct Curve *cu, const float mat[4][4], bool do_keys, bool do_props, float unit_scale);
95 void BKE_curve_transform(struct Curve *cu, const float mat[4][4], bool do_keys, bool do_props);
96 void BKE_curve_translate(struct Curve *cu, const float offset[3], bool do_keys);
97 void BKE_curve_material_index_remove(struct Curve *cu, int index);
98 bool BKE_curve_material_index_used(const struct Curve *cu, int index);
99 void BKE_curve_material_index_clear(struct Curve *cu);
101 void BKE_curve_material_remap(struct Curve *cu, const unsigned int *remap, unsigned int remap_len);
102 
103 void BKE_curve_smooth_flag_set(struct Curve *cu, bool use_smooth);
104 
108 ListBase *BKE_curve_nurbs_get(struct Curve *cu);
109 const ListBase *BKE_curve_nurbs_get_for_read(const struct Curve *cu);
110 
111 int BKE_curve_nurb_vert_index_get(const struct Nurb *nu, const void *vert);
112 void BKE_curve_nurb_active_set(struct Curve *cu, const struct Nurb *nu);
113 struct Nurb *BKE_curve_nurb_active_get(struct Curve *cu);
117 void *BKE_curve_vert_active_get(struct Curve *cu);
121 void BKE_curve_nurb_vert_active_set(struct Curve *cu, const struct Nurb *nu, const void *vert);
125 bool BKE_curve_nurb_vert_active_get(struct Curve *cu, struct Nurb **r_nu, void **r_vert);
127 
128 float (*BKE_curve_nurbs_vert_coords_alloc(const struct ListBase *lb, int *r_vert_len))[3];
130  float (*vert_coords)[3],
131  int vert_len);
132 
134  const float (*vert_coords)[3],
135  const float mat[4][4],
136  bool constrain_2d);
137 
139  const float (*vert_coords)[3],
140  bool constrain_2d);
141 
143  float *key,
144  int *r_vert_len))[3];
145 void BKE_curve_nurbs_key_vert_tilts_apply(struct ListBase *lb, const float *key);
146 
147 void BKE_curve_editNurb_keyIndex_delCV(struct GHash *keyindex, const void *cv);
148 void BKE_curve_editNurb_keyIndex_free(struct GHash **keyindex);
149 void BKE_curve_editNurb_free(struct Curve *cu);
153 struct ListBase *BKE_curve_editNurbs_get(struct Curve *cu);
154 const struct ListBase *BKE_curve_editNurbs_get_for_read(const struct Curve *cu);
155 
156 void BKE_curve_bevelList_free(struct ListBase *bev);
157 void BKE_curve_bevelList_make(struct Object *ob, const struct ListBase *nurbs, bool for_render);
159 
164  float q0, float q1, float q2, float q3, float *p, int it, int stride);
169  float q0, float q1, float q2, float q3, float *p, int it, int stride);
170 
171 void BKE_curve_rect_from_textbox(const struct Curve *cu,
172  const struct TextBox *tb,
173  struct rctf *r_rect);
174 
179 void BKE_curve_correct_bezpart(const float v1[2], float v2[2], float v3[2], const float v4[2]);
180 
181 /* ** Nurbs ** */
182 
183 bool BKE_nurbList_index_get_co(struct ListBase *editnurb, int index, float r_co[3]);
184 
185 int BKE_nurbList_verts_count(const struct ListBase *nurb);
187 
188 void BKE_nurbList_free(struct ListBase *lb);
189 void BKE_nurbList_duplicate(struct ListBase *lb1, const struct ListBase *lb2);
199 void BKE_nurbList_handles_set(struct ListBase *editnurb, char code);
200 void BKE_nurbList_handles_recalculate(struct ListBase *editnurb, bool calc_length, uint8_t flag);
201 
202 void BKE_nurbList_handles_autocalc(ListBase *editnurb, uint8_t flag);
203 void BKE_nurbList_flag_set(ListBase *editnurb, uint8_t flag, bool set);
207 bool BKE_nurbList_flag_set_from_flag(ListBase *editnurb, uint8_t from_flag, uint8_t flag);
208 
209 void BKE_nurb_free(struct Nurb *nu);
210 struct Nurb *BKE_nurb_duplicate(const struct Nurb *nu);
214 struct Nurb *BKE_nurb_copy(struct Nurb *src, int pntsu, int pntsv);
215 
216 void BKE_nurb_project_2d(struct Nurb *nu);
221 void BKE_nurb_minmax(const struct Nurb *nu, bool use_radius, float min[3], float max[3]);
222 float BKE_nurb_calc_length(const struct Nurb *nu, int resolution);
223 
228  const struct Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv);
234 void BKE_nurb_makeCurve(const struct Nurb *nu,
235  float *coord_array,
236  float *tilt_array,
237  float *radius_array,
238  float *weight_array,
239  int resolu,
240  int stride);
241 
245 unsigned int BKE_curve_calc_coords_axis_len(unsigned int bezt_array_len,
246  unsigned int resolu,
247  bool is_cyclic,
248  bool use_cyclic_duplicate_endpoint);
255 void BKE_curve_calc_coords_axis(const struct BezTriple *bezt_array,
256  unsigned int bezt_array_len,
257  unsigned int resolu,
258  bool is_cyclic,
259  bool use_cyclic_duplicate_endpoint,
260  /* array params */
261  unsigned int axis,
262  unsigned int stride,
263  float *r_points);
264 
265 void BKE_nurb_knot_calc_u(struct Nurb *nu);
266 void BKE_nurb_knot_calc_v(struct Nurb *nu);
267 
268 /* nurb checks if they can be drawn, also clamp order func */
269 bool BKE_nurb_check_valid_u(const struct Nurb *nu);
270 bool BKE_nurb_check_valid_v(const struct Nurb *nu);
271 bool BKE_nurb_check_valid_uv(const struct Nurb *nu);
272 bool BKE_nurb_valid_message(int pnts,
273  short order,
274  short flag,
275  short type,
276  bool is_surf,
277  int dir,
278  char *message_dst,
279  size_t maxncpy);
280 
281 bool BKE_nurb_order_clamp_u(struct Nurb *nu);
282 bool BKE_nurb_order_clamp_v(struct Nurb *nu);
283 
284 void BKE_nurb_direction_switch(struct Nurb *nu);
288 bool BKE_nurb_type_convert(struct Nurb *nu, short type, bool use_handles, const char **r_err_msg);
289 
293 void BKE_nurb_points_add(struct Nurb *nu, int number);
294 void BKE_nurb_bezierPoints_add(struct Nurb *nu, int number);
295 
296 int BKE_nurb_index_from_uv(struct Nurb *nu, int u, int v);
297 void BKE_nurb_index_to_uv(struct Nurb *nu, int index, int *r_u, int *r_v);
298 
299 struct BezTriple *BKE_nurb_bezt_get_next(struct Nurb *nu, struct BezTriple *bezt);
300 struct BezTriple *BKE_nurb_bezt_get_prev(struct Nurb *nu, struct BezTriple *bezt);
301 struct BPoint *BKE_nurb_bpoint_get_next(struct Nurb *nu, struct BPoint *bp);
302 struct BPoint *BKE_nurb_bpoint_get_prev(struct Nurb *nu, struct BPoint *bp);
303 
304 void BKE_nurb_bezt_calc_normal(struct Nurb *nu, struct BezTriple *bezt, float r_normal[3]);
305 void BKE_nurb_bezt_calc_plane(struct Nurb *nu, struct BezTriple *bezt, float r_plane[3]);
306 
307 void BKE_nurb_bpoint_calc_normal(struct Nurb *nu, struct BPoint *bp, float r_normal[3]);
308 void BKE_nurb_bpoint_calc_plane(struct Nurb *nu, struct BPoint *bp, float r_plane[3]);
309 
314 void BKE_nurb_handle_calc(struct BezTriple *bezt,
315  struct BezTriple *prev,
316  struct BezTriple *next,
317  bool is_fcurve,
318  char smoothing);
326 void BKE_nurb_handle_calc_ex(struct BezTriple *bezt,
327  struct BezTriple *prev,
328  struct BezTriple *next,
329  eBezTriple_Flag__Alias handle_sel_flag,
330  bool is_fcurve,
331  char smoothing);
335 void BKE_nurb_handle_calc_simple(struct Nurb *nu, struct BezTriple *bezt);
336 void BKE_nurb_handle_calc_simple_auto(struct Nurb *nu, struct BezTriple *bezt);
337 
338 void BKE_nurb_handle_smooth_fcurve(struct BezTriple *bezt, int total, bool cyclic);
339 
340 void BKE_nurb_handles_calc(struct Nurb *nu);
341 void BKE_nurb_handles_autocalc(struct Nurb *nu, uint8_t flag);
354 void BKE_nurb_bezt_handle_test(struct BezTriple *bezt,
355  eBezTriple_Flag__Alias sel_flag,
356  bool use_handle,
357  bool use_around_local);
358 void BKE_nurb_handles_test(struct Nurb *nu, bool use_handles, bool use_around_local);
359 
360 /* **** Depsgraph evaluation **** */
361 
362 void BKE_curve_eval_geometry(struct Depsgraph *depsgraph, struct Curve *curve);
363 
364 /* Draw Cache */
365 enum {
368 };
369 void BKE_curve_batch_cache_dirty_tag(struct Curve *cu, int mode);
370 void BKE_curve_batch_cache_free(struct Curve *cu);
371 
372 extern void (*BKE_curve_batch_cache_dirty_tag_cb)(struct Curve *cu, int mode);
373 extern void (*BKE_curve_batch_cache_free_cb)(struct Curve *cu);
374 
375 /* -------------------------------------------------------------------- */
381 unsigned int BKE_curve_decimate_bezt_array(struct BezTriple *bezt_array,
382  unsigned int bezt_array_len,
383  unsigned int resolu,
384  bool is_cyclic,
385  char flag_test,
386  char flag_set,
387  float error_sq_max,
388  unsigned int error_target_len);
389 
390 void BKE_curve_decimate_nurb(struct Nurb *nu,
391  unsigned int resolu,
392  float error_sq_max,
393  unsigned int error_target_len);
394 
397 /* -------------------------------------------------------------------- */
401 void BKE_curve_deform_coords(const struct Object *ob_curve,
402  const struct Object *ob_target,
403  float (*vert_coords)[3],
404  int vert_coords_len,
405  const struct MDeformVert *dvert,
406  int defgrp_index,
407  short flag,
408  short defaxis);
409 
410 void BKE_curve_deform_coords_with_editmesh(const struct Object *ob_curve,
411  const struct Object *ob_target,
412  float (*vert_coords)[3],
413  int vert_coords_len,
414  int defgrp_index,
415  short flag,
416  short defaxis,
417  struct BMEditMesh *em_target);
418 
425 void BKE_curve_deform_co(const struct Object *ob_curve,
426  const struct Object *ob_target,
427  const float orco[3],
428  float vec[3],
429  int no_rot_axis,
430  float r_mat[3][3]);
431 
434 /* curve_convert.c */
435 
436 /* Create a new curve from the given object at its current state. This only works for curve and
437  * text objects, otherwise NULL is returned.
438  *
439  * If apply_modifiers is true and the object is a curve one, then spline deform modifiers are
440  * applied on the control points of the splines.
441  */
442 struct Curve *BKE_curve_new_from_object(struct Object *object,
443  struct Depsgraph *depsgraph,
444  bool apply_modifiers);
445 
446 #ifdef __cplusplus
447 }
448 #endif
typedef float(TangentPoint)[2]
void BKE_nurb_handles_calc(struct Nurb *nu)
Definition: curve.cc:3995
bool BKE_curve_minmax(struct Curve *cu, bool use_radius, float min[3], float max[3])
Definition: curve.cc:5101
bool BKE_curve_nurb_vert_active_get(struct Curve *cu, struct Nurb **r_nu, void **r_vert)
Definition: curve.cc:5049
void BKE_curve_bevelList_free(struct ListBase *bev)
Definition: curve.cc:2551
bool BKE_nurbList_flag_set_from_flag(ListBase *editnurb, uint8_t from_flag, uint8_t flag)
Definition: curve.cc:4389
void BKE_nurb_handle_calc_simple(struct Nurb *nu, struct BezTriple *bezt)
Definition: curve.cc:4025
void BKE_nurb_direction_switch(struct Nurb *nu)
Definition: curve.cc:4420
void BKE_nurb_handle_calc_ex(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, eBezTriple_Flag__Alias handle_sel_flag, bool is_fcurve, char smoothing)
Definition: curve.cc:3984
bool BKE_curve_center_median(struct Curve *cu, float cent[3])
Definition: curve.cc:5126
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.cc:5454
void BKE_nurb_knot_calc_v(struct Nurb *nu)
Definition: curve.cc:1239
bool BKE_nurb_type_convert(struct Nurb *nu, short type, bool use_handles, const char **r_err_msg)
Definition: curve.cc:4833
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.cc:5465
void BKE_curve_editfont_free(struct Curve *cu)
Definition: curve.cc:336
void BKE_nurb_index_to_uv(struct Nurb *nu, int index, int *r_u, int *r_v)
Definition: curve.cc:964
bool BKE_nurb_order_clamp_u(struct Nurb *nu)
Definition: curve.cc:4813
struct BezTriple * BKE_nurb_bezt_get_next(struct Nurb *nu, struct BezTriple *bezt)
Definition: curve.cc:973
void BKE_nurbList_handles_autocalc(ListBase *editnurb, uint8_t flag)
Definition: curve.cc:4205
void BKE_nurb_bezt_calc_plane(struct Nurb *nu, struct BezTriple *bezt, float r_plane[3])
Definition: curve.cc:1074
void BKE_nurb_free(struct Nurb *nu)
Definition: curve.cc:622
int eBezTriple_Flag__Alias
Definition: BKE_curve.h:28
bool BKE_curve_material_index_validate(struct Curve *cu)
Definition: curve.cc:5360
void BKE_curve_smooth_flag_set(struct Curve *cu, bool use_smooth)
Definition: curve.cc:5440
struct ListBase * BKE_curve_editNurbs_get(struct Curve *cu)
Definition: curve.cc:426
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.cc:555
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.cc:414
void BKE_curve_bevelList_make(struct Object *ob, const struct ListBase *nurbs, bool for_render)
struct Nurb * BKE_nurb_duplicate(const struct Nurb *nu)
int BKE_nurb_index_from_uv(struct Nurb *nu, int u, int v)
Definition: curve.cc:942
void BKE_nurb_bezt_handle_test(struct BezTriple *bezt, eBezTriple_Flag__Alias sel_flag, bool use_handle, bool use_around_local)
Definition: curve.cc:4049
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.cc:1015
bool BKE_nurb_check_valid_v(const struct Nurb *nu)
bool BKE_nurbList_index_get_co(struct ListBase *editnurb, int index, float r_co[3])
Definition: curve.cc:562
void BKE_curve_translate(struct Curve *cu, const float offset[3], bool do_keys)
Definition: curve.cc:5253
struct CurveCache CurveCache
void BKE_curve_nurb_vert_active_validate(struct Curve *cu)
Definition: curve.cc:5076
void BKE_curve_editNurb_free(struct Curve *cu)
Definition: curve.cc:378
void BKE_curve_editNurb_keyIndex_delCV(struct GHash *keyindex, const void *cv)
Definition: curve.cc:363
ListBase BKE_curve_bevel_make(const struct Curve *curve)
unsigned int BKE_curve_decimate_bezt_array(struct BezTriple *bezt_array, unsigned int bezt_array_len, unsigned int resolu, bool is_cyclic, char flag_test, char flag_set, float error_sq_max, unsigned int error_target_len)
struct BPoint * BKE_nurb_bpoint_get_next(struct Nurb *nu, struct BPoint *bp)
Definition: curve.cc:994
@ BKE_CURVE_BATCH_DIRTY_SELECT
Definition: BKE_curve.h:367
@ BKE_CURVE_BATCH_DIRTY_ALL
Definition: BKE_curve.h:366
void BKE_curve_deform_coords_with_editmesh(const struct Object *ob_curve, const struct Object *ob_target, float(*vert_coords)[3], int vert_coords_len, int defgrp_index, short flag, short defaxis, struct BMEditMesh *em_target)
void(* BKE_curve_batch_cache_free_cb)(struct Curve *cu)
Definition: curve.cc:5522
void BKE_curve_type_test(struct Object *ob)
Definition: curve.cc:482
struct Nurb * BKE_nurb_copy(struct Nurb *src, int pntsu, int pntsv)
Definition: curve.cc:701
void BKE_nurb_bpoint_calc_normal(struct Nurb *nu, struct BPoint *bp, float r_normal[3])
Definition: curve.cc:1111
void BKE_nurb_project_2d(struct Nurb *nu)
Definition: curve.cc:736
struct BoundBox * BKE_curve_boundbox_get(struct Object *ob)
Definition: curve.cc:494
void BKE_curve_dimension_update(struct Curve *cu)
Definition: curve.cc:465
void * BKE_curve_vert_active_get(struct Curve *cu)
Definition: curve.cc:5012
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.cc:5393
void BKE_curve_eval_geometry(struct Depsgraph *depsgraph, struct Curve *curve)
Definition: curve.cc:5506
void BKE_nurb_bezt_calc_normal(struct Nurb *nu, struct BezTriple *bezt, float r_normal[3])
const struct ListBase * BKE_curve_editNurbs_get_for_read(const struct Curve *cu)
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_deform_co(const struct Object *ob_curve, const struct Object *ob_target, const float orco[3], float vec[3], int no_rot_axis, float r_mat[3][3])
void BKE_curve_deform_coords(const struct Object *ob_curve, const struct Object *ob_target, float(*vert_coords)[3], int vert_coords_len, const struct MDeformVert *dvert, int defgrp_index, short flag, short defaxis)
unsigned int BKE_curve_calc_coords_axis_len(unsigned int bezt_array_len, unsigned int resolu, bool is_cyclic, bool use_cyclic_duplicate_endpoint)
Definition: curve.cc:1650
struct BPoint * BKE_nurb_bpoint_get_prev(struct Nurb *nu, struct BPoint *bp)
Definition: curve.cc:1037
void BKE_nurb_bpoint_calc_plane(struct Nurb *nu, struct BPoint *bp, float r_plane[3])
Definition: curve.cc:1134
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
Definition: curve.cc:1717
void BKE_nurbList_handles_set(struct ListBase *editnurb, char code)
Definition: curve.cc:4212
void BKE_nurb_points_add(struct Nurb *nu, int number)
Definition: curve.cc:915
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.cc:1234
void(* BKE_curve_batch_cache_dirty_tag_cb)(struct Curve *cu, int mode)
Definition: curve.cc:5521
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_curve_init(struct Curve *cu, short curve_type)
Definition: curve.cc:388
void BKE_nurbList_duplicate(struct ListBase *lb1, const struct ListBase *lb2)
void BKE_curve_forward_diff_tangent_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
Definition: curve.cc:1745
void BKE_curve_transform(struct Curve *cu, const float mat[4][4], bool do_keys, bool do_props)
Definition: curve.cc:5247
void BKE_curve_calc_coords_axis(const struct BezTriple *bezt_array, unsigned int bezt_array_len, unsigned int resolu, bool is_cyclic, bool use_cyclic_duplicate_endpoint, unsigned int axis, unsigned int stride, float *r_points)
void BKE_nurb_handles_test(struct Nurb *nu, bool use_handles, bool use_around_local)
Definition: curve.cc:4105
void BKE_nurbList_free(struct ListBase *lb)
Definition: curve.cc:649
void BKE_curve_material_index_clear(struct Curve *cu)
Definition: curve.cc:5343
void BKE_curve_nurbs_vert_coords_apply_with_mat4(struct ListBase *lb, const float(*vert_coords)[3], const float mat[4][4], bool constrain_2d)
Definition: curve.cc:4580
struct Nurb * BKE_curve_nurb_active_get(struct Curve *cu)
Definition: curve.cc:5006
const ListBase * BKE_curve_nurbs_get_for_read(const struct Curve *cu)
void BKE_nurbList_flag_set(ListBase *editnurb, uint8_t flag, bool set)
Definition: curve.cc:4354
void BKE_nurb_handle_calc_simple_auto(struct Nurb *nu, struct BezTriple *bezt)
Definition: curve.cc:4034
void BKE_nurb_handle_calc(struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, bool is_fcurve, char smoothing)
Definition: curve.cc:3978
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.cc:4124
void BKE_curve_nurbs_key_vert_tilts_apply(struct ListBase *lb, const float *key)
Definition: curve.cc:4687
void BKE_curve_transform_ex(struct Curve *cu, const float mat[4][4], bool do_keys, bool do_props, float unit_scale)
Definition: curve.cc:5175
bool BKE_nurb_check_valid_uv(const struct Nurb *nu)
void BKE_curve_batch_cache_free(struct Curve *cu)
Definition: curve.cc:5530
void BKE_curve_nurbs_vert_coords_apply(struct ListBase *lb, const float(*vert_coords)[3], bool constrain_2d)
Definition: curve.cc:4617
bool BKE_nurb_order_clamp_v(struct Nurb *nu)
Definition: curve.cc:4823
struct Curve * BKE_curve_new_from_object(struct Object *object, struct Depsgraph *depsgraph, bool apply_modifiers)
Definition: curve_convert.c:56
float BKE_nurb_calc_length(const struct Nurb *nu, int resolution)
bool BKE_curve_center_bounds(struct Curve *cu, float cent[3])
Definition: curve.cc:5163
void BKE_nurb_bezierPoints_add(struct Nurb *nu, int number)
Definition: curve.cc:928
void BKE_curve_editNurb_keyIndex_free(struct GHash **keyindex)
Definition: curve.cc:369
void BKE_curve_nurb_active_set(struct Curve *cu, const struct Nurb *nu)
ListBase * BKE_curve_nurbs_get(struct Curve *cu)
Definition: curve.cc:4976
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, unsigned int resolu, float error_sq_max, unsigned int error_target_len)
bool BKE_nurb_valid_message(int pnts, short order, short flag, short type, bool is_surf, int dir, char *message_dst, size_t maxncpy)
Definition: curve.cc:4744
void BKE_curve_texspace_calc(struct Curve *cu)
Definition: curve.cc:518
void BKE_nurb_handle_smooth_fcurve(struct BezTriple *bezt, int total, bool cyclic)
Definition: curve.cc:3929
void BKE_curve_batch_cache_dirty_tag(struct Curve *cu, int mode)
Definition: curve.cc:5524
void BKE_nurbList_handles_recalculate(struct ListBase *editnurb, bool calc_length, uint8_t flag)
Definition: curve.cc:4297
struct CVKeyIndex CVKeyIndex
void BKE_curve_material_index_remove(struct Curve *cu, int index)
Definition: curve.cc:5299
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
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 order
_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
SyclQueue void void * src
SyclQueue void void size_t num_bytes void
static bool is_cyclic(const Nurb *nu)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
static ulong * next
SymEdge< T > * prev(const SymEdge< T > *se)
Definition: delaunay_2d.cc:105
#define min(a, b)
Definition: sort.c:35
unsigned char uint8_t
Definition: stdint.h:78
int key_index
Definition: BKE_curve.h:48
int vertex_index
Definition: BKE_curve.h:48
void * orig_cv
Definition: BKE_curve.h:47
int pt_index
Definition: BKE_curve.h:48
bool switched
Definition: BKE_curve.h:49
int nu_index
Definition: BKE_curve.h:48
ListBase bev
Definition: BKE_curve.h:34
ListBase disp
Definition: BKE_curve.h:33
ListBase deformed_nurbs
Definition: BKE_curve.h:35
const float * anim_path_accum_length
Definition: BKE_curve.h:42
short resolu
Definition: BKE_main.h:121
short flag
short resolu
short resolv
float max