- added a call calc_meshverts_ext_f2(void) which:
- projects vertices without clipping code (xs at 3200) - sets flag in editvert ( eve->f & 2) when it is not visible general note: that flag is only valid after the calc_meshverts_ext_f2 call. it is a free flag. be aware that selection is stored in bit 1 (eve->f & 1)
This commit is contained in:
@@ -52,6 +52,7 @@ void drawcamera(struct Object *ob);
|
||||
void calc_lattverts_ext(void);
|
||||
void calc_meshverts(void);
|
||||
void calc_meshverts_ext(void);
|
||||
void calc_meshverts_ext_f2(void);
|
||||
void calc_nurbverts_ext(void);
|
||||
void tekenvertices(short sel);
|
||||
void tekenvertices_ext(int mode);
|
||||
|
@@ -916,6 +916,7 @@ static void drawlattice(Object *ob)
|
||||
|
||||
/* ***************** ******************** */
|
||||
|
||||
/* window coord, assuming all matrices are set OK */
|
||||
void calc_meshverts(void)
|
||||
{
|
||||
EditVert *eve;
|
||||
@@ -937,6 +938,7 @@ void calc_meshverts(void)
|
||||
MTC_Mat4SwapMat4(G.vd->persmat, mat);
|
||||
}
|
||||
|
||||
/* window coord for current window, sets matrices temporal */
|
||||
void calc_meshverts_ext(void)
|
||||
{
|
||||
|
||||
@@ -947,6 +949,40 @@ void calc_meshverts_ext(void)
|
||||
|
||||
}
|
||||
|
||||
/* window coord for current window, sets matrices temporal, sets (eve->f & 2) when not visible */
|
||||
void calc_meshverts_ext_f2(void)
|
||||
{
|
||||
EditVert *eve;
|
||||
float mat[4][4];
|
||||
|
||||
/* matrices */
|
||||
areawinset(curarea->win);
|
||||
mymultmatrix(G.obedit->obmat);
|
||||
|
||||
if(G.edve.first==0) return;
|
||||
eve= G.edve.first;
|
||||
|
||||
MTC_Mat4SwapMat4(G.vd->persmat, mat);
|
||||
mygetsingmatrix(G.vd->persmat);
|
||||
|
||||
eve= G.edve.first;
|
||||
while(eve) {
|
||||
eve->f &= ~2;
|
||||
if(eve->h==0) {
|
||||
project_short_noclip(eve->co, &(eve->xs));
|
||||
if( eve->xs >= 0 && eve->ys >= 0 && eve->xs<curarea->winx && eve->ys<curarea->winy);
|
||||
else eve->f |= 2;
|
||||
}
|
||||
eve= eve->next;
|
||||
}
|
||||
|
||||
/* restore */
|
||||
MTC_Mat4SwapMat4(G.vd->persmat, mat);
|
||||
myloadmatrix(G.vd->viewmat);
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void calc_Nurbverts(Nurb *nurb)
|
||||
{
|
||||
Nurb *nu;
|
||||
|
Reference in New Issue
Block a user