[osg-users] transforming between coordinate systems of two subgraph

Christian Buchner christian.buchner at gmail.com
Thu Jul 16 09:36:46 PDT 2015


Hi,

thanks a lot. Now that I've got the solution in front of me, I must say....
that was obvious ;)

Christian


2015-07-16 17:35 GMT+02:00 Glenn Waldron <gwaldron at gmail.com>:

> coordA = (coordB * matrixTransformB->getMatrix()) * matrixTransformA
> ->getMatrix().inverse();
>
>
>
> Glenn Waldron / @glennwaldron
>
> On Thu, Jul 16, 2015 at 11:23 AM, Christian Buchner <
> christian.buchner at gmail.com> wrote:
>
>> Hi,
>>
>> I was having some problems with a coordinate transformation.
>>
>> root
>> matrixTransformA      matrixTransformB
>> subgraphA                subgraph B
>>
>> I have two subgraphs in my scene, each of which is a child of a unique
>> MatrixTransform.
>>
>> 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.
>>
>> How would I transform a coordinate from subgraph B coordinate system into
>> the equivalent
>> 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.
>>
>> Excuse me for asking a basic linear algebra question, but I seem to be
>> stuck for good on this problem.
>>
>> Christian
>>
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150716/ec4712e1/attachment-0003.htm>


More information about the osg-users mailing list