Hi, 

I have a question about computeLocalToWorldMatrix in camera class. 
First, since the openscenegraph use row matrix instead column matrix like 
opengl, I thought the default matrix multiply should be post multiply so that : 
      V' = M*V  (opengl premultiply) chanage to 
      V' = VT*MT   ( osg post multiply)
but looks like the camera still use pre_multiply as default, but the 
_viewmatrix define in camera class is apparently  is  a  row matrix  MT. 

Second, even as the default pre_multiply, then let's say: 
     V' = M*V  if (_transformOrder==PRE_MULTIPLY)
then its inverse should be 
     V = M-1* V' , 
why in function computeWorldToLocalMatrix 
    it changes to 
     V = V'* M-1 if (_transformOrder==PRE_MULTIPLY)
    
only possibility is that V' has been transposed in computeWorldToLocalMatrix. 
which is 
     VT = M-1T*V'T

but that is too confused, because you define column matrix in 
computeLocalToWorldMatrix so that you can use pre_multiply, then in 
computeWorldToLocalMatrix it becomes row matrix. 



      
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to