diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 02:34:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 02:34:20 +0400 |
commit | c1570d9f499b3fa8e45e5de386a23aef54d4f054 (patch) | |
tree | d3358e19d3f13d0f2041996678f2bbb3751747ea /source/blender/editors/space_view3d | |
parent | 145289ad958e43b3f4f8475c581fca2180f6be88 (diff) |
code cleanup: missed some min/max use of float[3], also found case of DO_MIN/MAX re-reading same value from array 4 times when it can do once (use minf rather then MIN2, same for maxf)
Diffstat (limited to 'source/blender/editors/space_view3d')
4 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c index 2bb08a4b9b4..10ae96d87bf 100644 --- a/source/blender/editors/space_view3d/drawvolume.c +++ b/source/blender/editors/space_view3d/drawvolume.c @@ -156,7 +156,7 @@ static int convex(float *p0, float *up, float *a, float *b) return dot_v3v3(up, tmp) >= 0; } -void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3], float dx, GPUTexture *tex_shadow) +void draw_volume(ARegion *ar, GPUTexture *tex, float min[3], float max[3], int res[3], float dx, GPUTexture *tex_shadow) { RegionView3D *rv3d = ar->regiondata; diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 60a0d3bf12b..bfd293ee5b6 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2175,7 +2175,7 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op)) if (obedit) { - ok = minmax_verts(obedit, min, max); /* only selected */ + ok = ED_view3d_minmax_verts(obedit, min, max); /* only selected */ } else if (ob && (ob->mode & OB_MODE_POSE)) { if (ob->pose) { diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index f387e1dd844..29edc0158d6 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -186,7 +186,7 @@ void view3d_toolshelf_register(struct ARegionType *art); void view3d_tool_props_register(struct ARegionType *art); /* view3d_snap.c */ -int minmax_verts(struct Object *obedit, float *min, float *max); +int ED_view3d_minmax_verts(struct Object *obedit, float min[3], float max[3]); void VIEW3D_OT_snap_selected_to_grid(struct wmOperatorType *ot); void VIEW3D_OT_snap_selected_to_cursor(struct wmOperatorType *ot); @@ -202,7 +202,7 @@ ARegion *view3d_has_tools_region(ScrArea *sa); extern const char *view3d_context_dir[]; /* doc access */ /* draw_volume.c */ -void draw_volume(struct ARegion *ar, struct GPUTexture *tex, float *min, float *max, int res[3], float dx, struct GPUTexture *tex_shadow); +void draw_volume(struct ARegion *ar, struct GPUTexture *tex, float min[3], float max[3], int res[3], float dx, struct GPUTexture *tex_shadow); /* workaround for trivial but noticeable camera bug caused by imprecision * between view border calculation in 2D/3D space, workaround for bug [#28037]. diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 367b36db583..dfb3714948b 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -211,7 +211,7 @@ static void set_mapped_co(void *vuserdata, int index, const float co[3], /* mode flags: */ #define TM_ALL_JOINTS 1 /* all joints (for bones only) */ #define TM_SKIP_HANDLES 2 /* skip handles when control point is selected (for curves only) */ -static void make_trans_verts(Object *obedit, float *min, float *max, int mode) +static void make_trans_verts(Object *obedit, float min[3], float max[3], int mode) { Nurb *nu; BezTriple *bezt; @@ -1062,7 +1062,7 @@ void VIEW3D_OT_snap_cursor_to_center(wmOperatorType *ot) /* **************************************************** */ -int minmax_verts(Object *obedit, float *min, float *max) +int ED_view3d_minmax_verts(Object *obedit, float min[3], float max[3]) { TransVert *tv; float centroid[3], vec[3], bmat[3][3]; |