Blender V5.0
curve.cc File Reference
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <optional>
#include "MEM_guardedalloc.h"
#include "BLI_ghash.h"
#include "BLI_index_range.hh"
#include "BLI_listbase.h"
#include "BLI_math_base_safe.h"
#include "BLI_math_geom.h"
#include "BLI_math_matrix.h"
#include "BLI_math_rotation.h"
#include "BLI_math_solvers.h"
#include "BLI_math_vector.h"
#include "BLI_math_vector_types.hh"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#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_curve.hh"
#include "BKE_curveprofile.h"
#include "BKE_idtype.hh"
#include "BKE_key.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_object_types.hh"
#include "BKE_vfont.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "BLO_read_write.hh"

Go to the source code of this file.

Classes

struct  BevelSort
class  Array< T, InlineBufferCapacity, Allocator >
class  MutableSpan< T >
class  Span< T >

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)

Typedefs

using float3
using float4x4

Enumerations

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

Functions

static void curve_init_data (ID *id)
static void curve_copy_data (Main *bmain, std::optional< Library * > owner_library, 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 curve_blend_read_data (BlendDataReader *reader, 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)
void BKE_curve_dimension_update (Curve *cu)
void BKE_curve_type_test (Object *ob, const bool dimension_update)
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)
static void calc_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 (Nurb *, BezTriple *bezt, float r_normal[3])
void BKE_nurb_bezt_calc_plane (Nurb *nu, BezTriple *bezt, float r_plane[3])
void BKE_nurb_bpoint_calc_normal (Nurb *nu, BPoint *bp, float r_normal[3])
void BKE_nurb_bpoint_calc_plane (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_alloc_u (Nurb *nu)
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)
uint BKE_curve_calc_coords_axis_len (const uint bezt_array_len, const uint resolu, const bool is_cyclic, const bool use_cyclic_duplicate_endpoint)
void BKE_curve_calc_coords_axis (const BezTriple *bezt_array, const uint bezt_array_len, const uint resolu, const bool is_cyclic, const bool use_cyclic_duplicate_endpoint, const uint axis, const uint 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 *bevp_curr, const BevPoint *bevp_prev)
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 void * allocate_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)
short BKE_nurb_bezt_handle_test_calc_flag (const BezTriple *bezt, const eBezTriple_Flag__Alias sel_flag, const eNurbHandleTest_Mode handle_mode)
void BKE_nurb_bezt_handle_test (BezTriple *bezt, const eBezTriple_Flag__Alias sel_flag, const eNurbHandleTest_Mode handle_mode, const bool use_around_local)
void BKE_nurb_handles_test (Nurb *nu, const eNurbHandleTest_Mode handle_mode, 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, eNurbHandleTest_Mode handle_mode, 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, MutableSpan< float3 > vert_coords)
Array< float3BKE_curve_nurbs_vert_coords_alloc (const ListBase *lb)
void BKE_curve_nurbs_vert_coords_apply_with_mat4 (ListBase *lb, const Span< float3 > vert_coords, const float4x4 &transform, const bool constrain_2d)
void BKE_curve_nurbs_vert_coords_apply (ListBase *lb, const Span< float3 > vert_coords, const bool constrain_2d)
Array< float3BKE_curve_nurbs_key_vert_coords_alloc (const ListBase *lb, const float *key)
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 (Nurb *nu)
bool BKE_nurb_order_clamp_v (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)
void * BKE_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)
static std::optional< blender::Bounds< blender::float3 > > calc_nurblist_bounds (const ListBase *nurbs, const bool use_radius)
std::optional< blender::Bounds< blender::float3 > > BKE_curve_minmax (const Curve *cu, bool use_radius)
bool BKE_curve_center_median (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 uint *remap, uint remap_len)
void BKE_curve_smooth_flag_set (Curve *cu, const bool use_smooth)
void BKE_curve_rect_from_textbox (const Curve *cu, const TextBox *tb, 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 33 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)

Referenced by BKE_curve_material_remap().

◆ p2_h1

#define p2_h1   ((p2) - 3)

◆ p2_h2

#define p2_h2   ((p2) + 3)

◆ SEL_F1

◆ SEL_F2

◆ SEL_F3

Typedef Documentation

◆ float3

Definition at line 619 of file BLI_math_vector_types.hh.

◆ float4x4

