Hi Matthias,

Matthias Asselborn schrieb:
Yes it is.

First my SceneGraph has a a root ( osg::Group ).
The Root contains few transform nodes
under one transform nodes is one node, a model added by a loader.

now i want to click on a object on the screen. and i want to get a pointer of this object by picking!

the example in the book is done with the PolytopeIntersector but it doesnt work accurately i get a node when i clicked on a empty place in the scene or i clicked on another node and i get a other node from the picker.

Can you reproduce your problems with the osgkeyboardmouse example?
It switches to use the PolytopeIntersector when you press 'p' once (actually it toggles). If you use a OSG loader you can pass your filename as first parameter to the executable.

I have not read the quick start guide but I have some general remarks:
- you can adjust the accuracy of the Polytope-Picking by the
  size of the polytope which is usually incorporated in the constructor
  arguments of PolytopeIntersector (see osgkeyboardmouse)
- the PolytopeIntersector returns *all* intersections it encounters,
  and if you call getFirstIntersection() you will only get one.
  This may account for your getting the "wrong" node.

ive tested the LineIntersector in OSG examples it works great
but i get only points on the screen no nodes...


Regards,

Peter Hrenka
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to