Blender V2.61 - r43446
Defines | Functions

BKE_curve.h File Reference

Go to the source code of this file.

Defines

#define KNOTSU(nu)   ( (nu)->orderu+ (nu)->pntsu+ (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu-1) : 0) )
#define KNOTSV(nu)   ( (nu)->orderv+ (nu)->pntsv+ (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv-1) : 0) )
#define SEGMENTSU(nu)   ( ((nu)->flagu & CU_NURB_CYCLIC) ? (nu)->pntsu : (nu)->pntsu-1 )
#define SEGMENTSV(nu)   ( ((nu)->flagv & CU_NURB_CYCLIC) ? (nu)->pntsv : (nu)->pntsv-1 )
#define CU_DO_TILT(cu, nu)   (((nu->flag & CU_2D) && (cu->flag & CU_3D)==0) ? 0 : 1)
#define CU_DO_RADIUS(cu, nu)   ((CU_DO_TILT(cu, nu) || ((cu)->flag & CU_PATH_RADIUS) || (cu)->bevobj || (cu)->ext1!=0.0f || (cu)->ext2!=0.0f) ? 1:0)

Functions

void unlink_curve (struct Curve *cu)
void free_curve_editNurb_keyIndex (struct EditNurb *editnurb)
void free_curve_editNurb (struct Curve *cu)
void free_curve (struct Curve *cu)
void BKE_free_editfont (struct Curve *cu)
struct Curveadd_curve (const char *name, int type)
struct Curvecopy_curve (struct Curve *cu)
void make_local_curve (struct Curve *cu)
struct ListBasecurve_editnurbs (struct Curve *cu)
short curve_type (struct Curve *cu)
void test_curve_type (struct Object *ob)
void update_curve_dimension (struct Curve *cu)
void tex_space_curve (struct Curve *cu)
int count_curveverts (struct ListBase *nurb)
int count_curveverts_without_handles (struct ListBase *nurb)
void freeNurb (struct Nurb *nu)
void freeNurblist (struct ListBase *lb)
struct NurbduplicateNurb (struct Nurb *nu)
void duplicateNurblist (struct ListBase *lb1, struct ListBase *lb2)
void test2DNurb (struct Nurb *nu)
void minmaxNurb (struct Nurb *nu, float *min, float *max)
void nurbs_knot_calc_u (struct Nurb *nu)
void nurbs_knot_calc_v (struct Nurb *nu)
void makeNurbfaces (struct Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv)
void makeNurbcurve (struct 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)
float * make_orco_curve (struct Scene *scene, struct Object *ob)
float * make_orco_surf (struct Object *ob)
void makebevelcurve (struct Scene *scene, struct Object *ob, struct ListBase *disp, int forRender)
void makeBevelList (struct Object *ob)
void calchandleNurb (struct BezTriple *bezt, struct BezTriple *prev, struct BezTriple *next, int mode)
void calchandlesNurb (struct Nurb *nu)
void testhandlesNurb (struct Nurb *nu)
void autocalchandlesNurb (struct Nurb *nu, int flag)
void autocalchandlesNurb_all (ListBase *editnurb, int flag)
void sethandlesNurb (ListBase *editnurb, short code)
void switchdirectionNurb (struct Nurb *nu)
void addNurbPoints (struct Nurb *nu, int number)
void addNurbPointsBezier (struct Nurb *nu, int number)
float(* curve_getVertexCos (struct Curve *cu, struct ListBase *lb, int *numVerts_r))[3]
void curve_applyVertexCos (struct Curve *cu, struct ListBase *lb, float(*vertexCos)[3])
float(* curve_getKeyVertexCos (struct Curve *cu, struct ListBase *lb, float *key))[3]
void curve_applyKeyVertexTilts (struct Curve *cu, struct 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)
ListBaseBKE_curve_nurbs (struct Curve *cu)
int minmax_curve (struct Curve *cu, float min[3], float max[3])
int curve_center_median (struct Curve *cu, float cent[3])
int curve_center_bounds (struct Curve *cu, float cent[3])
void curve_translate (struct Curve *cu, float offset[3], int do_keys)
void curve_delete_material_index (struct Curve *cu, int index)

Detailed Description

Since:
March 2001
Author:
nzc

Definition in file BKE_curve.h.


Define Documentation

#define CU_DO_RADIUS (   cu,
  nu 
)    ((CU_DO_TILT(cu, nu) || ((cu)->flag & CU_PATH_RADIUS) || (cu)->bevobj || (cu)->ext1!=0.0f || (cu)->ext2!=0.0f) ? 1:0)

Definition at line 54 of file BKE_curve.h.

Referenced by makeBevelList().

