[osg-users] IntersectVisitor does not recognize Nodes on different Projection

Peter Hrenka p.hrenka at science-computing.de
Mon Nov 30 01:20:33 PST 2009


Hi Thorsten,

Thorsten Werner schrieb:
> Hi,
> 
> OK. Thank you. Got it working now. Changed setProjectionMatrixOrtho2D into setProjectionMatrixOrtho. Next problem that i have is that the Buttons in my SceneGraph consist of several geometries and the Button is a Geode but its not recognized as Geode. Only as several Geometries. I dont know how to solve this. After going through the API i found Geode->setNodeMask. Could this help maybe? Ive no idea what a nodemask is though...

If you are looking for the Geode you can use the "nodePath" field of
the Intersection result which contains the complete path leading to
the hit geometry.

NodeMasks are basically bitmasks that can be used in the context of
intersection testing. You can set them using Node::setNodeMask()
and search for Nodes matching a NodeMask using
osgUtil::IntersectionVisitor::setTraversalMask().
But even using this method you still have to look in the NodePath to 
find your geode...

> Thank you!
> 
> Cheers,
> Thorsten

Cheers,

Peter
-- 
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 




More information about the osg-users mailing list