|
|
On 2/15/23 07:20, William F Pokorny wrote:
> #declare Vec00_Xfrmed =
> <FnXfrm00(Vec00.x,Vec00.y,Vec00.z).x,
> FnXfrm00(Vec00.x,Vec00.y,Vec00.z).y,
> FnXfrm00(Vec00.x,Vec00.y,Vec00.z).z>;
The light went on in my head a minute ago that I'd coded the part above
without thinking. It can be just:
#declare Vec00_Xfrmed = FnXfrm00(Vec00.x,Vec00.y,Vec00.z);
---
That said, Tor Olav's suggestions are the cleaner method from the users
perspective. Internally those macros use the function based code too.
The best approach for performance depends on what you are doing. Using a
single transform against a lot of vectors will favor raw coding approach
where the transform function can be parsed, compiled and defined once.
If many transforms against few vectors, the macro's are the way to go.
Bill P.
Post a reply to this message
|
|