Ideally you wouldn't need to determine the position of the top after rotation 
because they would all be positioned off of the same point, and then rotated 
together into place. 

Either way, I found what caused the original code to not work; it was the order 
of transformations. The PositionAttitudeTransform applies the rotation first, 
and then applies the translation (imagine the cylinder rotating in place at the 
origin, and then moving itself into position). This means we want to set the 
position of the PositionAttitudeTransform to top_of_prev_rotated_cylinder 
instead of top_of_prev_unrotated_cylinder. 

That should do the trick. . .

Alex


________________________________________
From: osg-users [osg-users-boun...@lists.openscenegraph.org] on behalf of Laura 
Mac [randomweirdadventure...@yahoo.com]
Sent: Wednesday, May 28, 2014 8:07 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Finding position of top of rotated cylinder

Thanks for the advice!

If I were to set the pivot point of each cylinder to the bottom of each 
cylinder, how would I determine the top of the rotated cylinder?

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





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

Reply via email to