Boost logo

Boost :

Subject: Re: [boost] Is there any need for a math library doing vectors and matrices operations?
From: Michael Fawcett (michael.fawcett_at_[hidden])
Date: 2008-11-05 11:28:53


On Tue, Nov 4, 2008 at 8:48 PM, Christophe Riccio
<g.truc.creation_at_[hidden]> wrote:
>
> I had a look on the implementation of swizzle operators "swizzle_demo_01.zip".
> I seems that just allow permutations like:
>
> vec4 v1;
> vec4 v2;
> ...
> v1.zyxw = v2.wxyz;
>
> Other implementations could provide something like this:
> v1.zyx = v2.xwx;

No, it allows any permutation:

float4 v1;
float4 v2;
...
v1.zy() = v2.wx();
v1.zyw() = v2.ywx();
v1.zyzz() = v2.zxwx();

--Michael Fawcett


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk