Hi Joseph,
All osg::Object have a setName/getName() method that you can use for
the purposes of identifying nodes.
Robert.
On 4 May 2012 06:25, Joseph Smith frimpongeman...@gmail.com wrote:
Hi,
I am trying to load a scene with various ac3d models and I need to identify
them when clicked on.
I have two issues.
1) Lets say that I need to load model1.ac and model2.ac. How do I set up my
scene? How do I read these files into a Node? How do I assign each node a
unique identifier/ unique name?
2) When I try picking one of these objects similarly to how its shown in the
osgpick example, how do I retrieve this unique identifier/ unique name?
i.e., for each hit in the intersections, how do I retrieve the unique
identifier/ unique name of the model that has been hit?
Code:
for(osgUtil::LineSegmentIntersector::Intersections::iterator hitr =
intersections.begin();
hitr != intersections.end();
++hitr)
Thank you!
Cheers,
Joseph
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=47542#47542
___
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