diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-03-30 04:08:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-03-30 04:08:33 +0400 |
commit | 1f58bfb8bebf207d3020ff474ac5e018c8179f25 (patch) | |
tree | cf365a66923b4a03bcfbf6ef43d07ccf6309a19e /source/blender/blenkernel | |
parent | 23ef10c705a21d86e06f64d7af06fddbd9a42928 (diff) |
Code cleanup: de-duplicate cotangent weight function & add arg sizes
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_fcurve.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_object.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 7 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index 13eca506d9e..046bb8e0e8d 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -250,7 +250,7 @@ void testhandles_fcurve(struct FCurve *fcu, const bool use_handle); void sort_time_fcurve(struct FCurve *fcu); short test_time_fcurve(struct FCurve *fcu); -void correct_bezpart(float *v1, float *v2, float *v3, float *v4); +void correct_bezpart(float v1[2], float v2[2], float v3[2], float v4[2]); /* -------- Evaluation -------- */ diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 2ad6c54fb67..c1a76b67ee3 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -129,7 +129,7 @@ bool BKE_boundbox_ray_hit_check(struct BoundBox *bb, const float ray_start[3], c struct BoundBox *BKE_object_boundbox_get(struct Object *ob); void BKE_object_dimensions_get(struct Object *ob, float vec[3]); -void BKE_object_dimensions_set(struct Object *ob, const float *value); +void BKE_object_dimensions_set(struct Object *ob, const float value[3]); void BKE_object_empty_draw_type_set(struct Object *ob, const int value); void BKE_object_boundbox_flag(struct Object *ob, int flag, int set); void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3], const bool use_hidden); diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 0ce2953a2e3..d56402525f0 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -1929,7 +1929,8 @@ static int vergxcobev(const void *a1, const void *a2) /* this function cannot be replaced with atan2, but why? */ -static void calc_bevel_sin_cos(float x1, float y1, float x2, float y2, float *sina, float *cosa) +static void calc_bevel_sin_cos(float x1, float y1, float x2, float y2, + float *r_sina, float *r_cosa) { float t01, t02, x3, y3; @@ -1967,8 +1968,8 @@ static void calc_bevel_sin_cos(float x1, float y1, float x2, float y2, float *si y3 /= t01; } - *sina = -y3 / t02; - *cosa = x3 / t02; + *r_sina = -y3 / t02; + *r_cosa = x3 / t02; } diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 88bd7d74743..be91cb5dc9d 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2519,7 +2519,7 @@ void BKE_object_dimensions_get(Object *ob, float vec[3]) } } -void BKE_object_dimensions_set(Object *ob, const float *value) +void BKE_object_dimensions_set(Object *ob, const float value[3]) { BoundBox *bb = NULL; |