Definition at line 1012 of file BLI_math_matrix_types.hh.

Enumeration Type Documentation

◆ NURBSValidationStatus

enum class NURBSValidationStatus
strong
Enumerator
Valid 
AtLeastTwoPointsRequired 
MorePointsThanOrderRequired 
MoreRowsForBezierRequired 
MorePointsForBezierRequired 

Definition at line 71 of file curve.cc.

Function Documentation

◆ allocate_arrays()

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 3353 of file curve.cc.

References count, i, MEM_malloc_arrayN(), and name.

Referenced by bezier_handle_calc_smooth_fcurve(), and tridiagonal_solve_with_limits().

◆ basisNurb()

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

Definition at line 1199 of file curve.cc.

References e, and i.

Referenced by BKE_nurb_makeCurve(), and BKE_nurb_makeFaces().

◆ bevel_list_apply_tilt()

void bevel_list_apply_tilt ( BevList * bl)
static

◆ bevel_list_calc_bisect()

void bevel_list_calc_bisect ( BevList * bl)
static

◆ bevel_list_flip_tangents()

void bevel_list_flip_tangents ( BevList * bl)
static

◆ bevel_list_smooth()

void bevel_list_smooth ( BevList * bl,
int smooth_iter )
static

Smooth quaternions, this function should be optimized, it can get slow with many iterations.

Definition at line 2120 of file curve.cc.

References angle_normalized_v3v3(), axis_angle_to_quat(), BevList::bevpoints, copy_qt_qt(), cross, cross_v3_v3v3(), BevPoint::dir, interp_qt_qtqt(), mul_qt_qtqt(), mul_qt_v3(), normalize_qt(), BevList::nr, BevList::poly, BevPoint::quat, and smooth_iter().

Referenced by make_bevel_list_3D().

◆ bevelinside()

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

Definition at line 1791 of file curve.cc.

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

Referenced by BKE_curve_bevelList_make().

◆ bevlist_firstlast_direction_calc_from_bpoint()

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

◆ bezier_calc_handle_adj()

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

Definition at line 3695 of file curve.cc.

References mul_v2_fl().

Referenced by bezier_handle_calc_smooth_fcurve().

◆ bezier_check_solve_end_handle()

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

◆ bezier_clamp()

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

Definition at line 3620 of file curve.cc.

References i, max_ff(), and min_ff().

Referenced by bezier_handle_calc_smooth_fcurve().

◆ bezier_eq_continuous()

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

Definition at line 3592 of file curve.cc.

References b, i, and l.

Referenced by bezier_handle_calc_smooth_fcurve().

◆ bezier_eq_noaccel_left()

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 3610 of file curve.cc.

References b, i, and l.

Referenced by bezier_handle_calc_smooth_fcurve().

◆ bezier_eq_noaccel_right()

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 3601 of file curve.cc.

References b, i, and l.

Referenced by bezier_handle_calc_smooth_fcurve().

◆ bezier_handle_calc_smooth_fcurve()

◆ bezier_lock_unknown()

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

Definition at line 3407 of file curve.cc.

References b, and i.

Referenced by bezier_handle_calc_smooth_fcurve(), and tridiagonal_solve_with_limits().

◆ bezier_output_handle()

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

Definition at line 3678 of file curve.cc.

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

Referenced by bezier_handle_calc_smooth_fcurve().

◆ bezier_output_handle_inner()

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

◆ bezier_relax_direction()

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 3392 of file curve.cc.

References b, count, i, and state.

Referenced by tridiagonal_solve_with_limits().

◆ bezier_restore_equation()

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 3414 of file curve.cc.

References b, and i.

Referenced by tridiagonal_solve_with_limits().

◆ BKE_curve_add()

◆ 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 5508 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 2534 of file curve.cc.

References b, 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::data, BevelSort::dir, BevPoint::dir, BevList::dupe_nr, BevPoint::dupe_tag, Curve::editnurb, ELEM, fabsf, Curve::flag, forward_diff_bezier_cotangent(), BezTriple::h1, BezTriple::h2, HD_VECT, BevList::hole, is_cyclic(), BevelSort::left, 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, normalize_v3(), BevList::nr, OB_FONT, BevPoint::offset, BevList::poly, BevPoint::quat, BevPoint::radius, BezTriple::radius, BPoint::radius, Curve::resolu_ren, Object::runtime, BevList::segbevcount, BevList::seglen, SEGMENTSU, sub_v3_v3v3(), BevPoint::tan, Curve::taperobj, BevPoint::tilt, BezTriple::tilt, BPoint::tilt, tilt_bezpart(), Curve::twist_mode, Curve::twist_smooth, Object::type, unit_qt(), BevPoint::vec, BezTriple::vec, BPoint::vec, vergxcobev(), BevPoint::weight, BezTriple::weight, and BPoint::weight.

