diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-28 20:44:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-28 20:44:17 +0400 |
commit | c126bfba82dd434e2478d0ce4e5cf095f98b0c9a (patch) | |
tree | 52db2028b1160857bdfdbafcf44fe168dea28e59 /source/blender/editors/include/ED_view3d.h | |
parent | 9c156c550f40287eb0ece662bb8b80df67954f19 (diff) |
view3d - replace magic numbers with an enum to be used with mesh_foreachScreenVert, mesh_foreachScreenEdge since it wasnt clear how the values are used.
also resolved use of un-initialized variable.
Diffstat (limited to 'source/blender/editors/include/ED_view3d.h')
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 26c3ffed91c..476cf2ac109 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -75,6 +75,12 @@ typedef struct ViewDepths { char damaged; } ViewDepths; +/* enum for passing to foreach functions to test RV3D_CLIPPING */ +typedef enum eV3DClipTest { + V3D_CLIP_TEST_OFF = 0, /* clipping is off */ + V3D_CLIP_TEST_RV3D_CLIPPING = 1, /* clip single points */ + V3D_CLIP_TEST_REGION = 2 /* use for edges to check if both verts are in the view, but not RV3D_CLIPPING */ +} eV3DClipTest; float *give_cursor(struct Scene *scene, struct View3D *v3d); @@ -214,8 +220,8 @@ void ED_view3d_calc_camera_border(struct Scene *scene, struct ARegion *ar, struc void ED_view3d_calc_camera_border_size(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, struct RegionView3D *rv3d, float size_r[2]); /* drawobject.c iterators */ -void mesh_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct EditVert *eve, int x, int y, int index), void *userData, int clipVerts); -void mesh_foreachScreenEdge(struct ViewContext *vc, void (*func)(void *userData, struct EditEdge *eed, int x0, int y0, int x1, int y1, int index), void *userData, int clipVerts); +void mesh_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct EditVert *eve, int x, int y, int index), void *userData, eV3DClipTest clipVerts); +void mesh_foreachScreenEdge(struct ViewContext *vc, void (*func)(void *userData, struct EditEdge *eed, int x0, int y0, int x1, int y1, int index), void *userData, eV3DClipTest clipVerts); void mesh_foreachScreenFace(struct ViewContext *vc, void (*func)(void *userData, struct EditFace *efa, int x, int y, int index), void *userData); void nurbs_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct Nurb *nu, struct BPoint *bp, struct BezTriple *bezt, int beztindex, int x, int y), void *userData); void lattice_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct BPoint *bp, int x, int y), void *userData); |