
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. btw, I really would like to see boost with some kind of small vector library, that most importantly allows multiplacation of vector3d by quaterion to acheive rotation in 3d space. Conversion from quaterion to axis-angle, to euler-angle, to rotation matrix representation of rotation, etc... 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 :) And if someone already works on that I really would like to know about that (so I can help)! -- Janek Kozicki |