[osg-users] Tiny normals: osgviewer vs osgcompositeviewer

Claudio Benghi claudio.benghi at gmail.com
Fri Feb 15 05:13:30 PST 2019


Hello,

Julien, thanks for your help.

I'm confused from the use of the inverse in the multiplication, I'm not sure I understand the nature of the code here. I'll have to go in and debug the values to understand more.

What I'd expect is that only the rotation component of the matrix is applied to the normal vector (scaling and translation ignored).

In the init code something like:

Code:

_rot = osg::Matrix::identity();
rot.makeRotate(_m.getRotate());




and then in the normals loop:


Code:

(*itr) = (*itr)*_rot;




I do not understand at all why the code seems to be using the inverse of the matrix instead. 

Unfortunately I've isolated the scaling issues out of my current code so that testing this code would be quite difficult form me right now,  but I'll try as soon as possible. 

Am I missing something big?

Thanks again,
Claudio

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75629#75629







More information about the osg-users mailing list