Hi,

Jacques-André Boulay wrote:

Hi,

I have a simple question for you: how can I obtain the local
transformation matrix of the parent node of a node?

I tried to call getParent() first to obtain the parent node of my
node, but I don't know how to extract the transform node from it
since getCore() return a NodeCorePtr that is not directly
compatible with a TransformPtr.  I tried to cast the result of
getCore() to obtain a TransformPtr but it's not working...
For the cast you have to use the static dcast method. I always use
TransformPtr trf = TransformPtr::dcast(node->getCore());

If the result is NullFC then it is not a Transform and you have to go further up the tree... Do you know the method Matrix getToWorld() of Node? It gives you the accumulated matrix in the node.

Christoph


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to