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>2003-10-23 20:15:05 +0400
committerTon Roosendaal <ton@blender.org>2003-10-23 20:15:05 +0400
commit9a625925da68ffc12eac24191c286ca96c63d882 (patch)
treec1aa337259bb262836db651a59ef3b1da14c10d9 /source/blender/src/view.c
parent5b018e669b357fd650d76daf120e0baea069098b (diff)
Cleaned up new constraint line drawing while grab/rot/scale
- uses callback mechanism to tell main drawing routine what to do - for that reason it doesn't use frontbuffer drawing anymore and it shows up in all 3d windows as well - it uses the same colors as for the grid axes (I tweaked it a bit, this is based at themecolors, and also should work in different background and grid color) - I disabled drawing lines through every object or every vertex. The current display method is clear and not distracting - when in 'local' transform (double press X/Y/Z), it displays a nice axis in the center of transform for vertices. In object-mode, local transform differs per object, so constraint lines and axes are drawn for each individually... Also: - fixed an old bug in rotate transform(). Using a constraint for rotation (X, Y, Z) didn't work for multiple objects at all!
Diffstat (limited to 'source/blender/src/view.c')
-rw-r--r--source/blender/src/view.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/source/blender/src/view.c b/source/blender/src/view.c
index 8b8f11bd2ff..6bfd945537e 100644
--- a/source/blender/src/view.c
+++ b/source/blender/src/view.c
@@ -227,61 +227,6 @@ void project_float(float *vec, float *adr)
}
}
-void project_short_infiniteline(float *vec, float *dir, short *adr1, short *adr2) /* clips infinite line to screen border */
-{
- float vp[2], vd[2], temp[2];
- short min, max;
- float tvec[3], tmp;
-
- project_float(vec, vp);
- VecMulf(dir, 10);
- VecAddf(tvec, vec, dir);
- project_float(tvec, temp);
-
- vd[0] = temp[0] - vp[0];
- vd[1] = temp[1] - vp[1];
-
- if ((vd[0] == 0) && (vd[1] == 0)){
- adr1[0] = adr2[0] = vp[0];
- adr1[1] = adr2[1] = vp[1];
- }
- else if (vd[0] == 0){
- adr1[0] = adr2[0] = vp[0];
- adr1[1] = 0;
- adr2[1] = curarea->winy;
- }
- else if (vd[1] == 0){
- adr1[0] = 0;
- adr2[0] = curarea->winx;
- adr1[1] = adr2[1] = vp[1];
- }
- else{
- tmp = vd[0];
- max = (curarea->winx - vp[0]) / tmp * vd[1] + vp[1];
- if (max > curarea->winy){
- tmp = vd[1];
- adr2[0] = ((curarea->winy) - vp[1]) / tmp * vd[0] + vp[0];
- adr2[1] = curarea->winy;
- }
- else{
- adr2[0] = curarea->winx;
- adr2[1] = max;
- }
-
- tmp = vd[0];
- min = (-vp[0]) / tmp * vd[1] + vp[1];
- if (min < 0){
- tmp = vd[1];
- adr1[0] = (-vp[1]) / tmp * vd[0] + vp[0];
- adr1[1] = 0;
- }
- else{
- adr1[0] = 0;
- adr1[1] = min;
- }
- }
-}
-
int boundbox_clip(float obmat[][4], BoundBox *bb)
{
/* return 1: draw */