Referenced by evaluate_curve_type_object().

◆ BKE_curve_calc_coords_axis()

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 )

Calculate an array for the entire curve (cyclic or non-cyclic).

Note
Call for each axis.
Parameters
use_cyclic_duplicate_endpointDuplicate values at the beginning & end of the array.

Definition at line 1613 of file curve.cc.

References BKE_curve_calc_coords_axis_len(), BKE_curve_forward_diff_bezier(), BLI_assert, i, is_cyclic(), POINTER_OFFSET, UNUSED_VARS_NDEBUG, and BezTriple::vec.

Referenced by BKE_curve_decimate_bezt_array().

◆ BKE_curve_calc_coords_axis_len()

uint 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 1603 of file curve.cc.

References is_cyclic().

Referenced by BKE_curve_calc_coords_axis(), and BKE_curve_decimate_bezt_array().

◆ 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 5430 of file curve.cc.

References fabsf, len, and v2.

Referenced by curve_eval_bezier_point().

◆ BKE_curve_dimension_update()

◆ BKE_curve_editfont_free()

void BKE_curve_editfont_free ( Curve * cu)

Frees edit-curve entirely.

Definition at line 316 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()

◆ BKE_curve_editNurbs_get_for_read()

const ListBase * BKE_curve_editNurbs_get_for_read ( const Curve * cu)

Definition at line 428 of file curve.cc.

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

Referenced by BKE_curve_nurbs_get_for_read(), and evaluate_surface_object().

◆ BKE_curve_eval_geometry()

◆ BKE_curve_forward_diff_bezier()

◆ 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 1697 of file curve.cc.

References float, and POINTER_OFFSET.

Referenced by blender::ed::sculpt_paint::paint_stroke_curve_end().

◆ BKE_curve_init()

◆ 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 uint * remap,
uint remap_len )

◆ BKE_curve_minmax()

◆ BKE_curve_nurb_active_get()

Nurb * BKE_curve_nurb_active_get ( Curve * cu)

◆ BKE_curve_nurb_active_set()

◆ BKE_curve_nurb_vert_active_get()

◆ BKE_curve_nurb_vert_active_set()

◆ BKE_curve_nurb_vert_active_validate()

◆ BKE_curve_nurb_vert_index_get()

int BKE_curve_nurb_vert_index_get ( const Nurb * nu,
const void * vert )

◆ BKE_curve_nurbs_get()

◆ BKE_curve_nurbs_get_for_read()

const ListBase * BKE_curve_nurbs_get_for_read ( const Curve * cu)

◆ BKE_curve_nurbs_key_vert_coords_alloc()

Array< float3 > BKE_curve_nurbs_key_vert_coords_alloc ( const ListBase * lb,
const float * key )

◆ 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()

◆ BKE_curve_nurbs_vert_coords_apply()

void BKE_curve_nurbs_vert_coords_apply ( ListBase * lb,
const Span< float3 > vert_coords,
const bool constrain_2d )

◆ BKE_curve_nurbs_vert_coords_apply_with_mat4()

void BKE_curve_nurbs_vert_coords_apply_with_mat4 ( ListBase * lb,
const Span< float3 > vert_coords,
const float4x4 & transform,
const bool constrain_2d )

◆ BKE_curve_nurbs_vert_coords_get()

void BKE_curve_nurbs_vert_coords_get ( const ListBase * lb,
MutableSpan< float3 > vert_coords )

Definition at line 4530 of file curve.cc.

References CU_BEZIER, i, LISTBASE_FOREACH, BezTriple::vec, and BPoint::vec.

Referenced by BKE_curve_nurbs_vert_coords_alloc().

◆ BKE_curve_rect_from_textbox()

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

◆ BKE_curve_smooth_flag_set()

void BKE_curve_smooth_flag_set ( Curve * cu,
const bool use_smooth )

Definition at line 5407 of file curve.cc.

