Dear all,
The following code in the header file MatrixD looks very suspicious to me:

inline Vec3d getScale() const {
          Vec3d x_vec(_mat[0][0],_mat[1][0],_mat[2][0]);
          Vec3d y_vec(_mat[0][1],_mat[1][1],_mat[2][1]);
          Vec3d z_vec(_mat[0][2],_mat[1][2],_mat[2][2]);
          return Vec3d(x_vec.length(), y_vec.length(), z_vec.length());
        }

Shouldn't the index order be the other way around? I mean it should be

inline Vec3d getScale() const {
          Vec3d x_vec(_mat[0][0],_mat[0][1],_mat[0][2]);
          Vec3d y_vec(_mat[1][0],_mat[1][1],_mat[1][2]);
          Vec3d z_vec(_mat[2][0],_mat[2][1],_mat[2][2]);
          return Vec3d(x_vec.length(), y_vec.length(), z_vec.length());
        }

The behaviour of my program was strange before I fix this problem. I'm not
100% percent sure, but since it's of fundamental importance, I still
decided to report.

Best regards,
Tianlan Shao
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to