Hi Praveen,
Praveen Bhaniramka wrote:
> Hello folks,
>
> I had a couple of questions regarding the picking implementation in
> IntersectAction.
>
> - It seems that the action returns the first object that the ray segment
> has hit. I would like to implement picking such that ALL the nodes along
> a given ray direction are picked. Is that supported in IntersectAction?
Not yet.
> If not, what would be the best mechanism to implement this feature? I
> guess, I could start another ray from the first hit point and continue
> traversing until the ray exits the scene?
You could do that. It would be more efficient to either add a new Action
for it or to generalize the existing IntersectAction. The main thing to
do would be to remove the optimizations that speed up the intersection
process. ;) I think either one would work, changing the existing one is
probably easier. I would add a callback function to be called whenever a
hit is detected, to allow you to do what you want with the data.
> - I would like to get the SG traversal path from the picked node(s) back
> to the root node. How can this be done? I was wondering if I would run
> into issues with respect to multiple parents for a given node? E.g. the
> 4 wheels of the car (in Dirk's slides), which is represented by the same
> node with 4 transform nodes as parents.
As Marcus said this is not an issue with OpenSG, as the Intersect
returns the Node, not the Core.
Dirk
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users