From 0b1f6fedc94f2356a4f2683275b87ba65896b896 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 1 Apr 2004 07:49:32 +0000 Subject: [PATCH] Changed the comment to make it clear what axis change is implementated. --- src/osgPlugins/obj/ReaderWriterOBJ.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/osgPlugins/obj/ReaderWriterOBJ.cpp b/src/osgPlugins/obj/ReaderWriterOBJ.cpp index 027c48eb2..bf53b5445 100644 --- a/src/osgPlugins/obj/ReaderWriterOBJ.cpp +++ b/src/osgPlugins/obj/ReaderWriterOBJ.cpp @@ -445,9 +445,8 @@ osg::Drawable* ReaderWriterOBJ::makeDrawable_duplicateCoords(GLMmodel* obj, GLMg { int ci = tri->vindices[corner]*3; - // note obj_x -> osg_x, - // obj_y -> -osg_z, - // obj_z -> osg_y, + // note flip the y,z axis to convert the OBJ left hand coord system, y up to the OSG's + // right hand coords system z up. coords->set(obj->vertices[ci],-obj->vertices[ci+2],obj->vertices[ci+1]); ++coords; @@ -461,10 +460,8 @@ osg::Drawable* ReaderWriterOBJ::makeDrawable_duplicateCoords(GLMmodel* obj, GLMg { int ni = tri->nindices[corner]*3; - // note obj_x -> osg_x, - // obj_y -> osg_z, - // obj_z -> osg_y, - // to rotate the about x axis to have model z upwards. + // note flip the y,z axis to convert the OBJ left hand coord system, y up to the OSG's + // right hand coords system z up. normals->set(obj->normals[ni],-obj->normals[ni+2],obj->normals[ni+1]); ++normals; }