Blender  V3.3
Classes | Macros | Enumerations | Functions | Variables
curve.cc File Reference
#include <cmath>
#include <cstdlib>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_endian_switch.h"
#include "BLI_ghash.h"
#include "BLI_index_range.hh"
#include "BLI_math.h"
#include "BLI_math_vec_types.hh"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "DNA_anim_types.h"
#include "DNA_curve_types.h"
#include "DNA_defaults.h"
#include "DNA_material_types.h"
#include "DNA_key_types.h"
#include "DNA_object_types.h"
#include "DNA_vfont_types.h"
#include "BKE_anim_data.h"
#include "BKE_curve.h"
#include "BKE_curveprofile.h"
#include "BKE_displist.h"
#include "BKE_idtype.h"
#include "BKE_key.h"
#include "BKE_lib_id.h"
#include "BKE_lib_query.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_vfont.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "CLG_log.h"
#include "BLO_read_write.h"

Go to the source code of this file.

Classes

struct  BevelSort
 

Macros

#define DNA_DEPRECATED_ALLOW
 
#define p2_h1   ((p2)-3)
 
#define p2_h2   ((p2) + 3)
 
#define SEL_F1   (1 << 0)
 
#define SEL_F2   (1 << 1)
 
#define SEL_F3   (1 << 2)
 
#define MAT_NR_REMAP(n)
 

Enumerations

enum class  NURBSValidationStatus {
  Valid , AtLeastTwoPointsRequired , MorePointsThanOrderRequired , MoreRowsForBezierRequired ,
  MorePointsForBezierRequired
}
 

Functions

static void curve_init_data (ID *id)
 
static void curve_copy_data (Main *bmain, ID *id_dst, const ID *id_src, const int flag)
 
static void curve_free_data (ID *id)
 
static void curve_foreach_id (ID *id, LibraryForeachIDData *data)
 
static void curve_blend_write (BlendWriter *writer, ID *id, const void *id_address)
 
static void switch_endian_knots (Nurb *nu)
 
static void curve_blend_read_data (BlendDataReader *reader, ID *id)
 
static void curve_blend_read_lib (BlendLibReader *reader, ID *id)
 
static void curve_blend_read_expand (BlendExpander *expander, ID *id)
 
void BKE_curve_editfont_free (Curve *cu)
 
static void curve_editNurb_keyIndex_cv_free_cb (void *val)
 
void BKE_curve_editNurb_keyIndex_delCV (GHash *keyindex, const void *cv)
 
void BKE_curve_editNurb_keyIndex_free (GHash **keyindex)
 
void BKE_curve_editNurb_free (Curve *cu)
 
void BKE_curve_init (Curve *cu, const short curve_type)
 
CurveBKE_curve_add (Main *bmain, const char *name, int type)
 
ListBaseBKE_curve_editNurbs_get (Curve *cu)
 
const ListBaseBKE_curve_editNurbs_get_for_read (const Curve *cu)
 
short BKE_curve_type_get (const Curve *cu)
 
void BKE_curve_dimension_update (Curve *cu)
 
void BKE_curve_type_test (Object *ob)
 
BoundBoxBKE_curve_boundbox_get (Object *ob)
 
void BKE_curve_texspace_calc (Curve *cu)
 
void BKE_curve_texspace_ensure (Curve *cu)
 
bool BKE_nurbList_index_get_co (ListBase *nurb, const int index, float r_co[3])
 
int BKE_nurbList_verts_count (const ListBase *nurb)
 
int BKE_nurbList_verts_count_without_handles (const ListBase *nurb)
 
void BKE_nurb_free (Nurb *nu)
 
void BKE_nurbList_free (ListBase *lb)
 
NurbBKE_nurb_duplicate (const Nurb *nu)
 
NurbBKE_nurb_copy (Nurb *src, int pntsu, int pntsv)
 
void BKE_nurbList_duplicate (ListBase *lb1, const ListBase *lb2)
 
void BKE_nurb_project_2d (Nurb *nu)
 
void BKE_nurb_minmax (const Nurb *nu, bool use_radius, float min[3], float max[3])
 
float BKE_nurb_calc_length (const Nurb *nu, int resolution)
 
void BKE_nurb_points_add (Nurb *nu, int number)
 
void BKE_nurb_bezierPoints_add (Nurb *nu, int number)
 
int BKE_nurb_index_from_uv (Nurb *nu, int u, int v)
 
void BKE_nurb_index_to_uv (Nurb *nu, int index, int *r_u, int *r_v)
 
BezTripleBKE_nurb_bezt_get_next (Nurb *nu, BezTriple *bezt)
 
BPointBKE_nurb_bpoint_get_next (Nurb *nu, BPoint *bp)
 
BezTripleBKE_nurb_bezt_get_prev (Nurb *nu, BezTriple *bezt)
 
BPointBKE_nurb_bpoint_get_prev (Nurb *nu, BPoint *bp)
 
void BKE_nurb_bezt_calc_normal (struct Nurb *UNUSED(nu), BezTriple *bezt, float r_normal[3])
 
void BKE_nurb_bezt_calc_plane (struct Nurb *nu, BezTriple *bezt, float r_plane[3])
 
void BKE_nurb_bpoint_calc_normal (struct Nurb *nu, BPoint *bp, float r_normal[3])
 
void BKE_nurb_bpoint_calc_plane (struct Nurb *nu, BPoint *bp, float r_plane[3])
 
static void calcknots (float *knots, const int pnts, const short order, const short flag)
 
static void makeknots (Nurb *nu, short uv)
 
void BKE_nurb_knot_calc_u (Nurb *nu)
 
void BKE_nurb_knot_calc_v (Nurb *nu)
 
static void basisNurb (float t, short order, int pnts, const float *knots, float *basis, int *start, int *end)
 
void BKE_nurb_makeFaces (const Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv)
 
void BKE_nurb_makeCurve (const Nurb *nu, float *coord_array, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride)
 
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)
 
