Fixed Constraint projection code in perspective mode. When using a planar constraints, it follows the movement of the mouse exactly instead of just casting on the plane.

In user terms: the motion on screen of the selection follows the motion of the mouse pointer.

Gives some errors when the constraint plane is nearly perpendicular to the view port though.

Added a debug print function for 4D vectors to arithb.c

Optimised the 3D -> view projection functions in view.c (a bit).
This commit is contained in:
2005-02-27 19:14:21 +00:00
parent db892de35f
commit cfd5439bc6
5 changed files with 60 additions and 14 deletions

View File

@@ -1285,17 +1285,20 @@ void Transform(int mode)
else if (G.qual == LR_CTRLKEY)
setConstraint(&Trans, mati, (APPLYCON|CONAXIS1|CONAXIS2));
break;
Trans.redraw = 1;
case YKEY:
if (G.qual == 0)
setConstraint(&Trans, mati, (APPLYCON|CONAXIS1));
else if (G.qual == LR_CTRLKEY)
setConstraint(&Trans, mati, (APPLYCON|CONAXIS0|CONAXIS2));
break;
Trans.redraw = 1;
case ZKEY:
if (G.qual == 0)
setConstraint(&Trans, mati, (APPLYCON|CONAXIS2));
else if (G.qual == LR_CTRLKEY)
setConstraint(&Trans, mati, (APPLYCON|CONAXIS0|CONAXIS1));
Trans.redraw = 1;
break;
case OKEY:
if (G.qual==LR_SHIFTKEY) {