References CU_SMOOTH, LISTBASE_FOREACH, and Curve::nurb.

Referenced by blender::ed::object::shade_smooth_exec().

◆ BKE_curve_texspace_calc()

◆ BKE_curve_texspace_ensure()

◆ 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 5226 of file curve.cc.

References BKE_curve_transform_ex(), and mat4_to_scale().

◆ BKE_curve_transform_ex()

◆ BKE_curve_translate()

◆ BKE_curve_type_test()

void BKE_curve_type_test ( Object * ob,
const bool dimension_update )

◆ BKE_curve_vert_active_get()

void * BKE_curve_vert_active_get ( Curve * cu)

Get active vert for curve.

Definition at line 4994 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 876 of file curve.cc.

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

Referenced by ed_editcurve_addvert().

◆ BKE_nurb_bezt_calc_normal()

◆ BKE_nurb_bezt_calc_plane()

◆ BKE_nurb_bezt_get_next()

◆ BKE_nurb_bezt_get_prev()

◆ BKE_nurb_bezt_handle_test()

void BKE_nurb_bezt_handle_test ( BezTriple * bezt,
eBezTriple_Flag__Alias sel_flag,
const eNurbHandleTest_Mode handle_mode,
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).
handle_modeInterpret the selection base on modes in eNurbHandleTest_Mode.

Definition at line 4048 of file curve.cc.

References BKE_nurb_bezt_handle_test_calc_flag(), ELEM, flag, 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(), graphedit_activekey_handles_cb(), and testhandles_fcurve().

◆ BKE_nurb_bezt_handle_test_calc_flag()

short BKE_nurb_bezt_handle_test_calc_flag ( const BezTriple * bezt,
const eBezTriple_Flag__Alias sel_flag,
const eNurbHandleTest_Mode handle_mode )

Return a flag for the handles to treat as "selected": 1 << 0, 1 << 1, 1 << 2 map to handles 1 2 & 3.

Definition at line 4015 of file curve.cc.

References BezTriple::f1, BezTriple::f2, BezTriple::f3, flag, NURB_HANDLE_TEST_EACH, NURB_HANDLE_TEST_KNOT_ONLY, NURB_HANDLE_TEST_KNOT_OR_EACH, SEL_F1, SEL_F2, and SEL_F3.

Referenced by blender::ed::transform::bezt_select_to_transform_triple_flag(), BKE_nurb_bezt_handle_test(), and BKE_nurbList_handles_set().

◆ BKE_nurb_bpoint_calc_normal()

◆ BKE_nurb_bpoint_calc_plane()

◆ BKE_nurb_bpoint_get_next()

◆ BKE_nurb_bpoint_get_prev()

◆ BKE_nurb_calc_length()

◆ 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 4782 of file curve.cc.

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

Referenced by evaluate_surface_object().

◆ BKE_nurb_check_valid_v()

bool BKE_nurb_check_valid_v ( const Nurb * nu)

Definition at line 4774 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 ( Nurb * src,
int pntsu,
int pntsv )

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

Definition at line 649 of file curve.cc.

References Nurb::bezt, Nurb::bp, Nurb::knotsu, Nurb::knotsv, MEM_malloc_arrayN(), MEM_mallocN(), Nurb::pntsu, and Nurb::pntsv.

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

◆ BKE_nurb_direction_switch()

◆ BKE_nurb_duplicate()

◆ BKE_nurb_free()

◆ BKE_nurb_handle_calc()