void BKE_curve_calc_coords_axis (const 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_forward_diff_bezier (float q0, float q1, float q2, float q3, float *p, int it, int stride)
 
void BKE_curve_forward_diff_tangent_bezier (float q0, float q1, float q2, float q3, float *p, int it, int stride)
 
static void forward_diff_bezier_cotangent (const float p0[3], const float p1[3], const float p2[3], const float p3[3], float p[3], int it, int stride)
 
static int cu_isectLL (const float v1[3], const float v2[3], const float v3[3], const float v4[3], short cox, short coy, float *lambda, float *mu, float vec[3])
 
static bool bevelinside (const BevList *bl1, const BevList *bl2)
 
static int vergxcobev (const void *a1, const void *a2)
 
static void calc_bevel_sin_cos (float x1, float y1, float x2, float y2, float *r_sina, float *r_cosa)
 
static void tilt_bezpart (const BezTriple *prevbezt, const BezTriple *bezt, const Nurb *nu, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride)
 
static void bevel_list_calc_bisect (BevList *bl)
 
static void bevel_list_flip_tangents (BevList *bl)
 
static void bevel_list_apply_tilt (BevList *bl)
 
static void bevel_list_smooth (BevList *bl, int smooth_iter)
 
static void make_bevel_list_3D_zup (BevList *bl)
 
static void minimum_twist_between_two_points (BevPoint *current_point, BevPoint *previous_point)
 
static void make_bevel_list_3D_minimum_twist (BevList *bl)
 
static void make_bevel_list_3D_tangent (BevList *bl)
 
static void make_bevel_list_3D (BevList *bl, int smooth_iter, int twist_mode)
 
static void make_bevel_list_segment_3D (BevList *bl)
 
static void make_bevel_list_segment_2D (BevList *bl)
 
static void make_bevel_list_2D (BevList *bl)
 
static void bevlist_firstlast_direction_calc_from_bpoint (const Nurb *nu, BevList *bl)
 
void BKE_curve_bevelList_free (ListBase *bev)
 
void BKE_curve_bevelList_make (Object *ob, const ListBase *nurbs, const bool for_render)
 
static void calchandleNurb_intern (BezTriple *bezt, const BezTriple *prev, const BezTriple *next, eBezTriple_Flag handle_sel_flag, bool is_fcurve, bool skip_align, char fcurve_smoothing)
 
static void calchandlesNurb_intern (Nurb *nu, eBezTriple_Flag handle_sel_flag, bool skip_align)
 
static voidallocate_arrays (int count, float ***floats, char ***chars, const char *name)
 
static void free_arrays (void *buffer)
 
static float bezier_relax_direction (const float *a, const float *b, const float *c, const float *d, const float *h, int i, int count)
 
static void bezier_lock_unknown (float *a, float *b, float *c, float *d, int i, float value)
 
static void bezier_restore_equation (float *a, float *b, float *c, float *d, const float *a0, const float *b0, const float *c0, const float *d0, int i)
 
static bool tridiagonal_solve_with_limits (float *a, float *b, float *c, float *d, float *h, const float *hmin, const float *hmax, int solve_count)
 
static void bezier_eq_continuous (float *a, float *b, float *c, float *d, const float *dy, const float *l, int i)
 
static void bezier_eq_noaccel_right (float *a, float *b, float *c, float *d, const float *dy, const float *l, int i)
 
static void bezier_eq_noaccel_left (float *a, float *b, float *c, float *d, const float *dy, const float *l, int i)
 
static void bezier_clamp (float *hmax, float *hmin, int i, float dy, bool no_reverse, bool no_overshoot)
 
static void bezier_output_handle_inner (BezTriple *bezt, bool right, const float newval[3], bool endpoint)
 
static void bezier_output_handle (BezTriple *bezt, bool right, float dy, bool endpoint)
 
static bool bezier_check_solve_end_handle (BezTriple *bezt, char htype, bool end)
 
static float bezier_calc_handle_adj (float hsize[2], float dx)
 
static void bezier_handle_calc_smooth_fcurve (BezTriple *bezt, int total, int start, int count, bool cycle)
 
static bool is_free_auto_point (BezTriple *bezt)
 
void BKE_nurb_handle_smooth_fcurve (BezTriple *bezt, int total, bool cyclic)
 
void BKE_nurb_handle_calc (BezTriple *bezt, BezTriple *prev, BezTriple *next, const bool is_fcurve, const char smoothing)
 
void BKE_nurb_handle_calc_ex (BezTriple *bezt, BezTriple *prev, BezTriple *next, const eBezTriple_Flag__Alias handle_sel_flag, const bool is_fcurve, const char smoothing)
 
void BKE_nurb_handles_calc (Nurb *nu)
 
static void nurbList_handles_swap_select (Nurb *nu)
 
static void nurb_handles_calc__align_selected (Nurb *nu)
 
void BKE_nurb_handle_calc_simple (Nurb *nu, BezTriple *bezt)
 
void BKE_nurb_handle_calc_simple_auto (Nurb *nu, BezTriple *bezt)
 
void BKE_nurb_bezt_handle_test (BezTriple *bezt, const eBezTriple_Flag__Alias sel_flag, const bool use_handle, const bool use_around_local)
 
void BKE_nurb_handles_test (Nurb *nu, const bool use_handle, const bool use_around_local)
 
void BKE_nurb_handles_autocalc (Nurb *nu, uint8_t flag)
 
void BKE_nurbList_handles_autocalc (ListBase *editnurb, uint8_t flag)
 
void BKE_nurbList_handles_set (ListBase *editnurb, const char code)
 
void BKE_nurbList_handles_recalculate (ListBase *editnurb, const bool calc_length, const uint8_t flag)
 
void BKE_nurbList_flag_set (ListBase *editnurb, uint8_t flag, bool set)
 
bool BKE_nurbList_flag_set_from_flag (ListBase *editnurb, uint8_t from_flag, uint8_t flag)
 
void BKE_nurb_direction_switch (Nurb *nu)
 
void BKE_curve_nurbs_vert_coords_get (const ListBase *lb, float(*vert_coords)[3], int vert_len)
 
float(* BKE_curve_nurbs_vert_coords_alloc (const ListBase *lb, int *r_vert_len))[3]
 
void BKE_curve_nurbs_vert_coords_apply_with_mat4 (ListBase *lb, const float(*vert_coords)[3], const float mat[4][4], const bool constrain_2d)
 
void BKE_curve_nurbs_vert_coords_apply (ListBase *lb, const float(*vert_coords)[3], const bool constrain_2d)
 
float(* BKE_curve_nurbs_key_vert_coords_alloc (const ListBase *lb, float *key, int *r_vert_len))[3]
 
void BKE_curve_nurbs_key_vert_tilts_apply (ListBase *lb, const float *key)
 
static NURBSValidationStatus nurb_check_valid (const int pnts, const short order, const short flag, const short type, const bool is_surf, int *r_points_needed)
 
bool BKE_nurb_valid_message (const int pnts, const short order, const short flag, const short type, const bool is_surf, const int dir, char *message_dst, const size_t maxncpy)
 
bool BKE_nurb_check_valid_u (const Nurb *nu)
 
bool BKE_nurb_check_valid_v (const Nurb *nu)
 
bool BKE_nurb_check_valid_uv (const Nurb *nu)
 
bool BKE_nurb_order_clamp_u (struct Nurb *nu)
 
bool BKE_nurb_order_clamp_v (struct Nurb *nu)
 
bool BKE_nurb_type_convert (Nurb *nu, const short type, const bool use_handles, const char **r_err_msg)
 
ListBaseBKE_curve_nurbs_get (Curve *cu)
 
const ListBaseBKE_curve_nurbs_get_for_read (const Curve *cu)
 
void BKE_curve_nurb_active_set (Curve *cu, const Nurb *nu)
 
NurbBKE_curve_nurb_active_get (Curve *cu)
 
voidBKE_curve_vert_active_get (Curve *cu)
 
int BKE_curve_nurb_vert_index_get (const Nurb *nu, const void *vert)
 
void BKE_curve_nurb_vert_active_set (Curve *cu, const Nurb *nu, const void *vert)
 
bool BKE_curve_nurb_vert_active_get (Curve *cu, Nurb **r_nu, void **r_vert)
 
void BKE_curve_nurb_vert_active_validate (Curve *cu)
 
bool BKE_curve_minmax (Curve *cu, bool use_radius, float min[3], float max[3])
 
bool BKE_curve_center_median (Curve *cu, float cent[3])
 
bool BKE_curve_center_bounds (Curve *cu, float cent[3])
 
void BKE_curve_transform_ex (Curve *cu, const float mat[4][4], const bool do_keys, const bool do_props, const float unit_scale)
 
void BKE_curve_transform (Curve *cu, const float mat[4][4], const bool do_keys, const bool do_props)
 
void BKE_curve_translate (Curve *cu, const float offset[3], const bool do_keys)
 
void BKE_curve_material_index_remove (Curve *cu, int index)
 
bool BKE_curve_material_index_used (const Curve *cu, int index)
 
void BKE_curve_material_index_clear (Curve *cu)
 
bool BKE_curve_material_index_validate (Curve *cu)
 
void BKE_curve_material_remap (Curve *cu, const unsigned int *remap, unsigned int remap_len)
 
void BKE_curve_smooth_flag_set (Curve *cu, const bool use_smooth)
 
void BKE_curve_rect_from_textbox (const struct Curve *cu, const struct TextBox *tb, struct rctf *r_rect)
 
void BKE_curve_correct_bezpart (const float v1[2], float v2[2], float v3[2], const float v4[2])
 
void BKE_curve_eval_geometry (Depsgraph *depsgraph, Curve *curve)
 
void BKE_curve_batch_cache_dirty_tag (Curve *cu, int mode)
 
void BKE_curve_batch_cache_free (Curve *cu)
 

Variables

IDTypeInfo IDType_ID_CU_LEGACY
 
void(* BKE_curve_batch_cache_dirty_tag_cb )(Curve *cu, int mode) = nullptr
 
void(* BKE_curve_batch_cache_free_cb )(Curve *cu) = nullptr
 

Macro Definition Documentation

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 25 of file curve.cc.

◆ MAT_NR_REMAP

#define MAT_NR_REMAP (   n)
Value:
if (n < remap_len_short) { \
BLI_assert(n >= 0 && remap[n] < remap_len_short); \
n = remap[n]; \
} \
((void)0)
SyclQueue void void size_t num_bytes void

◆ p2_h1

#define p2_h1   ((p2)-3)

◆ p2_h2

#define p2_h2   ((p2) + 3)

◆ SEL_F1

#define SEL_F1   (1 << 0)

◆ SEL_F2

#define SEL_F2   (1 << 1)

◆ SEL_F3

#define SEL_F3   (1 << 2)

Enumeration Type Documentation

◆ NURBSValidationStatus

enum NURBSValidationStatus
strong
Enumerator
Valid 
AtLeastTwoPointsRequired 
MorePointsThanOrderRequired 
MoreRowsForBezierRequired 
MorePointsForBezierRequired 

Definition at line 64 of file curve.cc.

Function Documentation

◆ allocate_arrays()

static void* allocate_arrays ( int  count,
float ***  floats,
char ***  chars,
const char *  name 
)
static

A utility function for allocating a number of arrays of the same length with easy error checking and de-allocation, and an easy way to add or remove arrays that are processed in this way when changing code.

floats, chars: null-terminated arrays of pointers to array pointers that need to be allocated.

Returns: pointer to the buffer that contains all of the arrays.

Definition at line 3391 of file curve.cc.

References buffer, count, and MEM_malloc_arrayN.

Referenced by bezier_handle_calc_smooth_fcurve(), and tridiagonal_solve_with_limits().

◆ basisNurb()

static void basisNurb ( float  t,
short  order,
int  pnts,
const float knots,
float basis,
int *  start,
int *  end 
)
static

Definition at line 1244 of file curve.cc.

References e, i1, order, and t.

Referenced by BKE_nurb_makeCurve(), and BKE_nurb_makeFaces().

◆ bevel_list_apply_tilt()

static void bevel_list_apply_tilt ( BevList bl)
static

◆ bevel_list_calc_bisect()

static void bevel_list_calc_bisect ( BevList bl)
static

◆ bevel_list_flip_tangents()

static void bevel_list_flip_tangents ( BevList bl)
static

◆ bevel_list_smooth()

static void bevel_list_smooth ( BevList bl,
int  smooth_iter 
)
static

◆ bevelinside()

static bool bevelinside ( const BevList bl1,
const BevList bl2 
)
static

Definition at line 1839 of file curve.cc.

References BevList::bevpoints, copy_v3_v3(), cu_isectLL(), max, min, BevList::nr, and BevPoint::vec.

Referenced by BKE_curve_bevelList_make().

◆ bevlist_firstlast_direction_calc_from_bpoint()

static void bevlist_firstlast_direction_calc_from_bpoint ( const Nurb nu,
BevList bl 
)
static

◆ bezier_calc_handle_adj()

static float bezier_calc_handle_adj ( float  hsize[2],
float  dx 
)
static

Definition at line 3733 of file curve.cc.

References mul_v2_fl().

Referenced by bezier_handle_calc_smooth_fcurve().

◆ bezier_check_solve_end_handle()

static bool bezier_check_solve_end_handle ( BezTriple bezt,
char  htype,
bool  end 
)
static

◆ bezier_clamp()

static void bezier_clamp ( float hmax,
float hmin,
int  i,
float  dy,
bool  no_reverse,
bool  no_overshoot 
)
static

Definition at line 3658 of file curve.cc.

References max_ff(), and min_ff().

Referenced by bezier_handle_calc_smooth_fcurve().

◆ bezier_eq_continuous()

static void bezier_eq_continuous ( float a,
float b,
float c,
float d,
const float dy,
const float l,
int  i 
)
static

Definition at line 3630 of file curve.cc.

References Freestyle::a, usdtokens::b(), Freestyle::c, and l.

Referenced by bezier_handle_calc_smooth_fcurve().

◆ bezier_eq_noaccel_left()

static void bezier_eq_noaccel_left ( float a,
float b,
float c,
float d,
const float dy,
const float l,
int  i 
)
static

Definition at line 3648 of file curve.cc.

References Freestyle::a, usdtokens::b(), Freestyle::c, and l.

Referenced by bezier_handle_calc_smooth_fcurve().

◆ bezier_eq_noaccel_right()

static void bezier_eq_noaccel_right ( float a,
float b,
float c,
float d,
const float dy,
const float l,
int  i 
)
static

Definition at line 3639 of file curve.cc.

References Freestyle::a, usdtokens::b(), Freestyle::c, and l.

Referenced by bezier_handle_calc_smooth_fcurve().

◆ bezier_handle_calc_smooth_fcurve()

static void bezier_handle_calc_smooth_fcurve ( BezTriple bezt,
int  total,
int  start,
int  count,
bool  cycle 
)
static

◆ bezier_lock_unknown()

static void bezier_lock_unknown ( float a,
float b,
float c,
float d,
int  i,
float  value 
)
static

◆ bezier_output_handle()

static void bezier_output_handle ( BezTriple bezt,
bool  right,
float  dy,
bool  endpoint 
)
static

Definition at line 3716 of file curve.cc.

References bezier_output_handle_inner(), copy_v3_v3(), right, and BezTriple::vec.

Referenced by bezier_handle_calc_smooth_fcurve().

◆ bezier_output_handle_inner()

static void bezier_output_handle_inner ( BezTriple bezt,
bool  right,
const float  newval[3],
bool  endpoint 
)
static

◆ bezier_relax_direction()

static float bezier_relax_direction ( const float a,
const float b,
const float c,
const float d,
const float h,
int  i,
int  count 
)
static

Definition at line 3430 of file curve.cc.

References Freestyle::a, usdtokens::b(), Freestyle::c, count, and state.

Referenced by tridiagonal_solve_with_limits().

◆ bezier_restore_equation()

static void bezier_restore_equation ( float a,
float b,
float c,
float d,
const float a0,
const float b0,
const float c0,
const float d0,
int  i 
)
static

Definition at line 3452 of file curve.cc.

References Freestyle::a, usdtokens::b(), and Freestyle::c.

Referenced by tridiagonal_solve_with_limits().

◆ BKE_curve_add()

Curve* BKE_curve_add ( Main bmain,
const char *  name,
int  type 
)

◆ BKE_curve_batch_cache_dirty_tag()

void BKE_curve_batch_cache_dirty_tag ( Curve cu,
int  mode 
)

◆ BKE_curve_batch_cache_free()

void BKE_curve_batch_cache_free ( Curve cu)

Definition at line 5530 of file curve.cc.

References Curve::batch_cache, and BKE_curve_batch_cache_free_cb.

Referenced by curve_free_data().

◆ BKE_curve_bevelList_free()

void BKE_curve_bevelList_free ( ListBase bev)

◆ BKE_curve_bevelList_make()

void BKE_curve_bevelList_make ( Object ob,
const ListBase nurbs,
const bool  for_render 
)

Definition at line 2569 of file curve.cc.

References Freestyle::a, usdtokens::b(), CurveCache::bev, bevelinside(), Curve::bevfac1_mapping, Curve::bevfac2_mapping, bevlist_firstlast_direction_calc_from_bpoint(), Curve::bevobj, BevList::bevpoints, BKE_curve_bevelList_free(), BKE_curve_forward_diff_bezier(), BKE_nurb_check_valid_u(), BKE_nurb_makeCurve(), BevelSort::bl, BLI_addtail(), BLI_assert, BLI_insertlinkbefore(), BLI_remlink(), BevList::charidx, compare_v3v3(), copy_v3_v3(), CU_3D, CU_BACK, CU_BEVFAC_MAP_SEGMENT, CU_BEVFAC_MAP_SPLINE, CU_BEZIER, CU_DO_RADIUS, CU_FRONT, CU_IS_2D, CU_NURB_CYCLIC, CU_NURBS, CU_POLY, CU_TWIST_TANGENT, Object_Runtime::curve_cache, Object::data, BevPoint::dir, BevList::dupe_nr, BevPoint::dupe_tag, Curve::editnurb, ELEM, fabsf, Curve::flag, forward_diff_bezier_cotangent(), BezTriple::h1, HD_VECT, BevList::hole, is_cyclic(), len, len_v3v3(), LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, make_bevel_list_2D(), make_bevel_list_3D(), make_bevel_list_segment_2D(), make_bevel_list_segment_3D(), MEM_calloc_arrayN, MEM_callocN, MEM_freeN, MEM_malloc_arrayN, MEM_mallocN, min, BevList::next, normalize_v3(), BevList::nr, OB_FONT, BevPoint::offset, BevList::poly, BevPoint::quat, BevPoint::radius, Curve::resolu_ren, Object::runtime, BevList::segbevcount, BevList::seglen, SEGMENTSU, sub_v3_v3v3(), SWAP, BevPoint::tan, Curve::taperobj, threshold, BevPoint::tilt, tilt_bezpart(), Curve::twist_mode, Curve::twist_smooth, Object::type, unit_qt(), BevPoint::vec, BezTriple::vec, vergxcobev(), and BevPoint::weight.

◆ BKE_curve_boundbox_get()

BoundBox* BKE_curve_boundbox_get ( Object ob)

◆ BKE_curve_calc_coords_axis()

void BKE_curve_calc_coords_axis ( const 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 
)

◆ BKE_curve_calc_coords_axis_len()

unsigned int BKE_curve_calc_coords_axis_len ( unsigned int  bezt_array_len,
unsigned int  resolu,
bool  is_cyclic,
bool  use_cyclic_duplicate_endpoint 
)

Calculate the length for arrays filled in by BKE_curve_calc_coords_axis.

Definition at line 1650 of file curve.cc.

References is_cyclic().

Referenced by BKE_curve_calc_coords_axis(), BKE_curve_decimate_bezt_array(), and gpencil_stroke_points_from_editcurve_fixed_resolu().

◆ BKE_curve_center_bounds()

bool BKE_curve_center_bounds ( Curve cu,
float  cent[3] 
)

Definition at line 5163 of file curve.cc.

References BKE_curve_minmax(), INIT_MINMAX, max, mid_v3_v3v3(), and min.

Referenced by object_origin_set_exec().

◆ BKE_curve_center_median()

bool BKE_curve_center_median ( Curve cu,
float  cent[3] 
)

◆ BKE_curve_correct_bezpart()

void BKE_curve_correct_bezpart ( const float  v1[2],
float  v2[2],
float  v3[2],
const float  v4[2] 
)

This function is almost the same as BKE_fcurve_correct_bezpart, but doesn't allow as large a tangent.

Definition at line 5465 of file curve.cc.

References fabsf, len, v1, and v2.

Referenced by curvemap_make_table().

◆ BKE_curve_dimension_update()

void BKE_curve_dimension_update ( Curve cu)

◆ BKE_curve_editfont_free()

void BKE_curve_editfont_free ( struct Curve cu)

Frees edit-curve entirely.

Definition at line 336 of file curve.cc.

References Curve::editfont, MEM_freeN, EditFont::selboxes, EditFont::textbuf, and EditFont::textbufinfo.

Referenced by curve_free_data(), and ED_curve_editfont_free().

◆ BKE_curve_editNurb_free()

void BKE_curve_editNurb_free ( Curve cu)

◆ BKE_curve_editNurb_keyIndex_delCV()

void BKE_curve_editNurb_keyIndex_delCV ( GHash keyindex,
const void cv 
)

◆ BKE_curve_editNurb_keyIndex_free()

void BKE_curve_editNurb_keyIndex_free ( GHash **  keyindex)

◆ BKE_curve_editNurbs_get()

ListBase* BKE_curve_editNurbs_get ( struct Curve cu)

◆ BKE_curve_editNurbs_get_for_read()

const ListBase* BKE_curve_editNurbs_get_for_read ( const Curve cu)

Definition at line 435 of file curve.cc.

References Curve::editnurb, and EditNurb::nurbs.

Referenced by BKE_curve_nurbs_get_for_read().

◆ BKE_curve_eval_geometry()

void BKE_curve_eval_geometry ( Depsgraph depsgraph,
Curve curve 
)

◆ BKE_curve_forward_diff_bezier()

void BKE_curve_forward_diff_bezier ( float  q0,
float  q1,
float  q2,
float  q3,
float p,
int  it,
int  stride 
)

◆ BKE_curve_forward_diff_tangent_bezier()

void BKE_curve_forward_diff_tangent_bezier ( float  q0,
float  q1,
float  q2,
float  q3,
float p,
int  it,
int  stride 
)

Forward differencing method for first derivative of cubic bezier curve.

Definition at line 1745 of file curve.cc.

References Freestyle::a, float(), POINTER_OFFSET, q1, and stride.

Referenced by paint_stroke_curve_end().

◆ BKE_curve_init()

void BKE_curve_init ( Curve cu,
const short  curve_type 
)

◆ BKE_curve_material_index_clear()

void BKE_curve_material_index_clear ( Curve cu)

◆ BKE_curve_material_index_remove()

void BKE_curve_material_index_remove ( Curve cu,
int  index 
)

◆ BKE_curve_material_index_used()

bool BKE_curve_material_index_used ( const Curve cu,
int  index 
)

◆ BKE_curve_material_index_validate()

bool BKE_curve_material_index_validate ( Curve cu)

◆ BKE_curve_material_remap()

void BKE_curve_material_remap ( Curve cu,
const unsigned int *  remap,
unsigned int  remap_len 
)

◆ BKE_curve_minmax()

bool BKE_curve_minmax ( Curve cu,
bool  use_radius,
float  min[3],
float  max[3] 
)

◆ BKE_curve_nurb_active_get()

Nurb* BKE_curve_nurb_active_get ( Curve cu)

◆ BKE_curve_nurb_active_set()

void BKE_curve_nurb_active_set ( Curve cu,
const Nurb nu 
)

◆ BKE_curve_nurb_vert_active_get()

bool BKE_curve_nurb_vert_active_get ( struct Curve cu,
struct Nurb **  r_nu,
void **  r_vert 
)

◆ BKE_curve_nurb_vert_active_set()

void BKE_curve_nurb_vert_active_set ( Curve cu,
const Nurb nu,
const void vert 
)

◆ BKE_curve_nurb_vert_active_validate()

void BKE_curve_nurb_vert_active_validate ( Curve cu)

◆ BKE_curve_nurb_vert_index_get()

int BKE_curve_nurb_vert_index_get ( const Nurb nu,
const void vert 
)

◆ BKE_curve_nurbs_get()

ListBase* BKE_curve_nurbs_get ( struct Curve cu)

◆ BKE_curve_nurbs_get_for_read()

const ListBase* BKE_curve_nurbs_get_for_read ( const Curve cu)

Definition at line 4985 of file curve.cc.

References BKE_curve_editNurbs_get_for_read(), Curve::editnurb, and Curve::nurb.

◆ BKE_curve_nurbs_key_vert_coords_alloc()

float(* BKE_curve_nurbs_key_vert_coords_alloc ( const ListBase lb,
float key,
int *  r_vert_len 
) )[3]

◆ BKE_curve_nurbs_key_vert_tilts_apply()

void BKE_curve_nurbs_key_vert_tilts_apply ( ListBase lb,
const float key 
)

◆ BKE_curve_nurbs_vert_coords_alloc()

float(* BKE_curve_nurbs_vert_coords_alloc ( const ListBase lb,
int *  r_vert_len 
) )[3]

◆ BKE_curve_nurbs_vert_coords_apply()

void BKE_curve_nurbs_vert_coords_apply ( ListBase lb,
const float(*)  vert_coords[3],
const bool  constrain_2d 
)

◆ BKE_curve_nurbs_vert_coords_apply_with_mat4()

void BKE_curve_nurbs_vert_coords_apply_with_mat4 ( ListBase lb,
const float(*)  vert_coords[3],
const float  mat[4][4],
const bool  constrain_2d 
)

◆ BKE_curve_nurbs_vert_coords_get()

void BKE_curve_nurbs_vert_coords_get ( const ListBase lb,
float(*)  vert_coords[3],
int  vert_len 
)

◆ BKE_curve_rect_from_textbox()

void BKE_curve_rect_from_textbox ( const struct Curve cu,
const struct TextBox tb,
struct rctf r_rect 
)

◆ BKE_curve_smooth_flag_set()

void BKE_curve_smooth_flag_set ( Curve cu,
const bool  use_smooth 
)

Definition at line 5440 of file curve.cc.

References CU_SMOOTH, LISTBASE_FOREACH, and Curve::nurb.

Referenced by shade_smooth_exec().

◆ BKE_curve_texspace_calc()

void BKE_curve_texspace_calc ( Curve cu)

◆ BKE_curve_texspace_ensure()

void BKE_curve_texspace_ensure ( Curve cu)

◆ BKE_curve_transform()

void BKE_curve_transform ( Curve cu,
const float  mat[4][4],
const bool  do_keys,
const bool  do_props 
)

Definition at line 5247 of file curve.cc.

References BKE_curve_transform_ex(), and mat4_to_scale().

◆ BKE_curve_transform_ex()

void BKE_curve_transform_ex ( Curve cu,
const float  mat[4][4],
const bool  do_keys,
const bool  do_props,
const float  unit_scale 
)

◆ BKE_curve_translate()

void BKE_curve_translate ( Curve cu,
const float  offset[3],
const bool  do_keys 
)

◆ BKE_curve_type_get()

short BKE_curve_type_get ( const Curve cu)

◆ BKE_curve_type_test()

void BKE_curve_type_test ( Object ob)

◆ BKE_curve_vert_active_get()

void* BKE_curve_vert_active_get ( struct Curve cu)

Get active vert for curve.

Definition at line 5012 of file curve.cc.

References BKE_curve_nurb_vert_active_get().

Referenced by ED_curve_editnurb_select_pick().

◆ BKE_nurb_bezierPoints_add()

void BKE_nurb_bezierPoints_add ( Nurb nu,
int  number 
)

Definition at line 928 of file curve.cc.

References Nurb::bezt, MEM_recallocN, Nurb::pntsu, and BezTriple::radius.

Referenced by ed_editcurve_addvert(), and gpencil_stroke_to_bezier().

◆ BKE_nurb_bezt_calc_normal()

void BKE_nurb_bezt_calc_normal ( struct Nurb UNUSEDnu,
BezTriple bezt,
float  r_normal[3] 
)

Definition at line 1059 of file curve.cc.

References add_v3_v3v3(), normalize_v3(), sub_v3_v3v3(), and BezTriple::vec.

◆ BKE_nurb_bezt_calc_plane()

void BKE_nurb_bezt_calc_plane ( struct Nurb nu,
BezTriple bezt,
float  r_plane[3] 
)

◆ BKE_nurb_bezt_get_next()

BezTriple* BKE_nurb_bezt_get_next ( Nurb nu,
BezTriple bezt 
)

◆ BKE_nurb_bezt_get_prev()

BezTriple* BKE_nurb_bezt_get_prev ( Nurb nu,
BezTriple bezt 
)

◆ BKE_nurb_bezt_handle_test()

void BKE_nurb_bezt_handle_test ( struct BezTriple bezt,
eBezTriple_Flag__Alias  sel_flag,
bool  use_handle,
bool  use_around_local 
)

Update selected handle types to ensure valid state, e.g. deduce "Auto" types to concrete ones. Thereby sel_flag defines what qualifies as selected. Use when something has changed handle positions.

The caller needs to recalculate handles.

Parameters
sel_flagThe flag (bezt.f1/2/3) value to use to determine selection. Usually SELECT, but may want to use a different one at times (if caller does not operate on * selection).
use_handleCheck selection state of individual handles, otherwise always update both handles if the key is selected.

Definition at line 4049 of file curve.cc.

References ELEM, BezTriple::f1, BezTriple::f2, BezTriple::f3, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM, HD_FREE, HD_VECT, SEL_F1, SEL_F2, and SEL_F3.

Referenced by BKE_nurb_handles_test(), createTransGPencil_curves(), graphedit_activekey_handles_cb(), and testhandles_fcurve().

◆ BKE_nurb_bpoint_calc_normal()

void BKE_nurb_bpoint_calc_normal ( struct Nurb nu,
BPoint bp,
float  r_normal[3] 
)

◆ BKE_nurb_bpoint_calc_plane()

void BKE_nurb_bpoint_calc_plane ( struct Nurb nu,
BPoint bp,
float  r_plane[3] 
)

◆ BKE_nurb_bpoint_get_next()

BPoint* BKE_nurb_bpoint_get_next ( Nurb nu,
BPoint bp 
)

◆ BKE_nurb_bpoint_get_prev()

BPoint* BKE_nurb_bpoint_get_prev ( Nurb nu,
BPoint bp 
)

◆ BKE_nurb_calc_length()

float BKE_nurb_calc_length ( const Nurb nu,
int  resolution 
)

◆ BKE_nurb_check_valid_u()

bool BKE_nurb_check_valid_u ( const Nurb nu)

◆ BKE_nurb_check_valid_uv()

bool BKE_nurb_check_valid_uv ( const Nurb nu)

Definition at line 4801 of file curve.cc.

References BKE_nurb_check_valid_u(), BKE_nurb_check_valid_v(), and Nurb::pntsv.

◆ BKE_nurb_check_valid_v()

bool BKE_nurb_check_valid_v ( const Nurb nu)

Definition at line 4793 of file curve.cc.

References Nurb::flagv, nurb_check_valid(), Nurb::orderv, Nurb::pntsv, Nurb::type, and Valid.

Referenced by BKE_nurb_check_valid_uv(), and makeknots().

◆ BKE_nurb_copy()

Nurb* BKE_nurb_copy ( struct Nurb src,
int  pntsu,
int  pntsv 
)

Copy the nurb but allow for different number of points (to be copied after this).

Definition at line 701 of file curve.cc.

References Nurb::bezt, Nurb::bp, Nurb::knotsu, Nurb::knotsv, MEM_malloc_arrayN, MEM_mallocN, Nurb::pntsu, Nurb::pntsv, src, and SWAP.

Referenced by adduplicateflagNurb(), curve_delete_segments(), and ed_editcurve_addvert().

◆ BKE_nurb_direction_switch()

void BKE_nurb_direction_switch ( Nurb nu)

◆ BKE_nurb_duplicate()

Nurb* BKE_nurb_duplicate ( const Nurb nu)

◆ BKE_nurb_free()

void BKE_nurb_free ( Nurb nu)

◆ BKE_nurb_handle_calc()

void BKE_nurb_handle_calc ( struct BezTriple bezt,
struct BezTriple prev,
struct BezTriple next,
bool  is_fcurve,
char  smoothing 
)

Recalculate the handles of a nurb bezier-triple. Acts based on handle selection with SELECT flag. To use a different flag, use BKE_nurb_handle_calc_ex().

Definition at line 3978 of file curve.cc.

References calchandleNurb_intern(), next, blender::meshintersect::prev(), and SELECT.

Referenced by BKE_gpencil_editcurve_recalculate_handles(), BKE_nurb_handle_calc_simple(), calc_keyHandles(), mask_calc_point_handle(), and points_to_bezier().

◆ BKE_nurb_handle_calc_ex()

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 
)

