40 |
|
register XF_SPEC *spec; |
41 |
|
register int n; |
42 |
|
int rv; |
43 |
– |
XF thisxf; |
43 |
|
|
44 |
|
if (ac == 1) { /* something with existing transform */ |
45 |
|
if ((spec = xf_context) == NULL) |
77 |
|
xf_context = spec; |
78 |
|
} |
79 |
|
/* translate new specification */ |
80 |
< |
if (xf(&thisxf, spec->xac, &xf_argv[spec->xav0]) != spec->xac) |
80 |
> |
if (xf(&spec->xf, spec->xac, &xf_argv[spec->xav0]) != spec->xac) |
81 |
|
return(MG_ETYPE); |
82 |
|
/* check for vertex reversal */ |
83 |
< |
if ((spec->rev = (thisxf.sca < 0.))) |
84 |
< |
thisxf.sca = -thisxf.sca; |
83 |
> |
if ((spec->rev = (spec->xf.sca < 0.))) |
84 |
> |
spec->xf.sca = -spec->xf.sca; |
85 |
|
/* compute total transformation */ |
86 |
|
if (spec->prev != NULL) { |
87 |
< |
multmat4(spec->xf.xfm, thisxf.xfm, spec->prev->xf.xfm); |
88 |
< |
spec->xf.sca = thisxf.sca * spec->prev->xf.sca; |
87 |
> |
multmat4(spec->xf.xfm, spec->xf.xfm, spec->prev->xf.xfm); |
88 |
> |
spec->xf.sca *= spec->prev->xf.sca; |
89 |
|
spec->rev ^= spec->prev->rev; |
90 |
< |
} else |
92 |
< |
spec->xf = thisxf; |
90 |
> |
} |
91 |
|
spec->xid = comp_xfid(spec->xf.xfm); /* compute unique ID */ |
92 |
|
return(MG_OK); |
93 |
|
} |