#define CU_DO_TILT (   cu,
  nu 
)    (((nu->flag & CU_2D) && (cu->flag & CU_3D)==0) ? 0 : 1)

Definition at line 53 of file BKE_curve.h.

Referenced by makeBevelList().

#define KNOTSU (   nu)    ( (nu)->orderu+ (nu)->pntsu+ (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu-1) : 0) )
#define KNOTSV (   nu)    ( (nu)->orderv+ (nu)->pntsv+ (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv-1) : 0) )
#define SEGMENTSU (   nu)    ( ((nu)->flagu & CU_NURB_CYCLIC) ? (nu)->pntsu : (nu)->pntsu-1 )
#define SEGMENTSV (   nu)    ( ((nu)->flagv & CU_NURB_CYCLIC) ? (nu)->pntsv : (nu)->pntsv-1 )

Definition at line 51 of file BKE_curve.h.


Function Documentation

struct Curve* add_curve ( const char *  name,
int  type 
) [read]
void addNurbPoints ( struct 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 ( struct 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.

void autocalchandlesNurb ( struct Nurb nu,
int  flag 
)
void autocalchandlesNurb_all ( ListBase editnurb,
int  flag 
)

Definition at line 2814 of file curve.c.

References autocalchandlesNurb(), ListBase::first, and Nurb::next.

ListBase* BKE_curve_nurbs ( struct Curve cu)
void BKE_free_editfont ( struct Curve cu)
void calchandleNurb ( struct BezTriple bezt,
struct BezTriple prev,
struct BezTriple next,
int  mode 
)
void calchandlesNurb ( struct Nurb nu)
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)

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

struct Curve* copy_curve ( struct Curve cu) [read]
int count_curveverts ( struct ListBase nurb)
int count_curveverts_without_handles ( struct ListBase nurb)

Definition at line 428 of file curve.c.

References Nurb::bezt, Nurb::bp, ListBase::first, Nurb::next, Nurb::pntsu, and Nurb::pntsv.

void curve_applyKeyVertexTilts ( struct Curve cu,
struct ListBase lb,
float *  key 
)
void curve_applyVertexCos ( struct Curve cu,
struct ListBase lb,
float(*)  vertexCos[3] 
)
int curve_center_bounds ( struct 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 ( struct Curve cu,
float  cent[3] 
)
void curve_delete_material_index ( struct Curve cu,
int  index 
)
struct ListBase* curve_editnurbs ( struct Curve cu) [read]
float(* curve_getKeyVertexCos ( struct Curve cu,
struct ListBase lb,
float *  key 
) )[3]
float(* curve_getVertexCos ( struct Curve cu,
struct ListBase lb,
int *  numVerts_r 
) )[3]
void curve_translate ( struct Curve cu,
float  offset[3],
int  do_keys 
)
short curve_type ( struct Curve cu)
struct Nurb* duplicateNurb ( struct Nurb nu) [read]
void duplicateNurblist ( struct ListBase lb1,
struct ListBase lb2 
)

Definition at line 520 of file curve.c.

References BLI_addtail(), duplicateNurb(), ListBase::first, freeNurblist(), and Nurb::next.

Referenced by copy_curve().

void forward_diff_bezier ( float  q0,
float  q1,
float  q2,
float  q3,
float *  p,
int  it,
int  stride 
)
void free_curve ( struct Curve cu)
void free_curve_editNurb ( struct Curve cu)

Definition at line 124 of file curve.c.

Referenced by free_curve(), and free_editNurb().

void free_curve_editNurb_keyIndex ( struct 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 ( struct Nurb nu)
void freeNurblist ( struct ListBase lb)
void make_local_curve ( struct Curve cu)
float* make_orco_curve ( struct Scene scene,
struct Object ob 
)
float* make_orco_surf ( struct Object ob)
void makebevelcurve ( struct Scene scene,
struct Object ob,
struct ListBase disp,
int  forRender 
)
void makeBevelList ( struct Object ob)
void makeNurbcurve ( struct Nurb nu,
float *  coord_array,
float *  tilt_array,
float *  radius_array,
float *  weight_array,
int  resolu,
int  stride 
)
void makeNurbfaces ( struct Nurb nu,
float *  coord_array,
int  rowstride,
int  resolu,
int  resolv 
)
int minmax_curve ( struct 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 ( struct 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 ( struct Nurb nu)
void nurbs_knot_calc_v ( struct Nurb nu)
void sethandlesNurb ( ListBase editnurb,
short  code 
)
void switchdirectionNurb ( struct Nurb nu)
void test2DNurb ( struct Nurb nu)
void test_curve_type ( struct 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 ( struct Nurb nu)
void tex_space_curve ( struct Curve cu)
void unlink_curve ( struct Curve cu)
void update_curve_dimension ( struct Curve cu)