Variant of BKE_nurb_handle_calc() that allows calculating based on a different select flag.

Parameters
handle_sel_flagThe flag (bezt.f1/2/3) value to use to determine selection. Usually SELECT, but may want to use a different one at times (if caller does not operate on selection).

Definition at line 3984 of file curve.cc.

References calchandleNurb_intern(), next, and blender::meshintersect::prev().

Referenced by BKE_fcurve_handles_recalc_ex().

◆ BKE_nurb_handle_calc_simple()

void BKE_nurb_handle_calc_simple ( struct Nurb nu,
struct BezTriple bezt 
)

Similar to BKE_nurb_handle_calc but for curves and figures out the previous and next for us.

Definition at line 4025 of file curve.cc.

References BKE_nurb_bezt_get_next(), BKE_nurb_bezt_get_prev(), BKE_nurb_handle_calc(), next, Nurb::pntsu, and blender::meshintersect::prev().

Referenced by adduplicateflagNurb(), and BKE_nurb_handle_calc_simple_auto().

◆ BKE_nurb_handle_calc_simple_auto()

void BKE_nurb_handle_calc_simple_auto ( Nurb nu,
BezTriple bezt 
)

◆ BKE_nurb_handle_smooth_fcurve()

void BKE_nurb_handle_smooth_fcurve ( BezTriple bezt,
int  total,
bool  cyclic 
)

