Hi,
I've made an ortho texture manipulator before for panning and zooming an
image. Basically you have to scale the ortho projection before doing any
translation/rotation.
osg::Matrixd OrthoTextureManipulator::getInverseMatrix() const
{
return osg::Matrixd::translate(-_center) *
osg::Matrixd::translate(-_zoom_offset) *
osg::Matrixd::scale(_distance, _distance, 1.0) *
osg::Matrixd::translate(_zoom_offset) *
osg::Matrixd::rotate(_rotation.inverse());
}
This was for a texture in the XY-plane.
rgds
jp
On 05/01/11 00:26, David Glenn wrote:
Greetings!
Sorry all! I didn't mean to open old battle wounds Paul. I was just wondering
if anybody else has written anything before I tacked it on my own!
Frankly I've never had the chance to look into the logistics of it yet! I just
got the command from Mt High that my project has to be Orthographic and I’ve
never done anything Orthographic in OSG (outside of a Hud display) before.
Thanks for the help!
D Glenn
------------------------
D Glenn (a.k.a David Glenn) - Moving Heaven and Earth!
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35311#35311
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org