
On Fri, Mar 17, 2006 at 11:08:37PM +0100, Janek Kozicki wrote:
rodolfo@rodsoft.org 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