> 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(...)
mat.setScale(...)
and then wondering why setting the rotation didn't have any effect (setting
the scale would overwrite it).
It's probably safest to set up your matrix with
pre/postMultTranslate/Scale/Rotate.


> and why do i have to pass a matrix to the (non-static) bool Matrix::invert
> method?
>

matA.invert(matB) sets matA to be the inverse of matB.
However something that doesn't make sense to me is why to get the inverse of
a matrix you have to do Matrix::inverse(mat) rather than just mat.inverse().


> PS: a Matrix& MatrixTransform::getMatrix (no const reference) would also be
> nice, so i could operate on the contained matrix directly if i wanted to and
> would not have to copy it with getMatrix and copy it again with
> setMatrix...)
>

The MatrixTransform needs to know when its matrix has been modified so that
it can set its flags to dirty. If you really need direct access to the
matrix for maximum efficiency, and you don't mind setting the flags
yourself, you can derive your own class from MatrixTransform. But for most
of us the current way is safest.

HTH
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to