Blender V2.61 - r43446
|
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "MEM_guardedalloc.h"
#include "BLI_bpath.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "DNA_curve_types.h"
#include "DNA_material_types.h"
#include "DNA_key_types.h"
#include "DNA_scene_types.h"
#include "DNA_vfont_types.h"
#include "DNA_object_types.h"
#include "BKE_animsys.h"
#include "BKE_anim.h"
#include "BKE_curve.h"
#include "BKE_displist.h"
#include "BKE_font.h"
#include "BKE_global.h"
#include "BKE_key.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_material.h"
Go to the source code of this file.
Classes | |
struct | bevelsort |
Functions | |
static int | cu_isectLL (float *v1, float *v2, float *v3, float *v4, short cox, short coy, float *labda, float *mu, float *vec) |
void | unlink_curve (Curve *cu) |
void | BKE_free_editfont (Curve *cu) |
void | free_curve_editNurb_keyIndex (EditNurb *editnurb) |
void | free_curve_editNurb (Curve *cu) |
void | free_curve (Curve *cu) |
Curve * | add_curve (const char *name, int type) |
Curve * | copy_curve (Curve *cu) |
static void | extern_local_curve (Curve *cu) |
void | make_local_curve (Curve *cu) |
ListBase * | curve_editnurbs (Curve *cu) |
short | curve_type (Curve *cu) |
void | update_curve_dimension (Curve *cu) |
void | test_curve_type (Object *ob) |
void | tex_space_curve (Curve *cu) |
int | count_curveverts (ListBase *nurb) |
int | count_curveverts_without_handles (ListBase *nurb) |
void | freeNurb (Nurb *nu) |
void | freeNurblist (ListBase *lb) |
Nurb * | duplicateNurb (Nurb *nu) |
void | duplicateNurblist (ListBase *lb1, ListBase *lb2) |
void | test2DNurb (Nurb *nu) |
void | minmaxNurb (Nurb *nu, float *min, float *max) |
void | addNurbPoints (Nurb *nu, int number) |
void | addNurbPointsBezier (Nurb *nu, int number) |
static void | calcknots (float *knots, const short pnts, const short order, const short flag) |
static void | makecyclicknots (float *knots, short pnts, short order) |
static void | makeknots (Nurb *nu, short uv) |
void | nurbs_knot_calc_u (Nurb *nu) |
void | nurbs_knot_calc_v (Nurb *nu) |
static void | basisNurb (float t, short order, short pnts, float *knots, float *basis, int *start, int *end) |
void | makeNurbfaces (Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv) |
void | makeNurbcurve (Nurb *nu, float *coord_array, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride) |
void | forward_diff_bezier (float q0, float q1, float q2, float q3, float *p, int it, int stride) |
static void | forward_diff_bezier_cotangent (float *p0, float *p1, float *p2, float *p3, float *p, int it, int stride) |
float * | make_orco_surf (Object *ob) |
float * | make_orco_curve (Scene *scene, Object *ob) |
void | makebevelcurve (Scene *scene, Object *ob, ListBase *disp, int forRender) |
static short | bevelinside (BevList *bl1, 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 *sina, float *cosa) |
static void | alfa_bezpart (BezTriple *prevbezt, BezTriple *bezt, Nurb *nu, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride) |
static void | bevel_list_cyclic_fix_3D (BevList *bl) |
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 | 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) |
void | makeBevelList (Object *ob) |
void | calchandleNurb (BezTriple *bezt, BezTriple *prev, BezTriple *next, int mode) |
void | calchandlesNurb (Nurb *nu) |
void | testhandlesNurb (Nurb *nu) |
void | autocalchandlesNurb (Nurb *nu, int flag) |
void | autocalchandlesNurb_all (ListBase *editnurb, int flag) |
void | sethandlesNurb (ListBase *editnurb, short code) |
static void | swapdata (void *adr1, void *adr2, int len) |
void | switchdirectionNurb (Nurb *nu) |
float(* | curve_getVertexCos (Curve *UNUSED(cu), ListBase *lb, int *numVerts_r))[3] |
void | curve_applyVertexCos (Curve *UNUSED(cu), ListBase *lb, float(*vertexCos)[3]) |
float(* | curve_getKeyVertexCos (Curve *UNUSED(cu), ListBase *lb, float *key))[3] |
void | curve_applyKeyVertexTilts (Curve *UNUSED(cu), ListBase *lb, float *key) |
int | check_valid_nurb_u (struct Nurb *nu) |
int | check_valid_nurb_v (struct Nurb *nu) |
int | clamp_nurb_order_u (struct Nurb *nu) |
int | clamp_nurb_order_v (struct Nurb *nu) |
ListBase * | BKE_curve_nurbs (Curve *cu) |
int | minmax_curve (Curve *cu, float min[3], float max[3]) |
int | curve_center_median (Curve *cu, float cent[3]) |
int | curve_center_bounds (Curve *cu, float cent[3]) |
void | curve_translate (Curve *cu, float offset[3], int do_keys) |
void | curve_delete_material_index (Curve *cu, int index) |
Definition in file curve.c.
Curve* add_curve | ( | const char * | name, |
int | type | ||
) | [read] |
Definition at line 154 of file curve.c.
References Curve::actbox, alloc_libblock(), Curve::bb, BLI_strncpy(), CU_AUTOSPACE, CU_BACK, CU_DEFORM_BOUNDS_OFF, CU_FRONT, CU_PATH_RADIUS, CU_TWIST_MINIMUM, Curve::flag, Curve::fsize, G, get_builtin_font(), TextBox::h, VFont::id, ID_CU, Curve::len, Curve::linedist, MAXTEXTBOX, MEM_callocN(), MEM_mallocN(), OB_FONT, OB_SURF, Curve::pathlen, Curve::pos, Curve::resolu, Curve::resolv, Curve::size, Curve::smallcaps_scale, Curve::spacing, Curve::str, Curve::strinfo, Curve::tb, Curve::texflag, Curve::totbox, Curve::twist_mode, Curve::type, Curve::ulheight, unit_boundbox(), ID::us, Curve::vfont, Curve::vfontb, Curve::vfontbi, Curve::vfonti, TextBox::w, Curve::width, and Curve::wordspace.
Referenced by add_obdata_from_type(), and mesh_to_curve().
void addNurbPoints | ( | Nurb * | nu, |
int | number | ||
) |
Definition at line 591 of file curve.c.
References Nurb::bp, i, MEM_freeN(), MEM_mallocN(), Nurb::pntsu, and BPoint::radius.
void addNurbPointsBezier | ( | Nurb * | nu, |
int | number | ||
) |
Definition at line 611 of file curve.c.
References Nurb::bezt, i, MEM_freeN(), MEM_mallocN(), Nurb::pntsu, and BezTriple::radius.
static void alfa_bezpart | ( | BezTriple * | prevbezt, |
BezTriple * | bezt, | ||
Nurb * | nu, | ||
float * | tilt_array, | ||
float * | radius_array, | ||
float * | weight_array, | ||
int | resolu, | ||
int | stride | ||
) | [static] |
Definition at line 1645 of file curve.c.
References BezTriple::alfa, Nurb::bezt, CU_NURB_CYCLIC, Nurb::flagu, KEY_CU_EASE, key_curve_position_weights(), next, NULL, Nurb::pntsu, BezTriple::radius, Nurb::radius_interp, Nurb::tilt_interp, and BezTriple::weight.
Referenced by makeBevelList().
void autocalchandlesNurb | ( | Nurb * | nu, |
int | flag | ||
) |
Definition at line 2743 of file curve.c.
References Nurb::bezt, calchandlesNurb(), dist_to_line_v2(), BezTriple::f1, BezTriple::f3, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_VECT, i, len_v3v3(), NULL, Nurb::pntsu, and BezTriple::vec.
Referenced by autocalchandlesNurb_all().
void autocalchandlesNurb_all | ( | ListBase * | editnurb, |
int | flag | ||
) |
Definition at line 2814 of file curve.c.
References autocalchandlesNurb(), ListBase::first, and Nurb::next.
static void basisNurb | ( | float | t, |
short | order, | ||
short | pnts, | ||
float * | knots, | ||
float * | basis, | ||
int * | start, | ||
int * | end | ||
) | [static] |
Definition at line 748 of file curve.c.
References simple_enum_gen::d, credits_svn_gen::e, and i.
Referenced by makeNurbcurve(), and makeNurbfaces().
static void bevel_list_apply_tilt | ( | BevList * | bl | ) | [static] |
Definition at line 1773 of file curve.c.
References BevPoint::alfa, axis_angle_to_quat(), BevPoint::dir, mul_qt_qtqt(), normalize_qt(), BevList::nr, and BevPoint::quat.
Referenced by make_bevel_list_3D().
static void bevel_list_calc_bisect | ( | BevList * | bl | ) | [static] |
Definition at line 1734 of file curve.c.
References bisect_v3_v3v3v3(), BevPoint::dir, BevList::nr, and BevPoint::vec.
Referenced by make_bevel_list_3D_minimum_twist(), and make_bevel_list_3D_tangent().
static void bevel_list_cyclic_fix_3D | ( | BevList * | bl | ) | [static] |
Definition at line 1717 of file curve.c.
References copy_qt_qt(), copy_v3_v3(), BevPoint::dir, BevList::nr, BevPoint::quat, and BevPoint::tan.
Referenced by make_bevel_list_3D(), make_bevel_list_3D_tangent(), and makeBevelList().
static void bevel_list_flip_tangents | ( | BevList * | bl | ) | [static] |
Definition at line 1753 of file curve.c.
References angle_v2v2(), negate_v3(), BevList::nr, RAD2DEGF, and BevPoint::tan.
Referenced by make_bevel_list_3D_tangent().
static void bevel_list_smooth | ( | BevList * | bl, |
int | smooth_iter | ||
) | [static] |
Definition at line 1793 of file curve.c.
References angle_normalized_v3v3(), axis_angle_to_quat(), copy_qt_qt(), cross(), cross_v3_v3v3(), BevPoint::dir, interp_qt_qtqt(), mul_qt_qtqt(), mul_qt_v3(), normalize_qt(), BevList::nr, BevList::poly, and BevPoint::quat.
Referenced by make_bevel_list_3D().
Definition at line 1538 of file curve.c.
References copy_v3_v3(), cu_isectLL(), max, min, BevList::nr, and BevPoint::vec.
Referenced by makeBevelList().
Definition at line 3201 of file curve.c.
References curve_editnurbs(), Curve::editnurb, and Curve::nurb.
Referenced by calc_curvepath(), curve_calc_modifiers_post(), curve_calc_modifiers_pre(), curve_center_median(), curve_translate(), do_makeDispListCurveTypes(), ED_object_shape_key_remove(), give_parvert(), insert_curvekey(), minmax_curve(), and update_curve_dimension().
void BKE_free_editfont | ( | Curve * | cu | ) |
Definition at line 98 of file curve.c.
References EditFont::copybuf, EditFont::copybufinfo, Curve::editfont, MEM_freeN(), NULL, EditFont::oldstr, EditFont::oldstrinfo, EditFont::textbuf, and EditFont::textbufinfo.
Referenced by free_curve(), and free_editText().
static void calc_bevel_sin_cos | ( | float | x1, |
float | y1, | ||
float | x2, | ||
float | y2, | ||
float * | sina, | ||
float * | cosa | ||
) | [static] |
Definition at line 2482 of file curve.c.
References add_v3_v3v3(), dot(), dot_v3v3(), credits_svn_gen::e, ELEM, eps, BezTriple::f1, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM, HD_VECT, len(), len_v3(), len_v3v3(), madd_v3_v3v3fl(), mul_v3_fl(), normalize_v3(), NULL, SELECT, sub_v3_v3v3(), and BezTriple::vec.
Referenced by calc_keyHandles(), calchandles_fcurve(), and calchandlesNurb().
void calchandlesNurb | ( | Nurb * | nu | ) |
Definition at line 2672 of file curve.c.
References Nurb::bezt, calchandleNurb(), CU_BEZIER, CU_NURB_CYCLIC, Nurb::flagu, next, NULL, Nurb::pntsu, and Nurb::type.
Referenced by addvert_Nurb(), apply_objects_internal(), autocalchandlesNurb(), convertspline(), delete_exec(), gp_stroke_to_bezier(), join_curve_exec(), make_segment_exec(), recalcData_view3d(), sethandlesNurb(), smooth_exec(), subdividenurb(), testhandlesNurb(), toggle_cyclic_exec(), and update_curve_dimension().
static void calcknots | ( | float * | knots, |
const short | pnts, | ||
const short | order, | ||
const short | flag | ||
) | [static] |
Definition at line 634 of file curve.c.
References CU_NURB_BEZIER, CU_NURB_ENDPOINT, and floorf.
Referenced by makeknots().
int check_valid_nurb_u | ( | struct Nurb * | nu | ) |
Definition at line 3143 of file curve.c.
References CU_NURB_BEZIER, CU_NURB_CYCLIC, CU_NURBS, Nurb::flag, Nurb::flagu, NULL, Nurb::orderu, Nurb::pntsu, and Nurb::type.
Referenced by adduplicateflagNurb(), curve_to_displist(), makeBevelList(), and makeknots().
int check_valid_nurb_v | ( | struct Nurb * | nu | ) |
Definition at line 3157 of file curve.c.
References CU_NURB_BEZIER, CU_NURB_CYCLIC, CU_NURBS, Nurb::flag, Nurb::flagv, NULL, Nurb::orderv, Nurb::pntsv, and Nurb::type.
Referenced by adduplicateflagNurb(), and makeknots().
int clamp_nurb_order_u | ( | struct Nurb * | nu | ) |
Definition at line 3172 of file curve.c.
References CLAMP(), CU_NURB_BEZIER, CU_NURB_CYCLIC, Nurb::flagu, Nurb::orderu, and Nurb::pntsu.
Referenced by adduplicateflagNurb(), delete_exec(), deleteflagNurb(), and load_editNurb().
int clamp_nurb_order_v | ( | struct Nurb * | nu | ) |
Definition at line 3186 of file curve.c.
References CLAMP(), CU_NURB_BEZIER, CU_NURB_CYCLIC, Nurb::flagv, Nurb::orderv, and Nurb::pntsv.
Referenced by adduplicateflagNurb(), and deleteflagNurb().
Definition at line 191 of file curve.c.
References Curve::bb, Curve::bev, copy_key(), copy_libblock(), Curve::disp, duplicateNurblist(), Curve::editfont, Curve::editnurb, ListBase::first, Key::from, Curve::id, id_us_plus(), Curve::key, ListBase::last, Curve::mat, MEM_dupallocN(), NULL, Curve::nurb, Curve::path, Curve::selboxes, Curve::str, Curve::strinfo, Curve::tb, Curve::totcol, Curve::vfont, Curve::vfontb, Curve::vfontbi, and Curve::vfonti.
Referenced by convert_exec(), id_copy(), make_local_curve(), object_add_duplicate_internal(), separate_exec(), and single_obdata_users().
int count_curveverts | ( | ListBase * | nurb | ) |
Definition at line 413 of file curve.c.
References Nurb::bezt, Nurb::bp, ListBase::first, Nurb::next, Nurb::pntsu, and Nurb::pntsv.
Referenced by calc_shapeKeys(), curve_getKeyVertexCos(), curve_getVertexCos(), curve_surf_to_softbody(), curve_to_key(), insert_curvekey(), key_to_curve(), key_to_vertcos(), and vertcos_to_key().
int count_curveverts_without_handles | ( | ListBase * | nurb | ) |
Definition at line 428 of file curve.c.
References Nurb::bezt, Nurb::bp, ListBase::first, Nurb::next, Nurb::pntsu, and Nurb::pntsv.
static int cu_isectLL | ( | float * | v1, |
float * | v2, | ||
float * | v3, | ||
float * | v4, | ||
short | cox, | ||
short | coy, | ||
float * | labda, | ||
float * | mu, | ||
float * | vec | ||
) | [static] |
Definition at line 3116 of file curve.c.
References BPoint::alfa, BezTriple::alfa, Nurb::bezt, Nurb::bp, CU_BEZIER, ListBase::first, i, Nurb::next, Nurb::pntsu, Nurb::pntsv, and Nurb::type.
Definition at line 3060 of file curve.c.
References Nurb::bezt, Nurb::bp, co, copy_v3_v3(), CU_BEZIER, ListBase::first, i, Nurb::next, Nurb::pntsu, Nurb::pntsv, Nurb::type, BPoint::vec, and BezTriple::vec.
int curve_center_bounds | ( | Curve * | cu, |
float | cent[3] | ||
) |
Definition at line 3259 of file curve.c.
References INIT_MINMAX, max, mid_v3_v3v3(), min, and minmax_curve().
Referenced by object_origin_set_exec().
int curve_center_median | ( | Curve * | cu, |
float | cent[3] | ||
) |
Definition at line 3223 of file curve.c.
References add_v3_v3(), Nurb::bezt, BKE_curve_nurbs(), Nurb::bp, CU_BEZIER, ListBase::first, i, mul_v3_fl(), Nurb::next, Nurb::pntsu, Nurb::pntsv, Nurb::type, BPoint::vec, BezTriple::vec, and zero_v3().
Referenced by object_origin_set_exec().
void curve_delete_material_index | ( | Curve * | cu, |
int | index | ||
) |
Definition at line 3308 of file curve.c.
References Nurb::charidx, curve_type(), ListBase::first, i, Curve::len, Nurb::mat_nr, CharInfo::mat_nr, Nurb::next, Curve::nurb, OB_CURVE, OB_FONT, and Curve::strinfo.
Referenced by data_delete_material_index_id().
Definition at line 295 of file curve.c.
References Curve::editnurb, NULL, and EditNurb::nurbs.
Referenced by BKE_curve_nurbs(), calc_manipulator_stats(), createTransCurveVerts(), draw_object(), editCurve_to_undoCurve(), get_actNurb(), get_lastsel_nurb(), getTransformOrientation(), make_trans_verts(), makeBevelList(), makeDispListSurf(), material_slot_assign_exec(), material_slot_de_select(), nurbs_foreachScreenVert(), recalcData_view3d(), set_actNurb(), special_transvert_update(), stats_object_edit(), undoCurve_to_editCurve(), and v3d_editvertex_buts().
Definition at line 3085 of file curve.c.
References Nurb::bezt, Nurb::bp, co, copy_v3_v3(), cos(), count_curveverts(), CU_BEZIER, ListBase::first, i, MEM_mallocN(), Nurb::next, Nurb::pntsu, Nurb::pntsv, and Nurb::type.
Definition at line 3032 of file curve.c.
References Nurb::bezt, Nurb::bp, co, copy_v3_v3(), cos(), count_curveverts(), CU_BEZIER, i, MEM_mallocN(), Nurb::next, Nurb::pntsu, Nurb::pntsv, Nurb::type, BPoint::vec, and BezTriple::vec.
void curve_translate | ( | Curve * | cu, |
float | offset[3], | ||
int | do_keys | ||
) |
Definition at line 3271 of file curve.c.
References add_v3_v3(), Nurb::bezt, BKE_curve_nurbs(), Key::block, Nurb::bp, CU_BEZIER, KeyBlock::data, ListBase::first, i, Curve::key, KeyBlock::next, Nurb::next, Nurb::pntsu, Nurb::pntsv, KeyBlock::totelem, Nurb::type, BPoint::vec, and BezTriple::vec.
Referenced by object_origin_set_exec().
short curve_type | ( | Curve * | cu | ) |
Definition at line 304 of file curve.c.
References ListBase::first, Nurb::next, Curve::nurb, OB_CURVE, OB_FONT, OB_SURF, Nurb::pntsv, Curve::type, and Curve::vfont.
Referenced by acf_dscur_icon(), curve_delete_material_index(), and test_curve_type().
Definition at line 480 of file curve.c.
References Nurb::bezt, Nurb::bp, Nurb::knotsu, KNOTSU, Nurb::knotsv, KNOTSV, len(), MEM_mallocN(), NULL, Nurb::pntsu, and Nurb::pntsv.
Referenced by duplicateNurblist(), editCurve_to_undoCurve(), join_curve_exec(), load_editNurb(), make_editNurb(), and undoCurve_to_editCurve().
Definition at line 520 of file curve.c.
References BLI_addtail(), duplicateNurb(), ListBase::first, freeNurblist(), and Nurb::next.
Referenced by copy_curve().
static void extern_local_curve | ( | Curve * | cu | ) | [static] |
Definition at line 234 of file curve.c.
References extern_local_matarar(), id_lib_extern(), Curve::mat, Curve::totcol, Curve::vfont, Curve::vfontb, Curve::vfontbi, and Curve::vfonti.
Referenced by make_local_curve().
void forward_diff_bezier | ( | float | q0, |
float | q1, | ||
float | q2, | ||
float | q3, | ||
float * | p, | ||
int | it, | ||
int | stride | ||
) |
Definition at line 1076 of file curve.c.
References p.
Referenced by b_bone_spline_setup(), curve_to_displist(), curvemap_make_table(), draw_fcurve_curve_bezts(), M_Geometry_interpolate_bezier(), makeBevelList(), node_link_bezier_points(), and ui_link_bezier_points().
static void forward_diff_bezier_cotangent | ( | float * | p0, |
float * | p1, | ||
float * | p2, | ||
float * | p3, | ||
float * | p, | ||
int | it, | ||
int | stride | ||
) | [static] |
Definition at line 1103 of file curve.c.
References i, and normalize_v3().
Referenced by makeBevelList().
void free_curve | ( | Curve * | cu | ) |
Definition at line 135 of file curve.c.
References Curve::bev, BKE_free_animdata(), BKE_free_editfont(), BLI_freelistN(), Curve::disp, free_curve_editNurb(), free_path(), freedisplist(), freeNurblist(), MEM_freeN(), Curve::nurb, and unlink_curve().
Referenced by free_libblock().
void free_curve_editNurb | ( | Curve * | cu | ) |
Definition at line 124 of file curve.c.
References Curve::editnurb, free_curve_editNurb_keyIndex(), freeNurblist(), MEM_freeN(), NULL, and EditNurb::nurbs.
Referenced by free_curve(), and free_editNurb().
void free_curve_editNurb_keyIndex | ( | EditNurb * | editnurb | ) |
Definition at line 115 of file curve.c.
References BLI_ghash_free(), EditNurb::keyindex, MEM_freeN(), and NULL.
Referenced by free_curve_editNurb(), make_editNurb(), and separate_exec().
void freeNurb | ( | Nurb * | nu | ) |
Definition at line 445 of file curve.c.
References Nurb::bezt, Nurb::bp, Nurb::knotsu, Nurb::knotsv, MEM_freeN(), and NULL.
Referenced by delete_exec(), deleteflagNurb(), freeNurblist(), make_segment_exec(), and merge_2_nurb().
void freeNurblist | ( | ListBase * | lb | ) |
Definition at line 465 of file curve.c.
References ListBase::first, freeNurb(), ListBase::last, Nurb::next, next, and NULL.
Referenced by BKE_text_to_curve(), delete_exec(), duplicateNurblist(), free_curve(), free_curve_editNurb(), free_undoCurve(), load_editNurb(), make_editNurb(), separate_exec(), and undoCurve_to_editCurve().
static void make_bevel_list_3D | ( | BevList * | bl, |
int | smooth_iter, | ||
int | twist_mode | ||
) | [static] |
Definition at line 2027 of file curve.c.
References bevel_list_apply_tilt(), bevel_list_cyclic_fix_3D(), bevel_list_smooth(), CU_TWIST_MINIMUM, CU_TWIST_TANGENT, make_bevel_list_3D_minimum_twist(), make_bevel_list_3D_tangent(), make_bevel_list_3D_zup(), and BevList::poly.
Referenced by makeBevelList().
static void make_bevel_list_3D_minimum_twist | ( | BevList * | bl | ) | [static] |
Definition at line 1871 of file curve.c.
References angle(), angle_normalized_v3v3(), axis_angle_to_quat(), bevel_list_calc_bisect(), copy_qt_qt(), cross_v3_v3v3(), DEG2RADF, BevPoint::dir, mul_qt_qtqt(), mul_qt_v3(), normalize_v3(), BevList::nr, BevList::poly, BevPoint::quat, and vec_to_quat().
Referenced by make_bevel_list_3D().
static void make_bevel_list_3D_tangent | ( | BevList * | bl | ) | [static] |
Definition at line 1973 of file curve.c.
References bevel_list_calc_bisect(), bevel_list_cyclic_fix_3D(), bevel_list_flip_tangents(), copy_v3_v3(), cross_v3_v3v3(), BevPoint::dir, normalize_v3(), BevList::nr, BevList::poly, BevPoint::quat, BevPoint::tan, and tri_to_quat().
Referenced by make_bevel_list_3D().
static void make_bevel_list_3D_zup | ( | BevList * | bl | ) | [static] |
Definition at line 1850 of file curve.c.
References bisect_v3_v3v3v3(), BevPoint::dir, BevList::nr, BevPoint::quat, BevPoint::vec, and vec_to_quat().
Referenced by make_bevel_list_3D().
static void make_bevel_list_segment_3D | ( | BevList * | bl | ) | [static] |
Definition at line 2052 of file curve.c.
References BevPoint::alfa, axis_angle_to_quat(), copy_qt_qt(), copy_v3_v3(), BevPoint::dir, mul_qt_qtqt(), normalize_qt(), normalize_v3(), BevPoint::quat, sub_v3_v3v3(), BevPoint::vec, and vec_to_quat().
Referenced by makeBevelList().
void make_local_curve | ( | Curve * | cu | ) |
Definition at line 246 of file curve.c.
References BKE_id_lib_local_paths(), copy_curve(), Object::data, ELEM, extern_local_curve(), FALSE, ListBase::first, G, Object::id, Curve::id, id_clear_lib_data(), ID::lib, ID::next, NULL, Main::object, TRUE, and ID::us.
Referenced by id_make_local().
Definition at line 1226 of file curve.c.
References copy_v3_v3(), CU_UV_ORCO, Object::data, DL_CYCL_U, DL_CYCL_V, DL_INDEX3, DL_SURF, ListBase::first, Curve::flag, DispList::flag, freedisplist(), Curve::loc, makeDispListCurveTypes_forOrco(), MEM_mallocN(), DispList::next, DispList::nr, NULL, DispList::parts, Curve::size, DispList::type, and DispList::verts.
Referenced by add_orco_dm(), and get_object_orco().
float* make_orco_surf | ( | Object * | ob | ) |
Definition at line 1124 of file curve.c.
References CU_NURB_CYCLIC, CU_UV_ORCO, Object::data, ListBase::first, Curve::flag, Nurb::flagu, Nurb::flagv, Curve::loc, makeNurbfaces(), MEM_callocN(), MEM_freeN(), Nurb::next, Curve::nurb, Nurb::pntsu, Nurb::pntsv, Nurb::resolu, Curve::resolu_ren, Nurb::resolv, Curve::resolv_ren, and Curve::size.
Referenced by get_object_orco().
Definition at line 1310 of file curve.c.
References angle(), Curve::bevobj, Curve::bevresol, BLI_addtail(), cosf, CU_BACK, CU_FRONT, Object::data, Object::disp, DL_BACK_CURVE, DL_FRONT_CURVE, DL_POLY, DL_SEGM, ELEM, Curve::ext1, Curve::ext2, ListBase::first, Curve::flag, DispList::flag, freedisplist(), ListBase::last, M_PI, makeDispListCurveTypes(), makeDispListCurveTypes_forRender(), MEM_callocN(), MEM_dupallocN(), MEM_mallocN(), DispList::next, DispList::nr, NULL, OB_CURVE, DispList::parts, sinf, Object::size, DispList::type, Object::type, and DispList::verts.
Referenced by do_makeDispListCurveTypes().
void makeBevelList | ( | Object * | ob | ) |
Definition at line 2074 of file curve.c.
References BPoint::alfa, BevPoint::alfa, BezTriple::alfa, alfa_bezpart(), Curve::bev, bevel_list_cyclic_fix_3D(), bevelinside(), Nurb::bezt, bisect_v3_v3v3v3(), bevelsort::bl, BLI_addtail(), BLI_freelistN(), BLI_insertlinkbefore(), BLI_remlink(), Nurb::bp, calc_bevel_sin_cos(), check_valid_nurb_u(), copy_v3_v3(), BevPoint::cosa, CU_3D, CU_BEZIER, CU_DO_RADIUS, CU_DO_TILT, CU_NURB_CYCLIC, CU_NURBS, CU_POLY, CU_TWIST_TANGENT, curve_editnurbs(), Object::data, bevelsort::dir, BevPoint::dir, BevList::dupe_nr, BevPoint::dupe_tag, Curve::editnurb, fabs(), FALSE, ListBase::first, Curve::flag, Nurb::flagu, forward_diff_bezier(), forward_diff_bezier_cotangent(), G, BezTriple::h1, BezTriple::h2, HD_VECT, BevList::hole, bevelsort::left, len(), make_bevel_list_3D(), make_bevel_list_segment_3D(), makeNurbcurve(), MEM_callocN(), MEM_freeN(), MEM_mallocN(), min, BevList::next, Nurb::next, BevList::nr, NULL, Curve::nurb, OB_FONT, Nurb::pntsu, Nurb::pntsv, BevList::poly, BevPoint::quat, BevPoint::radius, BPoint::radius, BezTriple::radius, Nurb::resolu, Curve::resolu_ren, SEGMENTSU, BevPoint::sina, BevPoint::split_tag, SWAP, BevPoint::tan, TRUE, Curve::twist_mode, Curve::twist_smooth, Object::type, Nurb::type, BezTriple::vec, BPoint::vec, BevPoint::vec, vec_to_quat(), vergxcobev(), BPoint::weight, BezTriple::weight, and BevPoint::weight.
Referenced by do_makeDispListCurveTypes().
static void makecyclicknots | ( | float * | knots, |
short | pnts, | ||
short | order | ||
) | [static] |
static void makeknots | ( | Nurb * | nu, |
short | uv | ||
) | [static] |
Definition at line 706 of file curve.c.
References calcknots(), check_valid_nurb_u(), check_valid_nurb_v(), CU_NURB_CYCLIC, CU_NURBS, Nurb::flagu, Nurb::flagv, Nurb::knotsu, KNOTSU, Nurb::knotsv, KNOTSV, makecyclicknots(), MEM_callocN(), MEM_freeN(), NULL, Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, and Nurb::type.
Referenced by nurbs_knot_calc_u(), and nurbs_knot_calc_v().
void makeNurbcurve | ( | Nurb * | nu, |
float * | coord_array, | ||
float * | tilt_array, | ||
float * | radius_array, | ||
float * | weight_array, | ||
int | resolu, | ||
int | stride | ||
) |
Definition at line 974 of file curve.c.
References BPoint::alfa, basisNurb(), Nurb::bp, CU_NURB_CYCLIC, Nurb::flagu, i, Nurb::knotsu, KNOTSU, len(), MEM_callocN(), MEM_freeN(), MEM_mallocN(), NULL, Nurb::orderu, Nurb::pntsu, BPoint::radius, SEGMENTSU, sum(), BPoint::vec, and BPoint::weight.
Referenced by curve_to_displist(), makeBevelList(), and makeDispListSurf().
void makeNurbfaces | ( | Nurb * | nu, |
float * | coord_array, | ||
int | rowstride, | ||
int | resolu, | ||
int | resolv | ||
) |
Definition at line 811 of file curve.c.
References basisNurb(), Nurb::bp, CU_NURB_CYCLIC, Nurb::flagu, Nurb::flagv, i, Nurb::knotsu, KNOTSU, Nurb::knotsv, KNOTSV, len(), MEM_callocN(), MEM_freeN(), MEM_mallocN(), NULL, Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, sum(), and BPoint::vec.
Referenced by make_orco_surf(), and makeDispListSurf().
int minmax_curve | ( | Curve * | cu, |
float | min[3], | ||
float | max[3] | ||
) |
Definition at line 3212 of file curve.c.
References BKE_curve_nurbs(), ListBase::first, minmaxNurb(), Nurb::next, and NULL.
Referenced by curve_center_bounds().
void minmaxNurb | ( | Nurb * | nu, |
float * | min, | ||
float * | max | ||
) |
Definition at line 564 of file curve.c.
References Nurb::bezt, Nurb::bp, CU_BEZIER, DO_MINMAX, Nurb::pntsu, Nurb::pntsv, Nurb::type, BezTriple::vec, and BPoint::vec.
Referenced by minmax_curve().
void nurbs_knot_calc_u | ( | Nurb * | nu | ) |
Definition at line 738 of file curve.c.
References makeknots().
Referenced by adduplicateflagNurb(), addvert_Nurb(), convertspline(), delete_exec(), deleteflagNurb(), extrudeflagNurb(), make_segment_exec(), merge_2_nurb(), subdividenurb(), and toggle_cyclic_exec().
void nurbs_knot_calc_v | ( | Nurb * | nu | ) |
Definition at line 743 of file curve.c.
References makeknots().
Referenced by adduplicateflagNurb(), deleteflagNurb(), extrudeflagNurb(), merge_2_nurb(), spin_nurb(), subdividenurb(), and toggle_cyclic_exec().
void sethandlesNurb | ( | ListBase * | editnurb, |
short | code | ||
) |
Definition at line 2825 of file curve.c.
References Nurb::bezt, calchandlesNurb(), CU_BEZIER, ELEM, BezTriple::f1, BezTriple::f3, ListBase::first, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_FREE, Nurb::next, Nurb::pntsu, SELECT, and Nurb::type.
Referenced by set_handle_type_exec().
static void swapdata | ( | void * | adr1, |
void * | adr2, | ||
int | len | ||
) | [static] |
Definition at line 2903 of file curve.c.
References MEM_freeN(), and MEM_mallocN().
Referenced by switchdirectionNurb().
void switchdirectionNurb | ( | Nurb * | nu | ) |
Definition at line 2926 of file curve.c.
References BPoint::alfa, BezTriple::alfa, Nurb::bezt, Nurb::bp, CU_BEZIER, CU_NURBS, BezTriple::f1, BezTriple::f3, fabs(), BezTriple::h1, BezTriple::h2, Nurb::knotsu, KNOTSU, MEM_freeN(), MEM_mallocN(), Nurb::pntsu, Nurb::pntsv, SWAP, swapdata(), Nurb::type, and BezTriple::vec.
Referenced by make_segment_exec(), and switch_direction_exec().
void test2DNurb | ( | Nurb * | nu | ) |
Definition at line 535 of file curve.c.
References Nurb::bezt, Nurb::bp, CU_2D, CU_BEZIER, Nurb::flag, Nurb::pntsu, Nurb::pntsv, Nurb::type, BezTriple::vec, and BPoint::vec.
Referenced by addvert_Nurb(), make_editNurb(), recalcData_view3d(), special_transvert_update(), translateflagNurb(), update_curve_dimension(), and v3d_editvertex_buts().
void test_curve_type | ( | Object * | ob | ) |
Definition at line 348 of file curve.c.
References curve_type(), Object::data, OB_CURVE, Object::type, and update_curve_dimension().
void testhandlesNurb | ( | Nurb * | nu | ) |
Definition at line 2700 of file curve.c.
References Nurb::bezt, calchandlesNurb(), CU_BEZIER, ELEM, BezTriple::f1, BezTriple::f2, BezTriple::f3, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM, HD_VECT, Nurb::pntsu, SELECT, and Nurb::type.
Referenced by createTransCurveVerts(), special_transvert_update(), and v3d_editvertex_buts().
void tex_space_curve | ( | Curve * | cu | ) |
Definition at line 356 of file curve.c.
References Curve::bb, boundbox_set_from_min_max(), CU_AUTOSPACE, Curve::disp, DL_INDEX3, DO_MINMAX, ListBase::first, INIT_MINMAX, Curve::loc, max, MEM_callocN(), mid_v3_v3v3(), min, DispList::next, DispList::nr, NULL, DispList::parts, Curve::rot, Curve::size, Curve::texflag, DispList::type, and DispList::verts.
Referenced by copy_texture_space(), do_makeDispListCurveTypes(), makeDispListSurf(), and minmax_object().
void unlink_curve | ( | Curve * | cu | ) |
Definition at line 73 of file curve.c.
References Key::id, VFont::id, Material::id, Curve::key, Curve::mat, NULL, Curve::totcol, ID::us, Curve::vfont, Curve::vfontb, Curve::vfontbi, and Curve::vfonti.
Referenced by free_curve(), and free_object().
void update_curve_dimension | ( | Curve * | cu | ) |
Definition at line 326 of file curve.c.
References BKE_curve_nurbs(), calchandlesNurb(), CU_2D, CU_3D, CU_BEZIER, ListBase::first, Curve::flag, Nurb::flag, Nurb::next, test2DNurb(), and Nurb::type.
Referenced by test_curve_type().
static int vergxcobev | ( | const void * | a1, |
const void * | a2 | ||
) | [static] |