How to get the component of ModelNode?

classic Classic list List threaded Threaded
3 messages Options
vigos lee vigos lee
Reply | Threaded
Open this post in threaded view
|

How to get the component of ModelNode?

Hi,
I now load an obj file in the form of ModelNode,but I don't know how to get its component.
It doesn't seem like a normal Node.
I can get componentfrom node in this way:
osg::ref_ptr<osg::Node> node = osgDB::readNodeFile();
node->asGroup()->getChild(0);
But the same approach doesn't work with ModelNode.
What should I do?
Thanks!
vigos
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: How to get the component of ModelNode?

Vigos,
You can access the node under ModelNode::getPositionAttitudeTransform().

Hope this helps!
Glenn Waldron / Pelican Mapping
vigos lee vigos lee
Reply | Threaded
Open this post in threaded view
|

Re: How to get the component of ModelNode?

Thank you, Glenn . I got it.
vigos