Hello Keyan,

On 05/31/2011 11:11 AM, Keyan wrote:
> it turns out, they are. the values in m.getTransformation -->  position are 
> the same as in my pose.position.
>
> i paste the entire code in:
>
> http://pastebin.com/9pLeP1ZL
>
> (its not that big)
>
> the function update() is called from outside periodically.

hmm, the only problem i can see is:

OSG::NodeTransitPtr SceneGraphObjectNode::node()
{
   return OSG::NodeTransitPtr(root);
}

TransitPtr behaves similarly to std::auto_ptr<>, including the odd and 
confusing ownership transfer. It's only use is for a minor optimisation 
of functions that _create_ objects (e.g. OSG::makeBox), never use it to 
just return a pointer from a function. The way it is written, root 
becomes a NULL pointer after calling node(), the pointer "transits" to 
the caller.

The above should better look like:

OSG::Node* SceneGraphObjectNode::node()
{
      return root;
}

Or, if you don't care about micro optimisations:

OSG::NodeRecPtr SceneGraphObjectNode::node()
{
     return root;
}

Everything else looks ok to me. My guess would be that the problem is 
somehow related to the issue above or in parts of the code you did not post.

        Cheers,
                Carsten

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to