Boost logo

Boost :

From: Marcus Lindblom (macke_at_[hidden])
Date: 2006-10-10 08:45:19


Marcus Lindblom wrote:
> Dave Harris wrote:
>
>> In-Reply-To: <45252C77.3050708_at_[hidden]>
>> macke_at_[hidden] (Marcus Lindblom) wrote (abridged):
>>
>>> So, we need to support three different styles of access, at least, to
>>> make everyone happy?
>>>
>>> - vec[0]
>>> - vec.x
>>> - vec[_x]
>>>
>> I won't be happy if vec.x is supported, no matter how many other styles of
>> access we add. A class like this should not expose its representation so
>> directly.
>>
>
> Ok. I, OTOH, really likes that kind of notation, since I write a lot of
> GLSL as well.
>
> The point I'm trying to make is that there is as almost much opinion on
> member-access on vectors as there are on code indent size. So, whatever
> we make ought to support everything, if we want it to be acceptable to a
> large audience?
>
> Perhaps we can make it so that you can decouple access style from the
> general algorithms? We might need that anyway, if we want to support
> things like rgba, stqr, etc, for the small 1-4 element vectors.
>
If we made a "geom-vector" concept similar to boost::range, then we
could make a lib that could use anyone's current vectors. (Boost would
of course define their own, a couple of variants that pleases everyone).

I think it could have some merit to do something that's "pluggable" into
existing vector/point/matrix classes.

/Marcus


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