Definition at line 3929 of file curve.cc.

References bezier_handle_calc_smooth_fcurve(), count, and is_free_auto_point().

Referenced by BKE_fcurve_handles_recalc_ex().

◆ BKE_nurb_handles_autocalc()

void BKE_nurb_handles_autocalc ( Nurb nu,
uint8_t  flag 
)

◆ BKE_nurb_handles_calc()

void BKE_nurb_handles_calc ( Nurb nu)

◆ BKE_nurb_handles_test()

void BKE_nurb_handles_test ( Nurb nu,
const bool  use_handle,
const bool  use_around_local 
)

◆ BKE_nurb_index_from_uv()

int BKE_nurb_index_from_uv ( Nurb nu,
int  u,
int  v 
)

Definition at line 942 of file curve.cc.

References CU_NURB_CYCLIC, Nurb::flagu, Nurb::flagv, mod_i(), Nurb::pntsu, Nurb::pntsv, and v.

Referenced by curve_select_shortest_path_surf().

◆ BKE_nurb_index_to_uv()

void BKE_nurb_index_to_uv ( Nurb nu,
int  index,
int *  r_u,
int *  r_v 
)

Definition at line 964 of file curve.cc.

References BLI_assert, Nurb::pntsu, and Nurb::pntsv.

Referenced by curve_select_shortest_path_surf().

