Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-08-20 23:18:35 +0400
committerTon Roosendaal <ton@blender.org>2005-08-20 23:18:35 +0400
commitdd5410162aa3eec61906febfdb0a550122cb2202 (patch)
tree27e702e1fb98fb6cb39e3a454ce052916b65bd5d /source/blender/include/BSE_view.h
parentad5ac39ccc9941a77a69266eedb5f4218a779c32 (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/include/BSE_view.h')
-rw-r--r--source/blender/include/BSE_view.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/include/BSE_view.h b/source/blender/include/BSE_view.h
index 94f5266c4e3..e241f92143b 100644
--- a/source/blender/include/BSE_view.h
+++ b/source/blender/include/BSE_view.h
@@ -46,9 +46,11 @@ struct ScrArea;
void persp_general(int a);
void persp(int a);
-void view3d_get_object_project_mat(struct ScrArea *area, struct Object *ob, float mat[4][4]);
+/* note, the define below is still used for shorts, to calc distances... */
+#define IS_CLIPPED 12000
+void view3d_get_object_project_mat(struct ScrArea *area, struct Object *ob, float pmat[4][4], float vmat[4][4]);
void view3d_project_float(struct ScrArea *area, float *vec, float *adr, float mat[4][4]);
-void view3d_project_short(struct ScrArea *area, float *vec, short *adr, float mat[4][4]);
+void view3d_project_short_clip(struct ScrArea *area, float *vec, short *adr, float projmat[4][4], float viewmat[4][4]);
void view3d_project_short_noclip(struct ScrArea *area, float *vec, short *adr, float mat[4][4]);
void initgrabz(float x, float y, float z);
@@ -57,6 +59,7 @@ void project_short(float *vec, short *adr);
void project_short_noclip(float *vec, short *adr);
void project_int(float *vec, int *adr);
void project_float(float *vec, float *adr);
+
int boundbox_clip(float obmat[][4], struct BoundBox *bb);
void fdrawline(float x1, float y1, float x2, float y2);
void fdrawbox(float x1, float y1, float x2, float y2);