72 ((nu)->orderu + (nu)->pntsu + (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu - 1) : 0))
74 ((nu)->orderv + (nu)->pntsv + (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv - 1) : 0))
77#define SEGMENTSU(nu) (((nu)->flagu & CU_NURB_CYCLIC) ? (nu)->pntsu : (nu)->pntsu - 1)
78#define SEGMENTSV(nu) (((nu)->flagv & CU_NURB_CYCLIC) ? (nu)->pntsv : (nu)->pntsv - 1)
80#define CU_DO_RADIUS(cu, nu) \
81 ((((cu)->flag & (CU_PATH_RADIUS | CU_3D)) || (cu)->bevobj || (cu)->extrude != 0.0f || \
82 (cu)->bevel_radius != 0.0f) ? \
86#define CU_IS_2D(cu) (((cu)->flag & CU_3D) == 0)
89#define CU_DO_2DFILL(cu) (CU_IS_2D(cu) && (((cu)->flag & (CU_FRONT | CU_BACK)) != 0))
110 Curve *cu,
const float mat[4][4],
bool do_keys,
bool do_props,
float unit_scale);
148 const float (*vert_coords)[3],
149 const float mat[4][4],
153 const float (*vert_coords)[3],
176 float q0,
float q1,
float q2,
float q3,
float *p,
int it,
int stride);
181 float q0,
float q1,
float q2,
float q3,
float *p,
int it,
int stride);
252 bool use_cyclic_duplicate_endpoint);
260 unsigned int bezt_array_len,
263 bool use_cyclic_duplicate_endpoint,
366 bool use_around_local);
391 unsigned int bezt_array_len,
397 unsigned int error_target_len);
402 unsigned int error_target_len);
412 float (*vert_coords)[3],
421 float (*vert_coords)[3],
@ NURB_HANDLE_TEST_KNOT_OR_EACH
@ NURB_HANDLE_TEST_KNOT_ONLY
bool BKE_nurb_type_convert(Nurb *nu, short type, bool use_handles, const char **r_err_msg)
void BKE_nurb_handles_autocalc(Nurb *nu, uint8_t flag)
void BKE_nurb_handle_calc_simple_auto(Nurb *nu, BezTriple *bezt)
bool BKE_nurbList_flag_set_from_flag(ListBase *editnurb, uint8_t from_flag, uint8_t flag)
void BKE_nurbList_handles_set(ListBase *editnurb, eNurbHandleTest_Mode handle_mode, char code)
void BKE_nurb_handle_calc_simple(Nurb *nu, BezTriple *bezt)
void BKE_curve_batch_cache_dirty_tag(Curve *cu, int mode)
void BKE_nurb_index_to_uv(Nurb *nu, int index, int *r_u, int *r_v)
void BKE_nurb_handles_calc(Nurb *nu)
const ListBase * BKE_curve_editNurbs_get_for_read(const Curve *cu)
void BKE_curve_init(Curve *cu, short curve_type)
void BKE_curve_translate(Curve *cu, const float offset[3], bool do_keys)
void BKE_curve_deform_coords(const Object *ob_curve, const Object *ob_target, float(*vert_coords)[3], int vert_coords_len, const MDeformVert *dvert, int defgrp_index, short flag, short defaxis)
void BKE_curve_editNurb_free(Curve *cu)
bool BKE_curve_center_median(Curve *cu, float cent[3])
void BKE_nurb_makeFaces(const Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv)
int eBezTriple_Flag__Alias
void BKE_curve_correct_bezpart(const float v1[2], float v2[2], float v3[2], const float v4[2])
void BKE_nurb_project_2d(Nurb *nu)
void BKE_curve_deform_co(const Object *ob_curve, const Object *ob_target, const float orco[3], float vec[3], int no_rot_axis, float r_mat[3][3])
void BKE_curve_texspace_ensure(Curve *cu)
void BKE_nurb_bpoint_calc_plane(Nurb *nu, BPoint *bp, float r_plane[3])
void BKE_nurbList_handles_autocalc(ListBase *editnurb, uint8_t flag)
void BKE_curve_material_remap(Curve *cu, const unsigned int *remap, unsigned int remap_len)
void BKE_curve_decimate_nurb(Nurb *nu, unsigned int resolu, float error_sq_max, unsigned int error_target_len)
void BKE_nurb_free(Nurb *nu)
void BKE_curve_type_test(Object *ob)
void BKE_curve_bevelList_free(ListBase *bev)
ListBase * BKE_curve_nurbs_get(Curve *cu)
void BKE_curve_nurb_active_set(Curve *cu, const Nurb *nu)
void BKE_curve_texspace_calc(Curve *cu)
Nurb * BKE_curve_nurb_active_get(Curve *cu)
const ListBase * BKE_curve_nurbs_get_for_read(const Curve *cu)
short BKE_nurb_bezt_handle_test_calc_flag(const BezTriple *bezt, const eBezTriple_Flag__Alias sel_flag, const eNurbHandleTest_Mode handle_mode)
bool BKE_nurb_check_valid_uv(const Nurb *nu)
void(* BKE_curve_batch_cache_free_cb)(Curve *cu)
Curve * BKE_curve_new_from_object(Object *object, Depsgraph *depsgraph, bool apply_modifiers)
void BKE_curve_batch_cache_free(Curve *cu)
void BKE_nurb_makeCurve(const Nurb *nu, float *coord_array, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride)
float BKE_nurb_calc_length(const Nurb *nu, int resolution)
void BKE_curve_editNurb_keyIndex_free(GHash **keyindex)
void BKE_nurbList_handles_recalculate(ListBase *editnurb, bool calc_length, uint8_t flag)
void BKE_curve_nurb_vert_active_set(Curve *cu, const Nurb *nu, const void *vert)
void BKE_nurb_knot_calc_u(Nurb *nu)
void BKE_nurb_handle_smooth_fcurve(BezTriple *bezt, int total, bool cyclic)
void BKE_nurb_handles_test(Nurb *nu, eNurbHandleTest_Mode handle_mode, bool use_around_local)
void BKE_curve_calc_coords_axis(const 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_curve_nurbs_vert_coords_get(const ListBase *lb, float(*vert_coords)[3], int vert_len)
void BKE_curve_dimension_update(Curve *cu)
void BKE_curve_nurbs_key_vert_tilts_apply(ListBase *lb, const float *key)
void BKE_nurbList_duplicate(ListBase *lb1, const ListBase *lb2)
std::optional< blender::Bounds< blender::float3 > > BKE_curve_minmax(const Curve *cu, bool use_radius)
void * BKE_curve_vert_active_get(Curve *cu)
ListBase BKE_curve_bevel_make(const Curve *curve)
bool BKE_nurb_order_clamp_u(Nurb *nu)
unsigned int BKE_curve_calc_coords_axis_len(unsigned int bezt_array_len, unsigned int resolu, bool is_cyclic, bool use_cyclic_duplicate_endpoint)
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
void BKE_curve_smooth_flag_set(Curve *cu, bool use_smooth)
void BKE_nurbList_free(ListBase *lb)
void BKE_curve_editfont_free(Curve *cu)
ListBase * BKE_curve_editNurbs_get(Curve *cu)
void BKE_curve_nurbs_vert_coords_apply(ListBase *lb, const float(*vert_coords)[3], bool constrain_2d)
void BKE_nurb_handle_calc(BezTriple *bezt, BezTriple *prev, BezTriple *next, bool is_fcurve, char smoothing)
bool BKE_nurb_check_valid_v(const Nurb *nu)
void BKE_curve_nurbs_vert_coords_apply_with_mat4(ListBase *lb, const float(*vert_coords)[3], const float mat[4][4], bool constrain_2d)
int BKE_nurbList_verts_count(const ListBase *nurb)
void BKE_curve_material_index_remove(Curve *cu, int index)
int BKE_nurb_index_from_uv(Nurb *nu, int u, int v)
void BKE_nurb_bezt_handle_test(BezTriple *bezt, eBezTriple_Flag__Alias sel_flag, const eNurbHandleTest_Mode handle_mode, bool use_around_local)
void BKE_curve_forward_diff_tangent_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
@ BKE_CURVE_BATCH_DIRTY_SELECT
@ BKE_CURVE_BATCH_DIRTY_ALL
void BKE_nurb_bezt_calc_normal(Nurb *nu, BezTriple *bezt, float r_normal[3])
void BKE_nurb_knot_calc_v(Nurb *nu)
short BKE_curve_type_get(const Curve *cu)
Curve * BKE_curve_add(Main *bmain, const char *name, int type)
void(* BKE_curve_batch_cache_dirty_tag_cb)(Curve *cu, int mode)
bool BKE_curve_material_index_used(const Curve *cu, int index)
void BKE_nurb_direction_switch(Nurb *nu)
void BKE_curve_nurb_vert_active_validate(Curve *cu)
void BKE_curve_material_index_clear(Curve *cu)
void BKE_curve_eval_geometry(Depsgraph *depsgraph, Curve *curve)
bool BKE_curve_nurb_vert_active_get(Curve *cu, Nurb **r_nu, void **r_vert)
BPoint * BKE_nurb_bpoint_get_prev(Nurb *nu, BPoint *bp)
bool BKE_nurb_check_valid_u(const Nurb *nu)
void BKE_nurb_bezierPoints_add(Nurb *nu, int number)
void BKE_curve_transform(Curve *cu, const float mat[4][4], bool do_keys, bool do_props)
BPoint * BKE_nurb_bpoint_get_next(Nurb *nu, BPoint *bp)
void BKE_nurbList_flag_set(ListBase *editnurb, uint8_t flag, bool set)
BezTriple * BKE_nurb_bezt_get_next(Nurb *nu, BezTriple *bezt)
void BKE_nurb_bpoint_calc_normal(Nurb *nu, BPoint *bp, float r_normal[3])
Nurb * BKE_nurb_duplicate(const Nurb *nu)
bool BKE_nurb_order_clamp_v(Nurb *nu)
void BKE_curve_transform_ex(Curve *cu, const float mat[4][4], bool do_keys, bool do_props, float unit_scale)
unsigned int BKE_curve_decimate_bezt_array(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)
void BKE_curve_rect_from_textbox(const Curve *cu, const TextBox *tb, rctf *r_rect)
void BKE_curve_editNurb_keyIndex_delCV(GHash *keyindex, const void *cv)
int BKE_nurbList_verts_count_without_handles(const ListBase *nurb)
float(* BKE_curve_nurbs_key_vert_coords_alloc(const ListBase *lb, float *key, int *r_vert_len))[3]
bool BKE_nurbList_index_get_co(ListBase *nurb, int index, float r_co[3])
Nurb * BKE_nurb_copy(Nurb *src, int pntsu, int pntsv)
void BKE_curve_bevelList_make(Object *ob, const ListBase *nurbs, bool for_render)
int BKE_curve_nurb_vert_index_get(const Nurb *nu, const void *vert)
void BKE_nurb_handle_calc_ex(BezTriple *bezt, BezTriple *prev, BezTriple *next, eBezTriple_Flag__Alias handle_sel_flag, bool is_fcurve, char smoothing)
void BKE_nurb_bezt_calc_plane(Nurb *nu, BezTriple *bezt, float r_plane[3])
bool BKE_nurb_valid_message(int pnts, short order, short flag, short type, bool is_surf, int dir, char *message_dst, size_t maxncpy)
float(* BKE_curve_nurbs_vert_coords_alloc(const ListBase *lb, int *r_vert_len))[3]
BezTriple * BKE_nurb_bezt_get_prev(Nurb *nu, BezTriple *bezt)
void BKE_curve_deform_coords_with_editmesh(const Object *ob_curve, const Object *ob_target, float(*vert_coords)[3], int vert_coords_len, int defgrp_index, short flag, short defaxis, const BMEditMesh *em_target)
bool BKE_curve_material_index_validate(Curve *cu)
void BKE_nurb_points_add(Nurb *nu, int number)
These structs are the foundation for all linked lists in the library system.
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
const Depsgraph * depsgraph
static bool is_cyclic(const Nurb *nu)
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
const float * anim_path_accum_length