◆ BKE_nurb_knot_calc_u()

void BKE_nurb_knot_calc_u ( Nurb nu)

◆ BKE_nurb_knot_calc_v()

void BKE_nurb_knot_calc_v ( Nurb nu)

◆ BKE_nurb_makeCurve()

void BKE_nurb_makeCurve ( const Nurb nu,
float coord_array,
float tilt_array,
float radius_array,
float weight_array,
int  resolu,
int  stride 
)

◆ BKE_nurb_makeFaces()

void BKE_nurb_makeFaces ( const Nurb nu,
float coord_array,
int  rowstride,
int  resolu,
int  resolv 
)

◆ BKE_nurb_minmax()

void BKE_nurb_minmax ( const Nurb nu,
bool  use_radius,
float  min[3],
float  max[3] 
)

◆ BKE_nurb_order_clamp_u()

bool BKE_nurb_order_clamp_u ( struct Nurb nu)

◆ BKE_nurb_order_clamp_v()

bool BKE_nurb_order_clamp_v ( struct Nurb nu)

Definition at line 4823 of file curve.cc.

References max_ii(), Nurb::orderv, and Nurb::pntsv.

Referenced by adduplicateflagNurb(), curve_delete_segments(), and ed_surf_delete_selected().

◆ BKE_nurb_points_add()

