diff options
author | Ton Roosendaal <ton@blender.org> | 2005-08-20 23:18:35 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-08-20 23:18:35 +0400 |
commit | dd5410162aa3eec61906febfdb0a550122cb2202 (patch) | |
tree | 27e702e1fb98fb6cb39e3a454ce052916b65bd5d /source/blender/makesdna | |
parent | ad5ac39ccc9941a77a69266eedb5f4218a779c32 (diff) |
New feature; User definable Clipping Planes.
Press ALT+B in 3d window, draw a rect, and it becomes a clipping
volume of 4 planes. You then can rotate the view anyway you like.
Works for each 3d window individually.
Disable it with another ALT+B press.
Commit is huge because it had to change all selection code as well.
The user-clipping planes are in 'eye space', the other clipping
happens in projected 'viewport space'.
Nice to notice is that the 'x=3200' convention (to denote a coordinate
is clipped) now is a define. Define value is still a number though... but
we now can get up to screens of 12000 pixels without issues!
Known issue; here it refuses to draw the 'object centers' or Lamp icons
within the clipping region. Can't find any reason for it... however, we
might move to non-pixmaps for it anyway.
Testing might reveil numerous issues, will be standby for it.
Curious? Check this http://www.blender.org/bf/rt4.jpg
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index c42703b4b17..871d0e3f536 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -60,8 +60,6 @@ typedef struct bDeformGroup { char name[32]; } bDeformGroup; -# -# typedef struct BoundBox { float vec[8][3]; } BoundBox; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 6bd0a91fbdf..f0fe608035a 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -39,6 +39,7 @@ struct Image; struct Tex; struct SpaceLink; struct Base; +struct BoundBox; /* This is needed to not let VC choke on near and far... old * proprietary MS extensions... */ @@ -123,13 +124,17 @@ typedef struct View3D { short twtype, twmode, twflag, twpad; float twmat[4][4]; + /* user defined clipping planes */ + float clip[4][4]; + struct BoundBox *clipbb; + /* afterdraw, for xray & transparent */ struct ListBase afterdraw; /* drawflags, denoting state */ short zbuf, transp, xray, pad2; } View3D; -/* View3D->flag */ +/* View3D->flag (short) */ #define V3D_MODE (16+32+64+128+256+512) #define V3D_DISPIMAGE 1 #define V3D_DISPBGPIC 2 @@ -145,6 +150,7 @@ typedef struct View3D { #define V3D_SELECT_OUTLINE 2048 #define V3D_ZBUF_SELECT 4096 #define V3D_GLOBAL_STATS 8192 +#define V3D_CLIPPING 16384 /* View3D->around */ #define V3D_CENTRE 0 |