80 |
|
/* translate new specification */ |
81 |
|
if (xf(&thisxf, spec->xac, &xf_argv[spec->xav0]) != spec->xac) |
82 |
|
return(MG_ETYPE); |
83 |
+ |
/* check for vertex reversal */ |
84 |
+ |
if ((spec->rev = (thisxf.sca < 0.))) |
85 |
+ |
thisxf.sca = -thisxf.sca; |
86 |
|
/* compute total transformation */ |
87 |
|
if (spec->prev != NULL) { |
88 |
< |
multmat4(spec->xf.xfm, spec->prev->xf.xfm, thisxf.xfm); |
89 |
< |
spec->xf.sca = spec->prev->xf.sca * thisxf.sca; |
88 |
> |
multmat4(spec->xf.xfm, thisxf.xfm, spec->prev->xf.xfm); |
89 |
> |
spec->xf.sca = thisxf.sca * spec->prev->xf.sca; |
90 |
> |
spec->rev ^= spec->prev->rev; |
91 |
|
} else |
92 |
|
spec->xf = thisxf; |
93 |
|
spec->xid = comp_xfid(spec->xf.xfm); /* compute unique ID */ |