Hi zhujiejie,

the picked node has always a Geometry core you can't cast it to a Transform core. You can walk up in the tree to next transform node or insert your own transform node as a new parent of the picked node.

Andreas

Hi,

I am trying to pick an object from outside file and then translate it.
Do things like this:
NodePtr node = SceneFileHandler::the().read("data/terrin.wrl"); beginEditCP(node);
   setName(node,"terrin");
node->setCore(trans);
endEditCP(node);
And then I use pick function from the tutorial and get the selected object:
 _selectObject = pick(x,y);

 And last I try to dcast the transform from the node core:
 TransformPtr trans = TransformPtr::dcast(_selectObject->getCore());
 Failed!!!
I debug and find that the core has not any attachment. But anyhow, I picked the object.
 Help me on that. Thanks in advance.
Best.
Jiejie



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users





-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to