Happy to hear that it works. BTW, actually the check is a bit more complicated, because you might want to apply mirroring against several axes in sequence. Once you have the global transformation of the mirrored object, the correct check is the following. Get the determinant of that global transformation, and check the sign: - if < 0.0, it means that there is an odd number of negative scale factors in the matrix, so winding has to be reverted: set FrontFace mode to CLOCKWISE; - if > 0.0, it means that there is no or an even number of negative scale factors, so winding has to be left as COUNTERCLOCKWISE. Just for completeness.
Gianluca -----Original Message----- From: osg-users [mailto:[email protected]] On Behalf Of Ale Maro Sent: Wednesday, September 13, 2017 7:12 PM To: [email protected] Subject: Re: [osg-users] Mirror transformation Hi Gianluca, I tried your suggestion and it worked. It is a little tricky for me becouse I need to analyze on the fly the transformation matrix and apply osg::FrontFace by consequence.... but it works. Thank you. Ale ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=71712#71712 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