void BKE_nurb_handle_calc ( BezTriple * bezt,
BezTriple * prev,
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 3940 of file curve.cc.

References calchandleNurb_intern(), next, and SELECT.

Referenced by 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 ( BezTriple * bezt,
BezTriple * prev,
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 3946 of file curve.cc.

References calchandleNurb_intern(), and next.

◆ BKE_nurb_handle_calc_simple()

void BKE_nurb_handle_calc_simple ( Nurb * nu,
BezTriple * bezt )

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

Definition at line 3987 of file curve.cc.

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

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 3891 of file curve.cc.

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

◆ BKE_nurb_handles_autocalc()

◆ BKE_nurb_handles_calc()

◆ BKE_nurb_handles_test()

void BKE_nurb_handles_test ( Nurb * nu,
const eNurbHandleTest_Mode handle_mode,
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 890 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 912 of file curve.cc.

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

Referenced by curve_select_shortest_path_surf().

◆ BKE_nurb_knot_alloc_u()

void BKE_nurb_knot_alloc_u ( Nurb * nu)

Definition at line 1184 of file curve.cc.

References KNOTSU, Nurb::knotsu, and MEM_calloc_arrayN().

◆ BKE_nurb_knot_calc_u()

◆ BKE_nurb_knot_calc_v()

◆ 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 )
Parameters
coord_arrayHas to be (3 * 4 * pntsu * resolu) in size and zero-ed
tilt_arrayset when non-NULL
radius_arrayset when non-NULL

Definition at line 1467 of file curve.cc.

References basisNurb(), Nurb::bp, CU_NURB_CYCLIC, eps, Nurb::flagu, i, KNOTSU, Nurb::knotsu, len, madd_v3_v3fl(), MEM_calloc_arrayN(), MEM_freeN(), MEM_malloc_arrayN(), Nurb::orderu, Nurb::pntsu, POINTER_OFFSET, BPoint::radius, SEGMENTSU, sum(), BPoint::tilt, BPoint::vec, BPoint::weight, and zero_v3().

Referenced by BKE_curve_bevelList_make(), BKE_nurb_calc_length(), curve_to_displist(), and evaluate_surface_object().

◆ BKE_nurb_makeFaces()

void BKE_nurb_makeFaces ( const Nurb * nu,
float * coord_array,
int rowstride,
int resolu,
int resolv )
Parameters
coord_arrayhas to be (3 * 4 * resolu * resolv) in size, and zero-ed.

Definition at line 1275 of file curve.cc.

References basisNurb(), Nurb::bp, CU_NURB_CYCLIC, Nurb::flagu, Nurb::flagv, i, in, KNOTSU, Nurb::knotsu, KNOTSV, Nurb::knotsv, len, madd_v3_v3fl(), MEM_calloc_arrayN(), MEM_freeN(), MEM_malloc_arrayN(), Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, sum(), v, BPoint::vec, and zero_v3().

Referenced by evaluate_surface_object().

◆ BKE_nurb_order_clamp_u()

bool BKE_nurb_order_clamp_u ( Nurb * nu)

◆ BKE_nurb_order_clamp_v()

bool BKE_nurb_order_clamp_v ( Nurb * nu)

Definition at line 4804 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 ( Nurb * nu,
int number )

Be sure to call BKE_nurb_knot_calc_u / BKE_nurb_knot_calc_v after this.

Definition at line 863 of file curve.cc.

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

◆ BKE_nurb_project_2d()

◆ BKE_nurb_type_convert()

◆ 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 )

◆ BKE_nurbList_flag_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 4376 of file curve.cc.

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

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

◆ BKE_nurbList_free()

◆ BKE_nurbList_handles_autocalc()

void BKE_nurbList_handles_autocalc ( ListBase * editnurb,
uint8_t flag )

Definition at line 4186 of file curve.cc.

References BKE_nurb_handles_autocalc(), flag, 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 ( ListBase * editnurb,
eNurbHandleTest_Mode handle_mode,
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 4193 of file curve.cc.

References BKE_nurb_bezt_handle_test_calc_flag(), CU_BEZIER, ELEM, flag, 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 511 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 553 of file curve.cc.

References LISTBASE_FOREACH.

Referenced by BKE_object_as_kdtree().

◆ calc_bevel_sin_cos()

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

Definition at line 1867 of file curve.cc.

References fabsf, M_PI_2, safe_acosf(), sinf, and sqrtf.

Referenced by make_bevel_list_2D(), and make_bevel_list_segment_2D().

◆ calc_nurb_minmax()

void calc_nurb_minmax ( const Nurb * nu,
bool use_radius,
float min[3],
float max[3] )
static

◆ calc_nurblist_bounds()

std::optional< blender::Bounds< blender::float3 > > calc_nurblist_bounds ( const ListBase * nurbs,
const bool use_radius )
static

Definition at line 5083 of file curve.cc.

References BLI_listbase_is_empty(), calc_nurb_minmax(), LISTBASE_FOREACH, max, and min.

Referenced by BKE_curve_minmax().

◆ calchandleNurb_intern()

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()

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

◆ calcknots()

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

Definition at line 1112 of file curve.cc.

References CU_NURB_BEZIER, CU_NURB_CYCLIC, CU_NURB_ENDPOINT, flag, i, is_cyclic(), and min_ii().

Referenced by makeknots().

◆ cu_isectLL()

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 1745 of file curve.cc.

References v2.

Referenced by bevelinside().

◆ curve_blend_read_data()

◆ curve_blend_write()

◆ curve_copy_data()

void curve_copy_data ( Main * bmain,
std::optional< Library * > owner_library,
ID * id_dst,
const ID * id_src,
const int flag )
static

◆ curve_editNurb_keyIndex_cv_free_cb()

void curve_editNurb_keyIndex_cv_free_cb ( void * val)
static

◆ curve_foreach_id()

◆ curve_free_data()

◆ curve_init_data()

void curve_init_data ( ID * id)
static

Definition at line 79 of file curve.cc.

References BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.

Referenced by BKE_curve_init().

◆ forward_diff_bezier_cotangent()

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 1721 of file curve.cc.

References float, i, normalize_v3(), and POINTER_OFFSET.

Referenced by BKE_curve_bevelList_make().

◆ free_arrays()

void free_arrays ( void * buffer)
static

Definition at line 3386 of file curve.cc.

References MEM_freeN().

Referenced by bezier_handle_calc_smooth_fcurve(), and tridiagonal_solve_with_limits().

◆ is_free_auto_point()

bool is_free_auto_point ( BezTriple * bezt)
static

Definition at line 3886 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()

◆ make_bevel_list_3D()

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

◆ make_bevel_list_3D_minimum_twist()

◆ make_bevel_list_3D_tangent()

◆ make_bevel_list_3D_zup()

void make_bevel_list_3D_zup ( BevList * bl)
static

◆ make_bevel_list_segment_2D()

void make_bevel_list_segment_2D ( BevList * bl)
static

◆ make_bevel_list_segment_3D()

◆ makeknots()

◆ minimum_twist_between_two_points()

void minimum_twist_between_two_points ( BevPoint * bevp_curr,
const BevPoint * bevp_prev )
static

◆ nurb_check_valid()

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()

void nurb_handles_calc__align_selected ( Nurb * nu)
static

Definition at line 3980 of file curve.cc.

References BKE_nurb_handles_calc(), and nurbList_handles_swap_select().

Referenced by BKE_nurbList_handles_set().

◆ nurbList_handles_swap_select()

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 3966 of file curve.cc.

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

Referenced by nurb_handles_calc__align_selected().

◆ tilt_bezpart()

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()

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()

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

Definition at line 1852 of file curve.cc.

References BevelSort::left.

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 5499 of file curve.cc.

Referenced by BKE_curve_batch_cache_dirty_tag(), and DRW_module_init().

◆ BKE_curve_batch_cache_free_cb

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

Definition at line 5500 of file curve.cc.

Referenced by BKE_curve_batch_cache_free(), and DRW_module_init().

◆ IDType_ID_CU_LEGACY

IDTypeInfo IDType_ID_CU_LEGACY
Initial value:
= {
Curve::id_type,
sizeof(Curve),
"Curve",
N_("curves"),
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
Definition BKE_idtype.hh:47
#define BLT_I18NCONTEXT_ID_CURVE_LEGACY
#define FILTER_ID_OB
Definition DNA_ID.h:1214
#define FILTER_ID_MA
Definition DNA_ID.h:1208
#define FILTER_ID_CU_LEGACY
Definition DNA_ID.h:1201
#define FILTER_ID_VF
Definition DNA_ID.h:1222
@ INDEX_ID_CU_LEGACY
Definition DNA_ID.h:1326
#define FILTER_ID_KE
Definition DNA_ID.h:1232
static void curve_copy_data(Main *bmain, std::optional< Library * > owner_library, ID *id_dst, const ID *id_src, const int flag)
Definition curve.cc:88
static void curve_init_data(ID *id)
Definition curve.cc:79
static void curve_blend_read_data(BlendDataReader *reader, ID *id)
Definition curve.cc:208
static void curve_foreach_id(ID *id, LibraryForeachIDData *data)
Definition curve.cc:144
static void curve_blend_write(BlendWriter *writer, ID *id, const void *id_address)
Definition curve.cc:161
static void curve_free_data(ID *id)
Definition curve.cc:122
#define N_(msgid)

Definition at line 285 of file curve.cc.