Okay so I was able to figure out my issue. Amazing what some sleep does for the 
mind. Anyways, the problem was that I was trying to put the anchor point back 
then add an additional translation to try to get it in the correct place. The 
solution is much easier.


Code:

osg::Matrix matrix; 

// 1) Move the matrix to the anchor point 
matrix *= osg::Matrix::translate(-_anchorPoint); 

// 2) Multiply the scale matrix at the anchor point 
matrix *= _scaleMatrix; 

// 3) Move the anchor point to the location I need it at
matrix *= _translationMatrix;

// 4) Apply the new matrix to the quad 
setMatrix(matrix); 




I already know where the anchor point needs to end up on screen, so all I need 
to do was scale it around the anchor point, then move the anchor point to the 
final location. Made it way too complicated.

Hope that helps someone else trying to accomplish the same thing.
--

Christian
[/code]

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to