[osg-users] Transforming a quad polygon into a rectangle

2011-06-01 Thread Kevin DeMott
I'm trying to find a way to convert a four sided polygon (non-rectangular) into 
a rectangle in 3D space.  I would like this to be some type of matrix transform 
as I need to be able to go both ways. IE from the polygon to a rectangle and 
from a rectangle to the polygon.

I can do a similar operation in QT with the QTransform::quadToQuad. The problem 
with that approach is I end up with a 3x3 matrix whereas I need a 4x4 for the 
osg/opengl calls. I have not had much luck stuffing the 3x3 into a 4x4.

Thanks

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Transforming a quad polygon into a rectangle

2011-06-01 Thread Ryan Pavlik
Well, if you can get a 3x3, you should just be able to start with a 4x4
identity matrix and then copy the 3x3 into the upper-left corner of that
matrix.

Ryan

On Wed, Jun 1, 2011 at 9:08 AM, Kevin DeMott kdem...@belcan.com wrote:

 I'm trying to find a way to convert a four sided polygon (non-rectangular)
 into a rectangle in 3D space.  I would like this to be some type of matrix
 transform as I need to be able to go both ways. IE from the polygon to a
 rectangle and from a rectangle to the polygon.

 I can do a similar operation in QT with the QTransform::quadToQuad. The
 problem with that approach is I end up with a 3x3 matrix whereas I need a
 4x4 for the osg/opengl calls. I have not had much luck stuffing the 3x3 into
 a 4x4.

 Thanks

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





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org