void BKE_nurb_points_add ( struct Nurb nu,
int  number 
)

Be sure to call BKE_nurb_knot_calc_u / BKE_nurb_knot_calc_v after this.

Definition at line 915 of file curve.cc.

References Nurb::bp, MEM_recallocN, Nurb::pntsu, and BPoint::radius.

Referenced by gpencil_stroke_to_path().

◆ BKE_nurb_project_2d()

void BKE_nurb_project_2d ( Nurb nu)

◆ BKE_nurb_type_convert()

bool BKE_nurb_type_convert ( struct Nurb nu,
short  type,
bool  use_handles,
const char **  r_err_msg 
)

◆ BKE_nurb_valid_message()

bool BKE_nurb_valid_message ( const int  pnts,
const short  order,
const short  flag,
const short  type,
const bool  is_surf,
const int  dir,
char *  message_dst,
const size_t  maxncpy 
)

◆ BKE_nurbList_duplicate()

void BKE_nurbList_duplicate ( ListBase lb1,
const ListBase lb2 
)

Definition at line 726 of file curve.cc.

References BKE_nurb_duplicate(), BKE_nurbList_free(), BLI_addtail(), and LISTBASE_FOREACH.

Referenced by curve_copy_data().

◆ BKE_nurbList_flag_set()

