diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-04 02:55:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-04 02:55:10 +0300 |
commit | 9dbb31383f424d669a05793bba614684080ac7e0 (patch) | |
tree | c2dcbd0df397248738133b0331b8f71dc6bce096 /source/blender/editors/space_view3d/drawobject.c | |
parent | 0559f4f3e78b2c3bbb98e1b6833b26ca7590fa47 (diff) |
remove shadowed definitions but keep them as zero this time.
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index c6a8feebe4d..e66c1b24419 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -316,7 +316,7 @@ static float cosval[32] ={ 1.00000000 }; -static void draw_xyz_wire(float *c, float size, int axis) +static void draw_xyz_wire(const float c[3], float size, int axis) { float v1[3]= {0.f, 0.f, 0.f}, v2[3] = {0.f, 0.f, 0.f}; float dim = size * 0.1; @@ -413,16 +413,16 @@ void drawaxes(float size, char drawtype) case OB_PLAINAXES: for (axis=0; axis<3; axis++) { - float v1[3]= {0.0, 0.0, 0.0}; - float v2[3]= {0.0, 0.0, 0.0}; - glBegin(GL_LINES); v1[axis]= size; v2[axis]= -size; glVertex3fv(v1); glVertex3fv(v2); - + + /* reset v1 & v2 to zero */ + v1[axis]= v2[axis]= 0.0f; + glEnd(); } break; @@ -478,10 +478,8 @@ void drawaxes(float size, char drawtype) case OB_ARROWS: default: for (axis=0; axis<3; axis++) { - float v1[3]= {0.0, 0.0, 0.0}; - float v2[3]= {0.0, 0.0, 0.0}; - int arrow_axis= (axis==0)?1:0; - + const int arrow_axis= (axis==0) ? 1:0; + glBegin(GL_LINES); v2[axis]= size; @@ -502,12 +500,16 @@ void drawaxes(float size, char drawtype) v2[axis]+= size*0.125; draw_xyz_wire(v2, size, axis); + + + /* reset v1 & v2 to zero */ + v1[arrow_axis]= v1[axis]= v2[axis]= 0.0f; } break; } } -void drawcircball(int mode, float *cent, float rad, float tmat[][4]) +void drawcircball(int mode, const float cent[3], float rad, float tmat[][4]) { float vec[3], vx[3], vy[3]; int a, tot=32; @@ -526,7 +528,7 @@ void drawcircball(int mode, float *cent, float rad, float tmat[][4]) } /* circle for object centers, special_color is for library or ob users */ -static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, float *co, int selstate, int special_color) +static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[3], int selstate, int special_color) { const float size= view3d_pixel_size(rv3d, co) * (float)U.obcenter_dia * 0.5f; |