Mesh selection in editmode didnt work proper with new ALT+B clip option.
This commit is contained in:
Ton Roosendaal 2005-09-29 21:31:47 +00:00
parent 0ef1b52130
commit d9478dcaf9
2 changed files with 4 additions and 4 deletions

@ -835,7 +835,6 @@ int view3d_test_clipping(View3D *v3d, float *vec)
float view[3]; float view[3];
VECCOPY(view, vec); VECCOPY(view, vec);
Mat4MulVecfl(v3d->viewmat, view);
if(0.0f < v3d->clip[0][3] + INPR(view, v3d->clip[0])) if(0.0f < v3d->clip[0][3] + INPR(view, v3d->clip[0]))
if(0.0f < v3d->clip[1][3] + INPR(view, v3d->clip[1])) if(0.0f < v3d->clip[1][3] + INPR(view, v3d->clip[1]))

@ -268,11 +268,12 @@ void view3d_get_object_project_mat(ScrArea *area, Object *ob, float pmat[4][4],
Mat4MulMat4(vmat, ob->obmat, vd->viewmat); Mat4MulMat4(vmat, ob->obmat, vd->viewmat);
Mat4MulMat4(pmat, vmat, vd->winmat1); Mat4MulMat4(pmat, vmat, vd->winmat1);
Mat4CpyMat4(vmat, ob->obmat);
} }
} }
/* projectmat brings it to window coords, viewmat to rotated view (eye space) */ /* projectmat brings it to window coords, wmat to rotated world space */
void view3d_project_short_clip(ScrArea *area, float *vec, short *adr, float projmat[4][4], float viewmat[4][4]) void view3d_project_short_clip(ScrArea *area, float *vec, short *adr, float projmat[4][4], float wmat[4][4])
{ {
View3D *v3d= area->spacedata.first; View3D *v3d= area->spacedata.first;
float fx, fy, vec4[4]; float fx, fy, vec4[4];
@ -282,7 +283,7 @@ void view3d_project_short_clip(ScrArea *area, float *vec, short *adr, float proj
/* clipplanes in eye space */ /* clipplanes in eye space */
if(v3d->flag & V3D_CLIPPING) { if(v3d->flag & V3D_CLIPPING) {
VECCOPY(vec4, vec); VECCOPY(vec4, vec);
Mat4MulVecfl(viewmat, vec4); Mat4MulVecfl(wmat, vec4);
if(view3d_test_clipping(v3d, vec4)) if(view3d_test_clipping(v3d, vec4))
return; return;
} }