void BKE_nurbList_flag_set ( ListBase editnurb,
uint8_t  flag,
bool  set 
)

◆ BKE_nurbList_flag_set_from_flag()

bool BKE_nurbList_flag_set_from_flag ( ListBase editnurb,
uint8_t  from_flag,
uint8_t  flag 
)

Set flag for every point that already has from_flag set.

Definition at line 4389 of file curve.cc.

References CU_BEZIER, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, LISTBASE_FOREACH, and SET_FLAG_FROM_TEST.

Referenced by do_lasso_select_curve(), do_nurbs_box_select(), and nurbscurve_circle_select().

◆ BKE_nurbList_free()

void BKE_nurbList_free ( ListBase lb)

◆ BKE_nurbList_handles_autocalc()

void BKE_nurbList_handles_autocalc ( ListBase editnurb,
uint8_t  flag 
)

Definition at line 4205 of file curve.cc.

References BKE_nurb_handles_autocalc(), and LISTBASE_FOREACH.

◆ BKE_nurbList_handles_recalculate()

void BKE_nurbList_handles_recalculate ( ListBase editnurb,
const bool  calc_length,
const uint8_t  flag 
)

◆ BKE_nurbList_handles_set()

void BKE_nurbList_handles_set ( struct ListBase editnurb,
char  code 
)
Parameters
code
  • 1 (HD_AUTO): set auto-handle.
  • 2 (HD_VECT): set vector-handle.
  • 3 (HD_ALIGN) it toggle, vector-handles become HD_FREE.
  • 5: Set align, like 3 but no toggle.
  • 6: Clear align (setting HD_FREE), like 3 but no toggle.

Definition at line 4212 of file curve.cc.

References Freestyle::a, CU_BEZIER, ELEM, BezTriple::f1, BezTriple::f3, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_FREE, HD_VECT, LISTBASE_FOREACH, nurb_handles_calc__align_selected(), and SELECT.

Referenced by set_handle_type_exec().

◆ BKE_nurbList_index_get_co()

bool BKE_nurbList_index_get_co ( ListBase nurb,
const int  index,
float  r_co[3] 
)

Definition at line 562 of file curve.cc.

References copy_v3_v3(), CU_BEZIER, and LISTBASE_FOREACH.

Referenced by give_parvert().

◆ BKE_nurbList_verts_count()

int BKE_nurbList_verts_count ( const ListBase nurb)

◆ BKE_nurbList_verts_count_without_handles()

int BKE_nurbList_verts_count_without_handles ( const ListBase nurb)

Definition at line 604 of file curve.cc.

References LISTBASE_FOREACH.

◆ calc_bevel_sin_cos()

static void calc_bevel_sin_cos ( float  x1,
float  y1,
float  x2,
float  y2,
float r_sina,
float r_cosa 
)
static

Definition at line 1915 of file curve.cc.

References fabsf, M_PI_2, saacos(), sinf, sqrtf, x2, and y1.

Referenced by make_bevel_list_2D(), and make_bevel_list_segment_2D().

◆ calchandleNurb_intern()

static void calchandleNurb_intern ( BezTriple bezt,
const BezTriple prev,
const BezTriple next,
eBezTriple_Flag  handle_sel_flag,
bool  is_fcurve,
bool  skip_align,
char  fcurve_smoothing 
)
static

◆ calchandlesNurb_intern()

static void calchandlesNurb_intern ( Nurb nu,
eBezTriple_Flag  handle_sel_flag,
bool  skip_align 
)
static

◆ calcknots()

static void calcknots ( float knots,
const int  pnts,
const short  order,
const short  flag 
)
static

Definition at line 1164 of file curve.cc.

References CU_NURB_BEZIER, CU_NURB_CYCLIC, CU_NURB_ENDPOINT, is_cyclic(), min_ii(), offset, order, and r.

Referenced by makeknots().

◆ cu_isectLL()

static int cu_isectLL ( const float  v1[3],
const float  v2[3],
const float  v3[3],
const float  v4[3],
short  cox,
short  coy,
float lambda,
float mu,
float  vec[3] 
)
static

Definition at line 1793 of file curve.cc.

References v1, and v2.

Referenced by bevelinside().

◆ curve_blend_read_data()

static void curve_blend_read_data ( BlendDataReader reader,
ID id 
)
static

