Hi, On Mon, 2007-06-25 at 09:52 +0200, Marcus Lindblom wrote: > Dirk Reiners wrote: > > Hi Marcus, > > > > > > > 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.
most likely the only really important issue is the difference in multiplying a pnt or vec by a 4x4 matrix. This is where most of the errors occur. The rest is more mathematical rigor. So instead of trying to push this distinction to the pnt/vec classes (implicit 0/1 w coordinate) we could push it to the Matrix class and go for a more convenient (unified ?) Vec/Pnt implementation. The only tricky bit is that operator overloading (M * v) does not work easily if you have to tell which multiplication to use. I looked a gmtl (and put it into OpenSG) and in a way they suffer in the same area. They distinguish between vec/pnt but this information is lost during the expression template evaluation. So at some point the user has to explicitly convert to either Vec/Pnt again to go on. It reminds me of a typical rather fuzzy quantum system (the expressions) and only after the users looks at them (converts them) he knows the type. Until than the expression exists as a superimposed pnt/vec thing. Don't know if this is better. Let me think about it a little bit what we can do for 2.x. We can than collect it on a wiki page. It might take a second (for me) as I'm currently running around. I will be back in Singapore next week to get this started. kind regards, gerrit ------------------------------------------------------------------------- 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
