Boost logo

Boost :

From: rodolfo_at_[hidden]
Date: 2006-03-17 17:29:58


On Fri, Mar 17, 2006 at 11:08:37PM +0100, Janek Kozicki wrote:
> rodolfo_at_[hidden] said: (by the date of Fri, 17 Mar 2006 16:35:40 -0300)
>
> > pt.x = 6.0;
> > pt.y = 3;
> >
> > or
> >
> > pt[0] = 6.0;
> > pt[1] = 4;
>
> you can have both of them:
>
> union
> {
> struct { Type x,y,z; };
> Type v[3];
> };
>
> that's what I used for my small vector3d (and vector2d, quaternion, matrix3) library.

The problem with this approach is that Type cannot have constructors
or destructors to get into an union. That's a little too restrictive, I
think.

> Currently I'm dragging everywhere my library, and I use it in a lot of
> different projects. Anyway if you are interesed in that 3d stuff let me
> know, and I'll start a code cleanup to eventually submit it to boost :)

That's exactly why I'm looking forward this geometry library :)

Thanks,
Rodolfo Lima.

                
_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
http://br.acesso.yahoo.com


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