◆ curve_blend_read_expand()

static void curve_blend_read_expand ( BlendExpander expander,
ID id 
)
static

◆ curve_blend_read_lib()

static void curve_blend_read_lib ( BlendLibReader reader,
ID id 
)
static

◆ curve_blend_write()

static void curve_blend_write ( BlendWriter writer,
ID id,
const void id_address 
)
static

◆ curve_copy_data()

static void curve_copy_data ( Main bmain,
ID id_dst,
const ID id_src,
const int  flag 
)
static

◆ curve_editNurb_keyIndex_cv_free_cb()

static void curve_editNurb_keyIndex_cv_free_cb ( void val)
static

Definition at line 356 of file curve.cc.

References MEM_freeN, and CVKeyIndex::orig_cv.

Referenced by BKE_curve_editNurb_keyIndex_delCV(), and BKE_curve_editNurb_keyIndex_free().

◆ curve_foreach_id()

static void curve_foreach_id ( ID id,
LibraryForeachIDData data 
)
static

◆ curve_free_data()

static void curve_free_data ( ID id)
static

◆ curve_init_data()

static void curve_init_data ( ID id)
static

◆ forward_diff_bezier_cotangent()

static void forward_diff_bezier_cotangent ( const float  p0[3],
const float  p1[3],
const float  p2[3],
const float  p3[3],
float  p[3],
int  it,
int  stride 
)
static

Definition at line 1769 of file curve.cc.

References Freestyle::a, float(), normalize_v3(), POINTER_OFFSET, stride, and t.

Referenced by BKE_curve_bevelList_make().

◆ free_arrays()

static void free_arrays ( void buffer)
static

Definition at line 3424 of file curve.cc.

References buffer, and MEM_freeN.

Referenced by bezier_handle_calc_smooth_fcurve(), and tridiagonal_solve_with_limits().

◆ is_free_auto_point()

static bool is_free_auto_point ( BezTriple bezt)
static

Definition at line 3924 of file curve.cc.

References BezTriple::auto_handle_type, BEZT_IS_AUTOH, and HD_AUTOTYPE_NORMAL.

Referenced by BKE_nurb_handle_smooth_fcurve().

◆ make_bevel_list_2D()

static void make_bevel_list_2D ( BevList bl)
static

◆ make_bevel_list_3D()

static void make_bevel_list_3D ( BevList bl,
int  smooth_iter,
int  twist_mode 
)
static

◆ make_bevel_list_3D_minimum_twist()

static void make_bevel_list_3D_minimum_twist ( BevList bl)
static

◆ make_bevel_list_3D_tangent()

static void make_bevel_list_3D_tangent ( BevList bl)
static

◆ make_bevel_list_3D_zup()

static void make_bevel_list_3D_zup ( BevList bl)
static

◆ make_bevel_list_segment_2D()

static void make_bevel_list_segment_2D ( BevList bl)
static

◆ make_bevel_list_segment_3D()

static void make_bevel_list_segment_3D ( BevList bl)
static

◆ makeknots()

static void makeknots ( Nurb nu,
short  uv 
)
static

◆ minimum_twist_between_two_points()

static void minimum_twist_between_two_points ( BevPoint current_point,
BevPoint previous_point 
)
static

◆ nurb_check_valid()

static NURBSValidationStatus nurb_check_valid ( const int  pnts,
const short  order,
const short  flag,
const short  type,
const bool  is_surf,
int *  r_points_needed 
)
static

◆ nurb_handles_calc__align_selected()

static void nurb_handles_calc__align_selected ( Nurb nu)
static

Definition at line 4018 of file curve.cc.

References BKE_nurb_handles_calc(), and nurbList_handles_swap_select().

Referenced by BKE_nurbList_handles_set().

◆ nurbList_handles_swap_select()

static void nurbList_handles_swap_select ( Nurb nu)
static

Workaround BKE_nurb_handles_calc logic that makes unselected align to the selected handle.

Definition at line 4004 of file curve.cc.

References Nurb::bezt, BezTriple::f1, BezTriple::f3, Nurb::pntsu, and SELECT.

Referenced by nurb_handles_calc__align_selected().

◆ switch_endian_knots()

static void switch_endian_knots ( Nurb nu)
static

Definition at line 196 of file curve.cc.

References BLI_endian_switch_float_array(), KNOTSU, Nurb::knotsu, KNOTSV, and Nurb::knotsv.

Referenced by curve_blend_read_data().

◆ tilt_bezpart()

static void tilt_bezpart ( const BezTriple prevbezt,
const BezTriple bezt,
const Nurb nu,
float tilt_array,
float radius_array,
float weight_array,
int  resolu,
int  stride 
)
static

◆ tridiagonal_solve_with_limits()

static bool tridiagonal_solve_with_limits ( float a,
float b,
float c,
float d,
float h,
const float hmin,
const float hmax,
int  solve_count 
)
static

◆ vergxcobev()

static int vergxcobev ( const void a1,
const void a2 
)
static

Definition at line 1900 of file curve.cc.

References BevelSort::left, and x2.

Referenced by BKE_curve_bevelList_make().

Variable Documentation

◆ BKE_curve_batch_cache_dirty_tag_cb

void(* BKE_curve_batch_cache_dirty_tag_cb) (Curve *cu, int mode) ( Curve cu,
int  mode 
) = nullptr

Definition at line 5521 of file curve.cc.

Referenced by BKE_curve_batch_cache_dirty_tag(), and DRW_engines_register().

◆ BKE_curve_batch_cache_free_cb

void(* BKE_curve_batch_cache_free_cb) (Curve *cu) ( Curve cu) = nullptr

Definition at line 5522 of file curve.cc.

Referenced by BKE_curve_batch_cache_free(), and DRW_engines_register().

◆ IDType_ID_CU_LEGACY

IDTypeInfo IDType_ID_CU_LEGACY
Initial value:
= {
sizeof(Curve),
"Curve",
"curves",
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
Definition: BKE_idtype.h:39
#define BLT_I18NCONTEXT_ID_CURVE_LEGACY
#define FILTER_ID_CU_LEGACY
Definition: DNA_ID.h:903
@ INDEX_ID_CU_LEGACY
Definition: DNA_ID.h:1027
@ ID_CU_LEGACY
Definition: DNA_ID_enums.h:49
struct Curve Curve
static void curve_init_data(ID *id)
Definition: curve.cc:72
static void curve_blend_read_data(BlendDataReader *reader, ID *id)
Definition: curve.cc:206
static void curve_foreach_id(ID *id, LibraryForeachIDData *data)
Definition: curve.cc:130
static void curve_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int flag)
Definition: curve.cc:81
static void curve_blend_read_lib(BlendLibReader *reader, ID *id)
Definition: curve.cc:269
static void curve_blend_write(BlendWriter *writer, ID *id, const void *id_address)
Definition: curve.cc:146
static void curve_blend_read_expand(BlendExpander *expander, ID *id)
Definition: curve.cc:288
static void curve_free_data(ID *id)
Definition: curve.cc:108

Definition at line 306 of file curve.cc.