I think first mistake is the R row. > osg::Matrix mat(a,b,c,d, > e,f,g,h, > 0.0,0.0,0.0,0.0, // changed 3rd column from 1 to 0 > 0.0,0.0,0.0,1.0);
However, this is now ordered as: S T R Q Which is funky. I'm playing with different orders now. Chris -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz Sent: Thursday, July 26, 2007 7:46 AM To: [email protected] Subject: Re: [osg-users] Making a matrix from 2 texgens. Could be a column- versus row-major issue, or a pre- versus post-multiply issue. But, conceptually, what you're attempting should work. -Paul > I'm trying to created an osg::Matrix that has the equivalent > representation of what a texgen would make. > > For instance, the texgen has: > texgen->setPlane(osg::TexGen::S, osg::plane(a,b,c,d)); > texgen->setPlane(osg::TexGen::T, osg::plane(e,f,g,h)); > > (R&Q) are defaults. > > > When this is used with a vertex, I get generated texcoords. > > I would create a matrix that I could use to calculate these results. > > osg::Matrix mat(a,b,c,d, > e,f,g,h, > 0.0,0.0,1.0,0.0, > 0.0,0.0,0.0,1.0); > > > Multiplying this with the vertex coord doesn't seem to give me the > right answers. > > Is this the right way to set up the equivalent matrix? > > Thanks, > > Chris > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

