coordA = (coordB * matrixTransformB->getMatrix()) * matrixTransformA
->getMatrix().inverse();



Glenn Waldron / @glennwaldron

On Thu, Jul 16, 2015 at 11:23 AM, Christian Buchner <
christian.buch...@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@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