Dirk Reiners wrote: > Hi Marcus, > > Marcus Lindblom wrote: > >> The bad things: >> - The current 1.8 (with the patch) will probably break a lot of code, >> and it's not pleasant to fix (easy, yes, but it requires adding a lot of >> conversions randomly) >> > > Hm, random doesn't sound very good and easy to explain... > Well, to do math in OpenSG, sometimes you need a point, sometimes a vector. You can't do it with just one, and fixing that distinction would require a lot of work. >> We could fix this in a few ways: >> 1. reverting the patch >> 2. making the constructors non-explicit >> 3. adding assignment operators similar to constructors and setValue >> (similar to 2, but without temporary objects) >> 4. Unify Vec/Pnt (& Color) into one class >> > I opted for 2) for now. Unless anybody has serious objections I'd leave it > like > that. > Right. >> Option 4 would be my preferred option in the long run, i.e. 2.0. I think >> that's sort-of-planned anyway. >> > I haven't looked at GMTL in that respect. How do you implement > Vecs/Points/Colors in there? Are they symmetric? > GMTL do not have symmetric point/vectors. They do not even inherit each other in any way. It also does not implement colors at all.
I would assume that if you want some speed in your math lib, you do not want a lot of temporaries or conversions just to satisfy the compiler. I've also found it difficult to distinguish clearly between points and vectors in most of the math I do, but that's probably more a matter of taste. Cheers, /Marcus ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
