Re: [osg-users] strange Matrix interface

2010-04-15 Thread Michael Platings
can somebody explain to me why in Matrixd/Matrixf there is a getRotate, setRotate, getTrans, setTrans, getScale ... but no setScale? is there a reason for this? You could argue that function should be added. However that could lead to people doing mat.setTrans(...) mat.setRotation(...)

Re: [osg-users] strange Matrix interface

2010-04-15 Thread Jason Fisher
thanks for your reply Michael Platings wrote: However that could lead to people doing mat.setTrans(...) mat.setRotation(...) mat.setScale(...) and then wondering why setting the rotation didn't have any effect (setting the scale would overwrite it). okay, i wasn't aware of setRotation

Re: [osg-users] strange Matrix interface

2010-04-15 Thread Michael Platings
m.inverse( m ); ? Don't use it like that as it'll cause an extra matrix copy (see line 614 of Matrix_implementation.cpp). Basically m1.invert(m2); is a more efficient way to express m1 = Matrix::inverse(m2); btw: i am not the only one struggling with the matrix interface, maybe it would be

Re: [osg-users] strange Matrix interface

2010-04-15 Thread Jason Fisher
Michael Platings wrote: Don't use it like that as it'll cause an extra matrix copy (see line 614 of Matrix_implementation.cpp). Basically m1.invert(m2); is a more efficient way to express m1 = Matrix::inverse(m2); yeah, but i want to invert m, so i have to copy anyway, don't i? Michael

[osg-users] strange Matrix interface

2010-04-14 Thread Jason Fisher
Hi, can somebody explain to me why in Matrixd/Matrixf there is a getRotate, setRotate, getTrans, setTrans, getScale ... but no setScale? is there a reason for this? and why do i have to pass a matrix to the (non-static) bool Matrix::invert method? Cheers, Jason PS: a Matrix