<div dir="ltr">coordA = (coordB * <span style="font-size:12.8000001907349px">matrixTransformB</span>->getMatrix()) * <span style="font-size:12.8000001907349px">matrixTransformA</span>->getMatrix().inverse();<div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">Glenn Waldron / @glennwaldron</div></div>
<br><div class="gmail_quote">On Thu, Jul 16, 2015 at 11:23 AM, Christian Buchner <span dir="ltr"><<a href="mailto:christian.buchner@gmail.com" target="_blank">christian.buchner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>I was having some problems with a coordinate transformation.<br><br></div>root<br>matrixTransformA matrixTransformB<br></div>subgraphA subgraph B<br><br></div>I have two subgraphs in my scene, each of which is a child of a unique MatrixTransform.<br><br></div>I now have to draw a line between an element from subgraph A to connect to an element of subgraph B. I've decided to add this line into subgraphA as a drawable - so both start and end point of this line have to be specified in my "A" coordinate system.<br><br></div><div>How would I transform a coordinate from subgraph B coordinate system into the equivalent<br></div><div>coordinate valid within subgraph A, ideally using utility functions provided by the OSG framework ? I would like to do that with minimal amount of code.<br><br></div><div>Excuse me for asking a basic linear algebra question, but I seem to be stuck for good on this problem.<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Christian<br><br></div><div><br></div></font></span></div>
<br>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br></blockquote></div><br></div>